apiVersion: apps/v1 kind: Deployment metadata: name: {{ include "deploy.serviceFullname" (dict "root" . "svcKey" "email_worker") }} labels: {{- include "deploy.labels" . | nindent 4 }} app.kubernetes.io/component: email-worker spec: replicas: {{ .Values.services.email_worker.replicaCount | default 1 }} selector: matchLabels: {{- include "deploy.serviceSelectorLabels" (dict "root" . "svcKey" "email_worker") | nindent 6 }} template: metadata: labels: {{- include "deploy.labels" . | nindent 8 }} app.kubernetes.io/component: email-worker spec: {{- with .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} serviceAccountName: {{ include "deploy.serviceAccountName" . }} {{- with .Values.podSecurityContext }} securityContext: {{- toYaml . | nindent 8 }} {{- end }} containers: - name: email-worker {{- with .Values.securityContext }} securityContext: {{- toYaml . | nindent 12 }} {{- end }} image: "{{ .Values.imageRegistry }}/{{ .Values.services.email_worker.repository }}:{{ .Values.imageTag | default .Chart.AppVersion }}" imagePullPolicy: IfNotPresent ports: - name: http containerPort: {{ .Values.services.email_worker.port }} protocol: TCP envFrom: - configMapRef: name: {{ .Values.configMapName }} livenessProbe: httpGet: path: /health port: http initialDelaySeconds: 10 periodSeconds: 15 readinessProbe: httpGet: path: /health port: http initialDelaySeconds: 5 periodSeconds: 10 {{- with .Values.services.email_worker.resources }} resources: {{- toYaml . | nindent 12 }} {{- end }} {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.affinity }} affinity: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }}