apiVersion: apps/v1 kind: Deployment metadata: name: {{ include "vals-operator.fullname" . }} labels: {{- include "vals-operator.labels" . | nindent 4 }} spec: replicas: 1 selector: matchLabels: {{- include "vals-operator.selectorLabels" . | nindent 6 }} template: metadata: {{- with .Values.podAnnotations }} annotations: {{- toYaml . | nindent 8 }} {{- end }} labels: {{- include "vals-operator.selectorLabels" . | nindent 8 }} spec: {{- with .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} serviceAccountName: {{ include "vals-operator.serviceAccountName" . }} securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} containers: - name: {{ .Chart.Name }} securityContext: {{- toYaml .Values.securityContext | nindent 12 }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.image.pullPolicy }} {{- if .Values.args }} args: {{- toYaml .Values.args | nindent 12 }} {{- end }} {{- if .Values.environmentSecret }} envFrom: - secretRef: name: "{{ .Values.environmentSecret }}" {{- else }} envFrom: {{- toYaml .Values.secretEnv | nindent 12 }} {{- end }} {{- if .Values.env }} env: {{- toYaml .Values.env | nindent 12 }} {{- end }} resources: {{- toYaml .Values.resources | nindent 12 }} {{- if .Values.volumeMounts }} volumeMounts: {{- toYaml .Values.volumeMounts | nindent 12 }} {{- end }} ports: - containerPort: {{ .Values.metricsPort | default 8080 }} {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.affinity }} affinity: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }} {{- if .Values.volumes }} volumes: {{- toYaml .Values.volumes | nindent 8 }} {{- end }}