argocd-helm/charts/argo-cd/templates/argocd-notifications/deployment.yaml

109 lines
4.5 KiB
YAML
Raw Normal View History

{{- if .Values.notifications.enabled }}
feat(argo-cd): Update to use v2.3.1 release (#1162) * feat(argo-cd): Update to use v2.3.1 release Signed-off-by: mikeeq <miotk.mikolaj@gmail.com> * Move applicationSet.* and notifications.* to a dedicated location Signed-off-by: Marco Kilchhofer <mkilchhofer@users.noreply.github.com> * Fix typo in deployment.yaml Signed-off-by: mikeeq <miotk.mikolaj@gmail.com> * Fix notifications bot deployment Signed-off-by: mikeeq <miotk.mikolaj@gmail.com> * Update README.md Signed-off-by: mikeeq <miotk.mikolaj@gmail.com> * Update README.md and fix slack bot image Signed-off-by: mikeeq <miotk.mikolaj@gmail.com> * Drop nameOverride for new components as we use the global one Signed-off-by: Marco Kilchhofer <mkilchhofer@users.noreply.github.com> * Drop "applicationSet.args.namespace" and "applicationSet.args.argocdRepoServer" Signed-off-by: Marco Kilchhofer <mkilchhofer@users.noreply.github.com> * Consistent use of volumes (gpg, tls, knownHosts, extra) Signed-off-by: Marco Kilchhofer <mkilchhofer@users.noreply.github.com> * Bump major chart version and place a note in teh Upgrading section Signed-off-by: Marco Kilchhofer <mkilchhofer@users.noreply.github.com> * Change "enableStatefulSet: true" as we are in a major release now Signed-off-by: Marco Kilchhofer <mkilchhofer@users.noreply.github.com> * Drop PSP of applicationSet Signed-off-by: Marco Kilchhofer <mkilchhofer@users.noreply.github.com> * Fix applicationset webhook-ingress Signed-off-by: Marco Kilchhofer <mkilchhofer@users.noreply.github.com> * Drop unused variables in values.yaml and README Signed-off-by: Marco Kilchhofer <mkilchhofer@users.noreply.github.com> * Also set namespace and argocd-repo-server args on notification-controller Signed-off-by: Marco Kilchhofer <mkilchhofer@users.noreply.github.com> * Consistent use of "Argo CD" instead of "ArgoCD" Signed-off-by: Marco Kilchhofer <mkilchhofer@users.noreply.github.com> * Trigger CI Signed-off-by: Marco Kilchhofer <mkilchhofer@users.noreply.github.com> Co-authored-by: Marco Kilchhofer <mkilchhofer@users.noreply.github.com>
2022-03-16 21:01:30 +00:00
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ template "argo-cd.notifications.fullname" . }}
labels:
{{- include "argo-cd.labels" (dict "context" . "component" .Values.notifications.name "name" .Values.notifications.name) | nindent 4 }}
app.kubernetes.io/version: {{ default (include "argo-cd.defaultTag" .) .Values.notifications.image.tag | quote }}
spec:
strategy:
{{- .Values.notifications.updateStrategy | toYaml | nindent 4 }}
selector:
matchLabels:
{{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.notifications.name) | nindent 6 }}
template:
metadata:
{{- if .Values.notifications.podAnnotations }}
annotations:
{{- range $key, $value := .Values.notifications.podAnnotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
labels:
{{- include "argo-cd.labels" (dict "context" . "component" .Values.notifications.name "name" .Values.notifications.name) | nindent 8 }}
app.kubernetes.io/version: {{ default (include "argo-cd.defaultTag" .) .Values.notifications.image.tag | quote }}
{{- with (mergeOverwrite (deepCopy .Values.global.podLabels) .Values.notifications.podLabels) }}
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- with .Values.notifications.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "argo-cd.notificationsServiceAccountName" . }}
{{- if .Values.notifications.securityContext }}
securityContext: {{- toYaml .Values.notifications.securityContext | nindent 8 }}
{{- end }}
containers:
- name: {{ .Values.notifications.name }}
image: {{ default .Values.global.image.repository .Values.notifications.image.repository }}:{{ default (include "argo-cd.defaultTag" .) .Values.notifications.image.tag }}
imagePullPolicy: {{ default .Values.global.image.imagePullPolicy .Values.notifications.image.imagePullPolicy }}
resources:
{{- toYaml .Values.notifications.resources | nindent 12 }}
command:
- argocd-notifications
- --loglevel={{ .Values.notifications.logLevel }}
{{- if .Values.notifications.metrics.enabled }}
- --metrics-port={{ .Values.notifications.metrics.port }}
{{- end }}
- --namespace={{ .Release.Namespace }}
- --argocd-repo-server={{ template "argo-cd.repoServer.fullname" . }}:{{ .Values.repoServer.service.port }}
- --secret-name={{ include "argo-cd.notifications.secretName" . }}
- --config-map-name={{ include "argo-cd.notifications.configMapName" . }}
{{- range .Values.notifications.extraArgs }}
- {{ . | squote }}
{{- end }}
workingDir: /app
ports:
{{- if .Values.notifications.metrics.enabled }}
- containerPort: {{ .Values.notifications.metrics.port }}
name: metrics
protocol: TCP
{{- end }}
{{- if .Values.notifications.containerSecurityContext }}
securityContext: {{- toYaml .Values.notifications.containerSecurityContext | nindent 12 }}
{{- end }}
{{- with .Values.notifications.extraEnv }}
env: {{ toYaml . | nindent 12 }}
{{- end }}
volumeMounts:
- name: tls-certs
mountPath: /app/config/tls
- name: argocd-repo-server-tls
mountPath: /app/config/reposerver/tls
{{- with .Values.notifications.extraVolumeMounts }}
{{- toYaml . | nindent 12 }}
{{- end }}
volumes:
- configMap:
name: argocd-tls-certs-cm
name: tls-certs
- name: argocd-repo-server-tls
secret:
items:
- key: tls.crt
path: tls.crt
- key: tls.key
path: tls.key
- key: ca.crt
path: ca.crt
optional: true
secretName: argocd-repo-server-tls
{{- with .Values.notifications.extraVolumes }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.notifications.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.notifications.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.notifications.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}