deployment.yaml 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. apiVersion: apps/v1
  2. kind: Deployment
  3. metadata:
  4. name: {{ include "porter-prod.fullname" . }}
  5. labels:
  6. {{- include "porter-prod.labels" . | nindent 4 }}
  7. spec:
  8. {{- if not .Values.autoscaling.enabled }}
  9. replicas: {{ .Values.replicaCount }}
  10. {{- end }}
  11. selector:
  12. matchLabels:
  13. {{- include "porter-prod.selectorLabels" . | nindent 6 }}
  14. template:
  15. metadata:
  16. {{- with .Values.podAnnotations }}
  17. annotations:
  18. {{- toYaml . | nindent 8 }}
  19. {{- end }}
  20. labels:
  21. {{- include "porter-prod.selectorLabels" . | nindent 8 }}
  22. spec:
  23. {{- with .Values.imagePullSecrets }}
  24. imagePullSecrets:
  25. {{- toYaml . | nindent 8 }}
  26. {{- end }}
  27. volumes:
  28. - name: wss-ssl-certificate
  29. secret:
  30. secretName: ingress-dashboard
  31. serviceAccountName: {{ include "porter-prod.serviceAccountName" . }}
  32. securityContext:
  33. {{- toYaml .Values.podSecurityContext | nindent 8 }}
  34. containers:
  35. - name: {{ .Chart.Name }}
  36. securityContext:
  37. {{- toYaml .Values.securityContext | nindent 12 }}
  38. image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
  39. imagePullPolicy: {{ .Values.image.pullPolicy }}
  40. ports:
  41. - name: http
  42. containerPort: 8080
  43. protocol: TCP
  44. resources:
  45. {{- toYaml .Values.resources | nindent 12 }}
  46. volumeMounts:
  47. - name: wss-ssl-certificate
  48. mountPath: /etc/wss
  49. {{- with .Values.nodeSelector }}
  50. nodeSelector:
  51. {{- toYaml . | nindent 8 }}
  52. {{- end }}
  53. {{- with .Values.affinity }}
  54. affinity:
  55. {{- toYaml . | nindent 8 }}
  56. {{- end }}
  57. {{- with .Values.tolerations }}
  58. tolerations:
  59. {{- toYaml . | nindent 8 }}
  60. {{- end }}