2020-04-09 16:31:13 +00:00
|
|
|
{{- $redisHa := (index .Values "redis-ha") -}}
|
2019-11-05 00:17:25 +00:00
|
|
|
apiVersion: apps/v1
|
2020-12-15 06:15:13 +00:00
|
|
|
kind: {{ .Values.controller.enableStatefulSet | ternary "StatefulSet" "Deployment" }}
|
2019-11-05 00:17:25 +00:00
|
|
|
metadata:
|
|
|
|
name: {{ template "argo-cd.controller.fullname" . }}
|
|
|
|
labels:
|
2021-03-22 20:15:37 +00:00
|
|
|
{{- include "argo-cd.labels" (dict "context" . "component" .Values.controller.name "name" .Values.controller.name) | nindent 4 }}
|
2021-10-21 20:55:34 +00:00
|
|
|
app.kubernetes.io/version: {{ default (include "argo-cd.defaultTag" .) .Values.controller.image.tag | quote }}
|
2019-11-05 00:17:25 +00:00
|
|
|
spec:
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
2021-03-22 20:15:37 +00:00
|
|
|
{{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.controller.name) | nindent 6 }}
|
2020-12-15 06:15:13 +00:00
|
|
|
{{- if .Values.controller.enableStatefulSet }}
|
|
|
|
serviceName: {{ template "argo-cd.controller.fullname" . }}
|
|
|
|
{{- end }}
|
2019-11-05 00:17:25 +00:00
|
|
|
revisionHistoryLimit: 5
|
2020-11-24 01:29:19 +00:00
|
|
|
replicas: {{ .Values.controller.replicas }}
|
2019-11-05 00:17:25 +00:00
|
|
|
template:
|
|
|
|
metadata:
|
2021-09-15 10:30:54 +00:00
|
|
|
{{- with (mergeOverwrite (deepCopy .Values.global.podAnnotations) .Values.controller.podAnnotations) }}
|
2019-11-05 00:17:25 +00:00
|
|
|
annotations:
|
2021-08-24 12:48:03 +00:00
|
|
|
{{- toYaml . | nindent 8 }}
|
2019-11-05 00:17:25 +00:00
|
|
|
{{- end }}
|
|
|
|
labels:
|
2021-03-22 20:15:37 +00:00
|
|
|
{{- include "argo-cd.labels" (dict "context" . "component" .Values.controller.name "name" .Values.controller.name) | nindent 8 }}
|
2021-10-21 20:55:34 +00:00
|
|
|
app.kubernetes.io/version: {{ default (include "argo-cd.defaultTag" .) .Values.controller.image.tag | quote }}
|
2021-09-15 10:30:54 +00:00
|
|
|
{{- with (mergeOverwrite (deepCopy .Values.global.podLabels) .Values.controller.podLabels) }}
|
2021-08-24 12:48:03 +00:00
|
|
|
{{- toYaml . | nindent 8 }}
|
2019-11-05 00:17:25 +00:00
|
|
|
{{- end }}
|
|
|
|
spec:
|
2020-03-06 10:26:18 +00:00
|
|
|
{{- with .Values.global.imagePullSecrets }}
|
|
|
|
imagePullSecrets:
|
|
|
|
{{- toYaml . | nindent 8 }}
|
|
|
|
{{- end }}
|
2019-12-16 02:55:09 +00:00
|
|
|
{{- if .Values.global.securityContext }}
|
|
|
|
securityContext: {{- toYaml .Values.global.securityContext | nindent 8 }}
|
|
|
|
{{- end }}
|
2019-11-05 00:17:25 +00:00
|
|
|
containers:
|
|
|
|
- command:
|
|
|
|
- argocd-application-controller
|
|
|
|
- --status-processors
|
|
|
|
- {{ .Values.controller.args.statusProcessors | quote }}
|
|
|
|
- --operation-processors
|
|
|
|
- {{ .Values.controller.args.operationProcessors | quote }}
|
2020-07-12 16:49:45 +00:00
|
|
|
- --app-resync
|
|
|
|
- {{ .Values.controller.args.appResyncPeriod | quote }}
|
2021-03-09 18:03:26 +00:00
|
|
|
- --self-heal-timeout-seconds
|
|
|
|
- {{ .Values.controller.args.selfHealTimeout | quote }}
|
2019-11-05 00:17:25 +00:00
|
|
|
- --repo-server
|
|
|
|
- {{ template "argo-cd.repoServer.fullname" . }}:{{ .Values.repoServer.service.port }}
|
2021-08-26 13:42:47 +00:00
|
|
|
- --repo-server-timeout-seconds
|
|
|
|
- {{ .Values.controller.args.repoServerTimeoutSeconds | quote }}
|
2020-10-02 03:12:35 +00:00
|
|
|
- --logformat
|
|
|
|
- {{ .Values.controller.logFormat }}
|
2019-11-05 00:17:25 +00:00
|
|
|
- --loglevel
|
|
|
|
- {{ .Values.controller.logLevel }}
|
2021-11-24 16:30:09 +00:00
|
|
|
{{- if .Values.controller.metrics.applicationLabels.enabled }}
|
|
|
|
- --metrics-application-labels
|
|
|
|
{{- range .Values.controller.metrics.applicationLabels.labels }}
|
|
|
|
- {{- toYaml . | nindent 8 }}
|
|
|
|
{{- end }}
|
|
|
|
{{- end }}
|
2020-04-09 16:31:13 +00:00
|
|
|
{{- if or (and .Values.redis.enabled (not $redisHa.enabled)) (and $redisHa.enabled $redisHa.haproxy.enabled) }}
|
2019-11-05 00:17:25 +00:00
|
|
|
- --redis
|
|
|
|
- {{ template "argo-cd.redis.fullname" . }}:{{ .Values.redis.servicePort }}
|
|
|
|
{{- end }}
|
feat: extraArgs allows same flag multiple times (#265)
* feat: extraArgs allows same flag multiple times
Superseeds #244 (I messed up the rebase :facepalm:)
Relates to #232
This change allows ArgoCD chart to render multiple times the same flag with different values
Mainly, if not only, used to specify multiple Redis Sentinel addresses
https://github.com/argoproj/argo-cd/blob/5ec5aeb002cfc9167dba0fb77e7a08a2dc0932cf/manifests/ha/base/overlays/argocd-application-controller-deployment.yaml#L16
https://github.com/argoproj/argo-cd/blob/aeb48b0a69be764f381511f7749d1e094fc79225/util/cache/cache.go#L33
```
--sentinel
```
using this syntax
```
controller:
extraArgs:
- --sentinel
- argocd-redis-ha-announce-0
- --sentinel
- argocd-redis-ha-announce-1
- --sentinel
- argocd-redis-ha-announce-2
```
instead of
```
controller:
extraArgs:
sentinel=argocd-redis-ha-announce-0:
sentinel=argocd-redis-ha-announce-1:
sentinel=argocd-redis-ha-announce-2:
```
Basically same syntax as the flags documentation
```
docker run --rm argoproj/argocd:v1.4.2 argocd-server help
...
Flags:
--app-state-cache-expiration duration Cache expiration for app state (default 1h0m0s)
--as string Username to impersonate for the operation
--as-group stringArray Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--basehref string Value for base href in index.html. Used if Argo CD is running behind reverse proxy under subpath different from / (default "/")
--certificate-authority string Path to a cert file for the certificate authority
--client-certificate string Path to a client certificate file for TLS
--client-key string Path to a client key file for TLS
--cluster string The name of the kubeconfig cluster to use
--connection-status-cache-expiration duration Cache expiration for cluster/repo connection status (default 1h0m0s)
--context string The name of the kubeconfig context to use
--default-cache-expiration duration Cache expiration default (default 24h0m0s)
--dex-server string Dex server address (default "http://argocd-dex-server:5556")
--disable-auth Disable client authentication
--gloglevel int Set the glog logging level
-h, --help help for argocd-server
--insecure Run server without TLS
--insecure-skip-tls-verify If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure
--kubeconfig string Path to a kube config. Only required if out-of-cluster
--loglevel string Set the logging level. One of: debug|info|warn|error (default "info")
--metrics-port int Start metrics on given port (default 8083)
-n, --namespace string If present, the namespace scope for this CLI request
--oidc-cache-expiration duration Cache expiration for OIDC state (default 3m0s)
--password string Password for basic authentication to the API server
--port int Listen on given port (default 8080)
--redis string Redis server hostname and port (e.g. argocd-redis:6379).
--redisdb int Redis database.
--repo-server string Repo server address (default "argocd-repo-server:8081")
--repo-server-timeout-seconds int Repo server RPC call timeout seconds. (default 60)
--request-timeout string The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests. (default "0")
--sentinel stringArray Redis sentinel hostname and port (e.g. argocd-redis-ha-announce-0:6379).
--sentinelmaster string Redis sentinel master group name. (default "master")
--server string The address and port of the Kubernetes API server
--staticassets string Static assets directory path
--tlsmaxversion string The maximum SSL/TLS version that is acceptable (one of: 1.0|1.1|1.2)
--tlsminversion string The minimum SSL/TLS version that is acceptable (one of: 1.0|1.1|1.2)
--token string Bearer token for authentication to the API server
--user string The name of the kubeconfig user to use
--username string Username for basic authentication to the API server
--x-frame-options value Set X-Frame-Options header in HTTP responses to value. To disable, set to "". (default "sameorigin")
```
Signed-off-by: Carlos Juan Gómez Peñalver <carlosjuangp@gmail.com>
* fix: bump up chart version
2020-03-19 18:55:16 +00:00
|
|
|
{{- with .Values.controller.extraArgs }}
|
|
|
|
{{- . | toYaml | nindent 8 }}
|
2019-11-05 00:17:25 +00:00
|
|
|
{{- end }}
|
2021-10-21 20:55:34 +00:00
|
|
|
image: {{ default .Values.global.image.repository .Values.controller.image.repository }}:{{ default (include "argo-cd.defaultTag" .) .Values.controller.image.tag }}
|
2019-11-05 00:17:25 +00:00
|
|
|
imagePullPolicy: {{ default .Values.global.image.imagePullPolicy .Values.controller.image.imagePullPolicy }}
|
|
|
|
name: {{ .Values.controller.name }}
|
2020-01-13 05:18:35 +00:00
|
|
|
{{- if .Values.controller.containerSecurityContext }}
|
|
|
|
securityContext: {{- toYaml .Values.controller.containerSecurityContext | nindent 10 }}
|
2020-02-17 00:14:39 +00:00
|
|
|
{{- end }}
|
2019-12-05 23:50:47 +00:00
|
|
|
{{- if .Values.controller.env }}
|
|
|
|
env:
|
|
|
|
{{- toYaml .Values.controller.env | nindent 8 }}
|
2021-05-21 16:43:24 +00:00
|
|
|
{{- end }}
|
|
|
|
{{- with .Values.controller.envFrom }}
|
|
|
|
envFrom: {{- toYaml . | nindent 8 }}
|
2019-12-05 23:50:47 +00:00
|
|
|
{{- end }}
|
2019-11-05 00:17:25 +00:00
|
|
|
ports:
|
|
|
|
- name: controller
|
|
|
|
containerPort: {{ .Values.controller.containerPort }}
|
|
|
|
protocol: TCP
|
|
|
|
livenessProbe:
|
|
|
|
httpGet:
|
|
|
|
path: /healthz
|
|
|
|
port: {{ .Values.controller.containerPort }}
|
|
|
|
initialDelaySeconds: {{ .Values.controller.livenessProbe.initialDelaySeconds }}
|
|
|
|
periodSeconds: {{ .Values.controller.livenessProbe.periodSeconds }}
|
|
|
|
timeoutSeconds: {{ .Values.controller.livenessProbe.timeoutSeconds }}
|
|
|
|
successThreshold: {{ .Values.controller.livenessProbe.successThreshold }}
|
|
|
|
failureThreshold: {{ .Values.controller.livenessProbe.failureThreshold }}
|
|
|
|
readinessProbe:
|
|
|
|
tcpSocket:
|
|
|
|
port: {{ .Values.controller.containerPort }}
|
|
|
|
initialDelaySeconds: {{ .Values.controller.readinessProbe.initialDelaySeconds }}
|
|
|
|
periodSeconds: {{ .Values.controller.readinessProbe.periodSeconds }}
|
|
|
|
timeoutSeconds: {{ .Values.controller.readinessProbe.timeoutSeconds }}
|
|
|
|
successThreshold: {{ .Values.controller.readinessProbe.successThreshold }}
|
|
|
|
failureThreshold: {{ .Values.controller.readinessProbe.failureThreshold }}
|
2021-08-26 13:42:47 +00:00
|
|
|
workingDir: /home/argocd
|
2019-11-05 00:17:25 +00:00
|
|
|
volumeMounts:
|
2021-08-26 13:42:47 +00:00
|
|
|
- name: argocd-home
|
|
|
|
mountPath: /home/argocd
|
2021-04-24 10:50:25 +00:00
|
|
|
- mountPath: /app/config/controller/tls
|
|
|
|
name: argocd-repo-server-tls
|
2021-05-17 05:40:38 +00:00
|
|
|
{{- with .Values.controller.volumeMounts }}
|
|
|
|
{{- toYaml . | nindent 8 }}
|
|
|
|
{{- end }}
|
2019-11-05 00:17:25 +00:00
|
|
|
resources:
|
2021-09-16 17:59:20 +00:00
|
|
|
{{- toYaml .Values.controller.resources | nindent 10 }}
|
|
|
|
{{- with .Values.controller.extraContainers }}
|
|
|
|
{{- toYaml . | nindent 6 }}
|
|
|
|
{{- end }}
|
2019-11-05 00:17:25 +00:00
|
|
|
{{- if .Values.controller.nodeSelector }}
|
|
|
|
nodeSelector:
|
|
|
|
{{- toYaml .Values.controller.nodeSelector | nindent 8 }}
|
|
|
|
{{- end }}
|
|
|
|
{{- if .Values.controller.tolerations }}
|
|
|
|
tolerations:
|
|
|
|
{{- toYaml .Values.controller.tolerations | nindent 8 }}
|
|
|
|
{{- end }}
|
|
|
|
{{- if .Values.controller.affinity }}
|
|
|
|
affinity:
|
|
|
|
{{- toYaml .Values.controller.affinity | nindent 8 }}
|
2021-09-17 13:57:26 +00:00
|
|
|
{{- end }}
|
|
|
|
{{- with .Values.controller.topologySpreadConstraints }}
|
|
|
|
topologySpreadConstraints:
|
|
|
|
{{- range $constraint := . }}
|
|
|
|
- {{ toYaml $constraint | nindent 8 | trim }}
|
|
|
|
{{- if not $constraint.labelSelector }}
|
|
|
|
labelSelector:
|
|
|
|
matchLabels:
|
|
|
|
{{- include "argo-cd.selectorLabels" (dict "context" $ "name" $.Values.controller.name) | nindent 12 }}
|
|
|
|
{{- end }}
|
|
|
|
{{- end }}
|
2019-11-05 00:17:25 +00:00
|
|
|
{{- end }}
|
|
|
|
serviceAccountName: {{ template "argo-cd.controllerServiceAccountName" . }}
|
2021-09-27 10:04:14 +00:00
|
|
|
{{- with .Values.global.hostAliases }}
|
2020-03-27 13:49:47 +00:00
|
|
|
hostAliases:
|
2021-09-27 10:04:14 +00:00
|
|
|
{{- toYaml . | nindent 6 }}
|
|
|
|
{{- end }}
|
2019-11-05 00:17:25 +00:00
|
|
|
volumes:
|
2021-08-26 13:42:47 +00:00
|
|
|
- emptyDir: {}
|
|
|
|
name: argocd-home
|
2021-04-24 10:50:25 +00:00
|
|
|
- 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
|
2021-05-17 05:40:38 +00:00
|
|
|
{{- with .Values.controller.volumes }}
|
|
|
|
{{- toYaml . | nindent 6 }}
|
|
|
|
{{- end }}
|
2021-11-29 10:50:39 +00:00
|
|
|
{{- if .Values.controller.initContainers }}
|
|
|
|
initContainers:
|
|
|
|
{{- toYaml .Values.controller.initContainers | nindent 6 }}
|
|
|
|
{{- end }}
|
2020-07-11 17:00:29 +00:00
|
|
|
{{- if .Values.controller.priorityClassName }}
|
|
|
|
priorityClassName: {{ .Values.controller.priorityClassName }}
|
|
|
|
{{- end }}
|