github.com/verrazzano/verrazzano@v1.7.0/platform-operator/thirdparty/charts/argo-cd/templates/argocd-applicationset/deployment.yaml (about) 1 {{- if .Values.applicationSet.enabled }} 2 apiVersion: apps/v1 3 kind: Deployment 4 metadata: 5 {{- with (mergeOverwrite (deepCopy .Values.global.deploymentAnnotations) .Values.applicationSet.deploymentAnnotations) }} 6 annotations: 7 {{- range $key, $value := . }} 8 {{ $key }}: {{ $value | quote }} 9 {{- end }} 10 {{- end }} 11 name: {{ include "argo-cd.applicationSet.fullname" . }} 12 namespace: {{ .Release.Namespace | quote }} 13 labels: 14 {{- include "argo-cd.labels" (dict "context" . "component" .Values.applicationSet.name "name" .Values.applicationSet.name) | nindent 4 }} 15 spec: 16 {{- with include "argo-cd.strategy" (mergeOverwrite (deepCopy .Values.global.deploymentStrategy) .Values.applicationSet.deploymentStrategy) }} 17 strategy: 18 {{- trim . | nindent 4 }} 19 {{- end }} 20 replicas: {{ .Values.applicationSet.replicas | default .Values.applicationSet.replicaCount }} 21 revisionHistoryLimit: {{ .Values.global.revisionHistoryLimit }} 22 selector: 23 matchLabels: 24 {{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.applicationSet.name) | nindent 6 }} 25 template: 26 metadata: 27 annotations: 28 checksum/cmd-params: {{ include (print $.Template.BasePath "/argocd-configs/argocd-cmd-params-cm.yaml") . | sha256sum }} 29 {{- with (mergeOverwrite (deepCopy .Values.global.podAnnotations) .Values.applicationSet.podAnnotations) }} 30 {{- range $key, $value := . }} 31 {{ $key }}: {{ $value | quote }} 32 {{- end }} 33 {{- end }} 34 labels: 35 {{- include "argo-cd.labels" (dict "context" . "component" .Values.applicationSet.name "name" .Values.applicationSet.name) | nindent 8 }} 36 {{- with (mergeOverwrite (deepCopy .Values.global.podLabels) .Values.applicationSet.podLabels) }} 37 {{- toYaml . | nindent 8 }} 38 {{- end }} 39 spec: 40 {{- with .Values.applicationSet.imagePullSecrets | default .Values.global.imagePullSecrets }} 41 imagePullSecrets: 42 {{- toYaml . | nindent 8 }} 43 {{- end }} 44 {{- with .Values.global.hostAliases }} 45 hostAliases: 46 {{- toYaml . | nindent 8 }} 47 {{- end }} 48 {{- with .Values.global.securityContext }} 49 securityContext: 50 {{- toYaml . | nindent 8 }} 51 {{- end }} 52 {{- with .Values.applicationSet.priorityClassName | default .Values.global.priorityClassName }} 53 priorityClassName: {{ . }} 54 {{- end }} 55 serviceAccountName: {{ include "argo-cd.applicationSetServiceAccountName" . }} 56 containers: 57 - name: {{ .Values.applicationSet.name }} 58 image: {{ default .Values.global.image.repository .Values.applicationSet.image.repository }}:{{ default (include "argo-cd.defaultTag" .) .Values.applicationSet.image.tag }} 59 imagePullPolicy: {{ default .Values.global.image.imagePullPolicy .Values.applicationSet.image.imagePullPolicy }} 60 args: 61 - /usr/local/bin/argocd-applicationset-controller 62 - --metrics-addr=:{{ .Values.applicationSet.containerPorts.metrics }} 63 - --probe-addr=:{{ .Values.applicationSet.containerPorts.probe }} 64 - --webhook-addr=:{{ .Values.applicationSet.containerPorts.webhook }} 65 {{- with .Values.applicationSet.args.policy }} 66 - --policy={{ . }} 67 {{- end }} 68 {{- with .Values.applicationSet.args.dryRun }} 69 - --dry-run={{ . }} 70 {{- end }} 71 {{- with .Values.applicationSet.logFormat }} 72 - --logformat 73 - {{ . }} 74 {{- end }} 75 {{- with .Values.applicationSet.logLevel }} 76 - --loglevel 77 - {{ . }} 78 {{- end }} 79 {{- with .Values.applicationSet.extraArgs }} 80 {{- toYaml . | nindent 12 }} 81 {{- end }} 82 env: 83 {{- with (concat .Values.global.env .Values.applicationSet.extraEnv) }} 84 {{- toYaml . | nindent 12 }} 85 {{- end }} 86 - name: NAMESPACE 87 valueFrom: 88 fieldRef: 89 fieldPath: metadata.namespace 90 - name: ARGOCD_APPLICATIONSET_CONTROLLER_ENABLE_LEADER_ELECTION 91 valueFrom: 92 configMapKeyRef: 93 key: applicationsetcontroller.enable.leader.election 94 name: argocd-cmd-params-cm 95 optional: true 96 - name: ARGOCD_APPLICATIONSET_CONTROLLER_REPO_SERVER 97 valueFrom: 98 configMapKeyRef: 99 key: repo.server 100 name: argocd-cmd-params-cm 101 optional: true 102 - name: ARGOCD_APPLICATIONSET_CONTROLLER_POLICY 103 valueFrom: 104 configMapKeyRef: 105 key: applicationsetcontroller.policy 106 name: argocd-cmd-params-cm 107 optional: true 108 - name: ARGOCD_APPLICATIONSET_CONTROLLER_ENABLE_POLICY_OVERRIDE 109 valueFrom: 110 configMapKeyRef: 111 key: applicationsetcontroller.enable.policy.override 112 name: argocd-cmd-params-cm 113 optional: true 114 - name: ARGOCD_APPLICATIONSET_CONTROLLER_DEBUG 115 valueFrom: 116 configMapKeyRef: 117 key: applicationsetcontroller.debug 118 name: argocd-cmd-params-cm 119 optional: true 120 - name: ARGOCD_APPLICATIONSET_CONTROLLER_LOGFORMAT 121 valueFrom: 122 configMapKeyRef: 123 key: applicationsetcontroller.log.format 124 name: argocd-cmd-params-cm 125 optional: true 126 - name: ARGOCD_APPLICATIONSET_CONTROLLER_LOGLEVEL 127 valueFrom: 128 configMapKeyRef: 129 key: applicationsetcontroller.log.level 130 name: argocd-cmd-params-cm 131 optional: true 132 - name: ARGOCD_APPLICATIONSET_CONTROLLER_DRY_RUN 133 valueFrom: 134 configMapKeyRef: 135 key: applicationsetcontroller.dryrun 136 name: argocd-cmd-params-cm 137 optional: true 138 - name: ARGOCD_GIT_MODULES_ENABLED 139 valueFrom: 140 configMapKeyRef: 141 key: applicationsetcontroller.enable.git.submodule 142 name: argocd-cmd-params-cm 143 optional: true 144 - name: ARGOCD_APPLICATIONSET_CONTROLLER_ENABLE_PROGRESSIVE_SYNCS 145 valueFrom: 146 configMapKeyRef: 147 key: applicationsetcontroller.enable.progressive.syncs 148 name: argocd-cmd-params-cm 149 optional: true 150 - name: ARGOCD_APPLICATIONSET_CONTROLLER_ENABLE_NEW_GIT_FILE_GLOBBING 151 valueFrom: 152 configMapKeyRef: 153 key: applicationsetcontroller.enable.new.git.file.globbing 154 name: argocd-cmd-params-cm 155 optional: true 156 - name: ARGOCD_APPLICATIONSET_CONTROLLER_REPO_SERVER_PLAINTEXT 157 valueFrom: 158 configMapKeyRef: 159 name: argocd-cmd-params-cm 160 key: applicationsetcontroller.repo.server.plaintext 161 optional: true 162 - name: ARGOCD_APPLICATIONSET_CONTROLLER_REPO_SERVER_STRICT_TLS 163 valueFrom: 164 configMapKeyRef: 165 name: argocd-cmd-params-cm 166 key: applicationsetcontroller.repo.server.strict.tls 167 optional: true 168 - name: ARGOCD_APPLICATIONSET_CONTROLLER_REPO_SERVER_TIMEOUT_SECONDS 169 valueFrom: 170 configMapKeyRef: 171 name: argocd-cmd-params-cm 172 key: applicationsetcontroller.repo.server.timeout.seconds 173 optional: true 174 - name: ARGOCD_APPLICATIONSET_CONTROLLER_CONCURRENT_RECONCILIATIONS 175 valueFrom: 176 configMapKeyRef: 177 name: argocd-cmd-params-cm 178 key: applicationsetcontroller.concurrent.reconciliations.max 179 optional: true 180 - name: ARGOCD_APPLICATIONSET_CONTROLLER_NAMESPACES 181 valueFrom: 182 configMapKeyRef: 183 key: applicationsetcontroller.namespaces 184 name: argocd-cmd-params-cm 185 optional: true 186 - name: ARGOCD_APPLICATIONSET_CONTROLLER_SCM_ROOT_CA_PATH 187 valueFrom: 188 configMapKeyRef: 189 key: applicationsetcontroller.scm.root.ca.path 190 name: argocd-cmd-params-cm 191 optional: true 192 - name: ARGOCD_APPLICATIONSET_CONTROLLER_ALLOWED_SCM_PROVIDERS 193 valueFrom: 194 configMapKeyRef: 195 name: argocd-cmd-params-cm 196 key: applicationsetcontroller.allowed.scm.providers 197 optional: true 198 {{- with .Values.applicationSet.extraEnvFrom }} 199 envFrom: 200 {{- toYaml . | nindent 12 }} 201 {{- end }} 202 ports: 203 - name: metrics 204 containerPort: {{ .Values.applicationSet.containerPorts.metrics }} 205 protocol: TCP 206 - name: probe 207 containerPort: {{ .Values.applicationSet.containerPorts.probe }} 208 protocol: TCP 209 - name: webhook 210 containerPort: {{ .Values.applicationSet.containerPorts.webhook }} 211 protocol: TCP 212 {{- if .Values.applicationSet.livenessProbe.enabled }} 213 livenessProbe: 214 tcpSocket: 215 port: probe 216 initialDelaySeconds: {{ .Values.applicationSet.livenessProbe.initialDelaySeconds }} 217 periodSeconds: {{ .Values.applicationSet.livenessProbe.periodSeconds }} 218 timeoutSeconds: {{ .Values.applicationSet.livenessProbe.timeoutSeconds }} 219 successThreshold: {{ .Values.applicationSet.livenessProbe.successThreshold }} 220 failureThreshold: {{ .Values.applicationSet.livenessProbe.failureThreshold }} 221 {{- end }} 222 {{- if .Values.applicationSet.readinessProbe.enabled }} 223 readinessProbe: 224 tcpSocket: 225 port: probe 226 initialDelaySeconds: {{ .Values.applicationSet.readinessProbe.initialDelaySeconds }} 227 periodSeconds: {{ .Values.applicationSet.readinessProbe.periodSeconds }} 228 timeoutSeconds: {{ .Values.applicationSet.readinessProbe.timeoutSeconds }} 229 successThreshold: {{ .Values.applicationSet.readinessProbe.successThreshold }} 230 failureThreshold: {{ .Values.applicationSet.readinessProbe.failureThreshold }} 231 {{- end }} 232 resources: 233 {{- toYaml .Values.applicationSet.resources | nindent 12 }} 234 {{- with .Values.applicationSet.containerSecurityContext }} 235 securityContext: 236 {{- toYaml . | nindent 12 }} 237 {{- end }} 238 volumeMounts: 239 {{- with .Values.applicationSet.extraVolumeMounts }} 240 {{- toYaml . | nindent 12 }} 241 {{- end }} 242 - mountPath: /app/config/ssh 243 name: ssh-known-hosts 244 - mountPath: /app/config/tls 245 name: tls-certs 246 - mountPath: /app/config/gpg/source 247 name: gpg-keys 248 - mountPath: /app/config/gpg/keys 249 name: gpg-keyring 250 - mountPath: /app/config/reposerver/tls 251 name: argocd-repo-server-tls 252 - mountPath: /tmp 253 name: tmp 254 {{- with .Values.applicationSet.extraContainers }} 255 {{- tpl (toYaml .) $ | nindent 8 }} 256 {{- end }} 257 {{- with .Values.applicationSet.initContainers }} 258 initContainers: 259 {{- tpl (toYaml .) $ | nindent 6 }} 260 {{- end }} 261 {{- with include "argo-cd.affinity" (dict "context" . "component" .Values.applicationSet) }} 262 affinity: 263 {{- trim . | nindent 8 }} 264 {{- end }} 265 {{- with .Values.applicationSet.nodeSelector | default .Values.global.nodeSelector }} 266 nodeSelector: 267 {{- toYaml . | nindent 8 }} 268 {{- end }} 269 {{- with .Values.applicationSet.tolerations | default .Values.global.tolerations }} 270 tolerations: 271 {{- toYaml . | nindent 8 }} 272 {{- end }} 273 {{- with .Values.applicationSet.topologySpreadConstraints | default .Values.global.topologySpreadConstraints }} 274 topologySpreadConstraints: 275 {{- range $constraint := . }} 276 - {{ toYaml $constraint | nindent 8 | trim }} 277 {{- if not $constraint.labelSelector }} 278 labelSelector: 279 matchLabels: 280 {{- include "argo-cd.selectorLabels" (dict "context" $ "name" $.Values.applicationSet.name) | nindent 12 }} 281 {{- end }} 282 {{- end }} 283 {{- end }} 284 volumes: 285 {{- with .Values.applicationSet.extraVolumes }} 286 {{- toYaml . | nindent 8 }} 287 {{- end }} 288 - name: ssh-known-hosts 289 configMap: 290 name: argocd-ssh-known-hosts-cm 291 - name: tls-certs 292 configMap: 293 name: argocd-tls-certs-cm 294 - name: gpg-keys 295 configMap: 296 name: argocd-gpg-keys-cm 297 - name: gpg-keyring 298 emptyDir: {} 299 - name: tmp 300 emptyDir: {} 301 - name: argocd-repo-server-tls 302 secret: 303 secretName: argocd-repo-server-tls 304 optional: true 305 items: 306 - key: tls.crt 307 path: tls.crt 308 - key: tls.key 309 path: tls.key 310 - key: ca.crt 311 path: ca.crt 312 {{- with .Values.applicationSet.dnsConfig }} 313 dnsConfig: 314 {{- toYaml . | nindent 8 }} 315 {{- end }} 316 dnsPolicy: {{ .Values.applicationSet.dnsPolicy }} 317 {{- end }}