apiVersion: apps/v1 kind: Deployment metadata: name: {{ include "vault-unseal.fullname" . }} labels: {{- include "vault-unseal.labels" . | nindent 4 }} {{- with .Values.deployment.labels }} {{- toYaml . | nindent 4 }} {{- end }} {{- with .Values.deployment.annotations }} annotations: {{- toYaml . | nindent 4 }} {{- end }} spec: replicas: {{ .Values.deployment.replicaCount }} revisionHistoryLimit: {{ .Values.deployment.revisionHistoryLimit }} strategy: {{- with .Values.deployment.strategy }} {{- toYaml . | nindent 4 }} {{- end }} selector: matchLabels: {{- include "vault-unseal.selectorLabels" . | nindent 6 }} template: metadata: {{- with .Values.podAnnotations }} annotations: {{- toYaml . | nindent 8 }} {{- end }} labels: {{- include "vault-unseal.selectorLabels" . | nindent 8 }} spec: {{- with .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} serviceAccountName: {{ include "vault-unseal.serviceAccountName" . }} securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} containers: - name: {{ .Chart.Name }} securityContext: {{- toYaml .Values.securityContext | nindent 12 }} image: "{{ .Values.image.registry }}/{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.image.pullPolicy }} command: ["vault-unseal"] args: ["--config=/etc/vault-unseal/vault-unseal.yaml"] {{- with .Values.containers.env }} env: {{- toYaml . | nindent 12 }} {{- end }} resources: {{- toYaml .Values.resources | nindent 12 }} volumeMounts: - name: conf mountPath: /etc/vault-unseal readOnly: true {{- with .Values.extraVolumeMounts }} {{- 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 }} volumes: - name: conf secret: secretName: {{ include "vault-unseal.fullname" . }}-conf defaultMode: 0400 {{- with .Values.extraVolumes }} {{- toYaml . | nindent 6 }} {{- end }}