apiVersion: apps/v1 kind: Deployment metadata: name: {{ include "argocd-notifications.name" . }}-controller labels: {{- include "argocd-notifications.labels" . | nindent 4 }} spec: strategy: {{- .Values.updateStrategy | toYaml | nindent 4 }} selector: matchLabels: {{- include "argocd-notifications.selectorLabels" . | nindent 6 }} template: metadata: {{- if .Values.podAnnotations }} annotations: {{- range $key, $value := .Values.podAnnotations }} {{ $key }}: {{ $value | quote }} {{- end }} {{- end }} labels: {{- include "argocd-notifications.selectorLabels" . | nindent 8 }} {{- with .Values.podLabels }} {{- toYaml . | nindent 8 }} {{- end }} spec: {{- with .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} serviceAccountName: {{ include "argocd-notifications.serviceAccountName" . }} {{- if .Values.securityContext }} securityContext: {{- toYaml .Values.securityContext | nindent 8 }} {{- end }} containers: - name: {{ include "argocd-notifications.name" . }}-controller image: "{{ .Values.image.repository }}:{{ default .Chart.AppVersion .Values.image.tag }}" imagePullPolicy: {{ .Values.image.pullPolicy }} resources: {{- toYaml .Values.resources | nindent 12 }} command: - /app/argocd-notifications-backend - controller - --loglevel={{ .Values.logLevel }} {{- if .Values.metrics.enabled }} - --metrics-port={{ .Values.metrics.port }} {{- end }} {{- range .Values.extraArgs }} - {{ . | squote }} {{- end }} workingDir: /app ports: {{- if .Values.metrics.enabled }} - containerPort: {{ .Values.metrics.port }} name: metrics protocol: TCP {{- end }} {{- if .Values.containerSecurityContext }} securityContext: {{- toYaml .Values.containerSecurityContext | nindent 12 }} {{- end }} {{- with .Values.extraEnv }} env: {{ 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 }}