apiVersion: apps/v1 kind: Deployment metadata: name: {{ template "app.name" . }} labels: {{- include "app.labels" . | nindent 4 }} spec: selector: matchLabels: {{- include "app.selectorLabels" . | nindent 6 }} template: metadata: labels: {{- include "app.selectorLabels" . | nindent 8 }} {{- if .Values.podAnnotations }} annotations: {{ toYaml .Values.podAnnotations | indent 8 }} {{- end }} spec: {{- if .Values.priorityClassName }} priorityClassName: {{ .Values.priorityClassName }} {{- end }} serviceAccountName: {{ template "app.serviceAccountName" . }} containers: - name: {{ .Chart.Name }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.image.pullPolicy }} args: {{- range $key, $value := .Values.args }} {{- if $value }} - --{{ $key }}={{ $value }} {{- else }} - --{{ $key }} {{- end }} {{- end }} env: - name: POD_NAMESPACE valueFrom: fieldRef: fieldPath: metadata.namespace {{- if .Values.envVars }} {{ toYaml .Values.envVars | nindent 10 }} {{- end }} {{- if .Values.jobImageMode }} - name: POD_NAME valueFrom: fieldRef: fieldPath: metadata.name - name: POD_UID valueFrom: fieldRef: fieldPath: metadata.uid {{- end }} securityContext: {{ toYaml .Values.securityContext | indent 12 }} resources: {{ toYaml .Values.resources | indent 12 }} ports: - containerPort: 8080 name: http protocol: TCP livenessProbe: timeoutSeconds: 3 httpGet: path: "/health" port: http readinessProbe: timeoutSeconds: 3 httpGet: path: "/health" port: http volumeMounts: - mountPath: /work name: work - mountPath: /tmp name: tmp {{- if .Values.extraVolumeMounts }} {{- toYaml .Values.extraVolumeMounts | nindent 12 }} {{- end }} volumes: - name: work emptyDir: {} - name: tmp emptyDir: {} {{- if .Values.extraVolumes }} {{- toYaml .Values.extraVolumes | nindent 8 }} {{- end }} {{- with .Values.image.pullSecrets }} imagePullSecrets: {{ toYaml . | indent 8 }} {{- end }} {{- with .Values.nodeSelector }} nodeSelector: {{ toYaml . | indent 8 }} {{- end }} {{- with .Values.affinity }} affinity: {{ toYaml . | indent 8 }} {{- end }} {{- with .Values.tolerations }} tolerations: {{ toYaml . | indent 8 }} {{- end }}