github.com/verrazzano/verrazzano@v1.7.0/platform-operator/thirdparty/charts/argo-cd/templates/argocd-notifications/deployment.yaml (about)

     1  {{- if .Values.notifications.enabled }}
     2  apiVersion: apps/v1
     3  kind: Deployment
     4  metadata:
     5    {{- with (mergeOverwrite (deepCopy .Values.global.deploymentAnnotations) .Values.notifications.deploymentAnnotations) }}
     6    annotations:
     7      {{- range $key, $value := . }}
     8      {{ $key }}: {{ $value | quote }}
     9      {{- end }}
    10    {{- end }}
    11    name: {{ include "argo-cd.notifications.fullname" . }}
    12    namespace: {{ .Release.Namespace | quote }}
    13    labels:
    14      {{- include "argo-cd.labels" (dict "context" . "component" .Values.notifications.name "name" .Values.notifications.name) | nindent 4 }}
    15  spec:
    16    replicas: 1
    17    revisionHistoryLimit: {{ .Values.global.revisionHistoryLimit }}
    18    {{- with include "argo-cd.strategy" (mergeOverwrite (deepCopy .Values.global.deploymentStrategy) .Values.notifications.deploymentStrategy) }}
    19    strategy:
    20      {{- trim . | nindent 4 }}
    21    {{- end }}
    22    selector:
    23      matchLabels:
    24        {{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.notifications.name) | nindent 6 }}
    25    template:
    26      metadata:
    27        {{- with (mergeOverwrite (deepCopy .Values.global.podAnnotations) .Values.notifications.podAnnotations) }}
    28        annotations:
    29          {{- range $key, $value := . }}
    30          {{ $key }}: {{ $value | quote }}
    31          {{- end }}
    32        {{- end }}
    33        labels:
    34          {{- include "argo-cd.labels" (dict "context" . "component" .Values.notifications.name "name" .Values.notifications.name) | nindent 8 }}
    35          {{- with (mergeOverwrite (deepCopy .Values.global.podLabels) .Values.notifications.podLabels) }}
    36            {{- toYaml . | nindent 8 }}
    37          {{- end }}
    38      spec:
    39        {{- with .Values.notifications.imagePullSecrets | default .Values.global.imagePullSecrets }}
    40        imagePullSecrets:
    41          {{- toYaml . | nindent 8 }}
    42        {{- end }}
    43        {{- with .Values.global.hostAliases }}
    44        hostAliases:
    45          {{- toYaml . | nindent 8 }}
    46        {{- end }}
    47        {{- with .Values.global.securityContext }}
    48        securityContext:
    49          {{- toYaml . | nindent 8 }}
    50        {{- end }}
    51        {{- with .Values.notifications.priorityClassName | default .Values.global.priorityClassName }}
    52        priorityClassName: {{ . }}
    53        {{- end }}
    54        serviceAccountName: {{ include "argo-cd.notificationsServiceAccountName" . }}
    55        containers:
    56          - name: {{ .Values.notifications.name }}
    57            image: {{ default .Values.global.image.repository .Values.notifications.image.repository }}:{{ default (include "argo-cd.defaultTag" .) .Values.notifications.image.tag }}
    58            imagePullPolicy: {{ default .Values.global.image.imagePullPolicy .Values.notifications.image.imagePullPolicy }}
    59            args:
    60              - /usr/local/bin/argocd-notifications
    61              - --metrics-port={{ .Values.notifications.containerPorts.metrics }}
    62              - --loglevel={{ default .Values.global.logging.level .Values.notifications.logLevel }}
    63              - --logformat={{ default .Values.global.logging.format .Values.notifications.logFormat }}
    64              - --namespace={{ .Release.Namespace }}
    65              - --argocd-repo-server={{ template "argo-cd.repoServer.fullname" . }}:{{ .Values.repoServer.service.port }}
    66              {{- range .Values.notifications.extraArgs }}
    67              - {{ . | squote }}
    68              {{- end }}
    69            env:
    70              {{- with (concat .Values.global.env .Values.notifications.extraEnv) }}
    71                {{- toYaml . | nindent 12 }}
    72              {{- end }}
    73              - name: ARGOCD_NOTIFICATIONS_CONTROLLER_LOGLEVEL
    74                valueFrom:
    75                  configMapKeyRef:
    76                    key: notificationscontroller.log.level
    77                    name: argocd-cmd-params-cm
    78                    optional: true              
    79              - name: ARGOCD_NOTIFICATIONS_CONTROLLER_LOGFORMAT
    80                valueFrom:
    81                  configMapKeyRef:
    82                    key: notificationscontroller.log.format
    83                    name: argocd-cmd-params-cm
    84                    optional: true
    85            {{- with .Values.notifications.extraEnvFrom }}
    86            envFrom:
    87              {{- toYaml . | nindent 12 }}
    88            {{- end }}
    89            ports:
    90            - name: metrics
    91              containerPort: {{ .Values.notifications.containerPorts.metrics }}
    92              protocol: TCP
    93            resources:
    94              {{- toYaml .Values.notifications.resources | nindent 12 }}
    95            {{- with .Values.notifications.containerSecurityContext }}
    96            securityContext:
    97              {{- toYaml . | nindent 12 }}
    98            {{- end }}
    99            workingDir: /app
   100            volumeMounts:
   101              - name: tls-certs
   102                mountPath: /app/config/tls
   103              - name: argocd-repo-server-tls
   104                mountPath: /app/config/reposerver/tls
   105              {{- with .Values.notifications.extraVolumeMounts }}
   106                {{- toYaml . | nindent 12 }}
   107              {{- end }}
   108          {{- with .Values.notifications.extraContainers }}
   109            {{- tpl (toYaml . ) $ | nindent 8 }}
   110          {{- end }}
   111        {{- with .Values.notifications.initContainers }}
   112        initContainers:
   113          {{- tpl (toYaml . ) $ | nindent 8 }}
   114        {{- end }}
   115        {{- with include "argo-cd.affinity" (dict "context" . "component" .Values.notifications) }}
   116        affinity:
   117          {{- trim . | nindent 8 }}
   118        {{- end }}
   119        {{- with .Values.notifications.nodeSelector | default .Values.global.nodeSelector }}
   120        nodeSelector:
   121          {{- toYaml . | nindent 8 }}
   122        {{- end }}
   123        {{- with .Values.notifications.tolerations | default .Values.global.tolerations }}
   124        tolerations:
   125          {{- toYaml . | nindent 8 }}
   126        {{- end }}
   127        {{- with .Values.notifications.topologySpreadConstraints | default .Values.global.topologySpreadConstraints }}
   128        topologySpreadConstraints:
   129          {{- range $constraint := . }}
   130        - {{ toYaml $constraint | nindent 8 | trim }}
   131            {{- if not $constraint.labelSelector }}
   132          labelSelector:
   133            matchLabels:
   134              {{- include "argo-cd.selectorLabels" (dict "context" $ "name" $.Values.notifications.name) | nindent 12 }}
   135            {{- end }}
   136          {{- end }}
   137        {{- end }}
   138        volumes:
   139          {{- with .Values.notifications.extraVolumes }}
   140            {{- toYaml . | nindent 8 }}
   141          {{- end }}
   142          - name: tls-certs
   143            configMap:
   144              name: argocd-tls-certs-cm
   145          - name: argocd-repo-server-tls
   146            secret:
   147              secretName: argocd-repo-server-tls
   148              optional: true
   149              items:
   150              - key: tls.crt
   151                path: tls.crt
   152              - key: tls.key
   153                path: tls.key
   154              - key: ca.crt
   155                path: ca.crt
   156        {{- with .Values.notifications.dnsConfig }}
   157        dnsConfig:
   158          {{- toYaml . | nindent 8 }}
   159        {{- end }}
   160        dnsPolicy: {{ .Values.notifications.dnsPolicy }}
   161  {{- end }}