118 lines
4.6 KiB
YAML
118 lines
4.6 KiB
YAML
{{- if .Values.notifications.enabled }}
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
{{- with (mergeOverwrite (deepCopy .Values.global.deploymentAnnotations) .Values.notifications.deploymentAnnotations) }}
|
|
annotations:
|
|
{{- range $key, $value := . }}
|
|
{{ $key }}: {{ $value | quote }}
|
|
{{- end }}
|
|
{{- end }}
|
|
name: {{ include "argo-cd.notifications.fullname" . }}
|
|
labels:
|
|
{{- include "argo-cd.labels" (dict "context" . "component" .Values.notifications.name "name" .Values.notifications.name) | nindent 4 }}
|
|
spec:
|
|
replicas: 1
|
|
revisionHistoryLimit: {{ .Values.global.revisionHistoryLimit }}
|
|
strategy:
|
|
type: Recreate
|
|
selector:
|
|
matchLabels:
|
|
{{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.notifications.name) | nindent 6 }}
|
|
template:
|
|
metadata:
|
|
{{- with (mergeOverwrite (deepCopy .Values.global.podAnnotations) .Values.notifications.podAnnotations) }}
|
|
annotations:
|
|
{{- range $key, $value := . }}
|
|
{{ $key }}: {{ $value | quote }}
|
|
{{- end }}
|
|
{{- end }}
|
|
labels:
|
|
{{- include "argo-cd.labels" (dict "context" . "component" .Values.notifications.name "name" .Values.notifications.name) | nindent 8 }}
|
|
{{- with (mergeOverwrite (deepCopy .Values.global.podLabels) .Values.notifications.podLabels) }}
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
spec:
|
|
{{- with .Values.notifications.imagePullSecrets | default .Values.global.imagePullSecrets }}
|
|
imagePullSecrets:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.global.securityContext }}
|
|
securityContext:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
serviceAccountName: {{ include "argo-cd.notificationsServiceAccountName" . }}
|
|
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 }}
|
|
command:
|
|
- argocd-notifications
|
|
- --loglevel={{ default .Values.global.logging.level .Values.notifications.logLevel }}
|
|
- --logformat={{ default .Values.global.logging.format .Values.notifications.logFormat }}
|
|
- --metrics-port={{ .Values.notifications.metrics.port }}
|
|
- --namespace={{ .Release.Namespace }}
|
|
- --argocd-repo-server={{ template "argo-cd.repoServer.fullname" . }}:{{ .Values.repoServer.service.port }}
|
|
{{- range .Values.notifications.extraArgs }}
|
|
- {{ . | squote }}
|
|
{{- end }}
|
|
{{- with .Values.notifications.extraEnv }}
|
|
env:
|
|
{{- toYaml . | nindent 12 }}
|
|
{{- end }}
|
|
{{- with .Values.notifications.extraEnvFrom }}
|
|
envFrom:
|
|
{{- toYaml . | nindent 12 }}
|
|
{{- end }}
|
|
ports:
|
|
- name: metrics
|
|
containerPort: {{ .Values.notifications.metrics.port }}
|
|
protocol: TCP
|
|
resources:
|
|
{{- toYaml .Values.notifications.resources | nindent 12 }}
|
|
securityContext:
|
|
{{- toYaml .Values.notifications.containerSecurityContext | nindent 12 }}
|
|
workingDir: /app
|
|
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 }}
|
|
{{- with .Values.notifications.priorityClassName }}
|
|
priorityClassName: {{ . }}
|
|
{{- end }}
|
|
{{- end }}
|