diff --git a/charts/argo-cd/README.md b/charts/argo-cd/README.md index 07b72e20..cebd0923 100644 --- a/charts/argo-cd/README.md +++ b/charts/argo-cd/README.md @@ -14,6 +14,10 @@ This chart currently installs the non-HA version of ArgoCD. ## Upgrading +### 2.10.x to 2.11.0 + +The application controller is now available as a `StatefulSet` when the `controller.enableStatefulSet` flag is set to true. Depending on your Helm deployment this may be a downtime or breaking change if enabled when using HA and will become the default in 3.x. + ### 1.8.7 to 2.x.x `controller.extraArgs`, `repoServer.extraArgs` and `server.extraArgs` are now arrays of strings intead of a map @@ -93,6 +97,7 @@ Helm v3 has removed the `install-crds` hook so CRDs are now populated by files i | controller.clusterAdminAccess.enabled | Enable RBAC for local cluster deployments. | `true` | | controller.containerPort | Controller listening port. | `8082` | | controller.extraArgs | Additional arguments for the controller. A list of flags | `[]` | +| controller.enableStatefulSet | Enable deploying the controller as a StatefulSet instead of a Deployment. Used for HA installations. | `false` | | controller.env | Environment variables for the controller. | `[]` | | controller.image.repository | Repository to use for the controller | `global.image.repository` | | controller.image.imagePullPolicy | Image pull policy for the controller | `global.image.imagePullPolicy` | diff --git a/charts/argo-cd/templates/argocd-application-controller/deployment.yaml b/charts/argo-cd/templates/argocd-application-controller/deployment.yaml index 3dde5e51..c2260c78 100755 --- a/charts/argo-cd/templates/argocd-application-controller/deployment.yaml +++ b/charts/argo-cd/templates/argocd-application-controller/deployment.yaml @@ -1,6 +1,6 @@ {{- $redisHa := (index .Values "redis-ha") -}} apiVersion: apps/v1 -kind: Deployment +kind: {{ .Values.controller.enableStatefulSet | ternary "StatefulSet" "Deployment" }} metadata: name: {{ template "argo-cd.controller.fullname" . }} labels: @@ -16,6 +16,9 @@ spec: matchLabels: app.kubernetes.io/name: {{ include "argo-cd.name" . }}-application-controller app.kubernetes.io/instance: {{ .Release.Name }} + {{- if .Values.controller.enableStatefulSet }} + serviceName: {{ template "argo-cd.controller.fullname" . }} + {{- end }} revisionHistoryLimit: 5 replicas: {{ .Values.controller.replicas }} template: diff --git a/charts/argo-cd/values.yaml b/charts/argo-cd/values.yaml index f95535b2..6ec90437 100755 --- a/charts/argo-cd/values.yaml +++ b/charts/argo-cd/values.yaml @@ -34,6 +34,9 @@ controller: # If changing the number of replicas you must pass the number as ARGOCD_CONTROLLER_REPLICAS as an environment variable replicas: 1 + # Deploy the application as a StatefulSet instead of a Deployment, this is required for HA capability. + # This is a feature flag that will become the default in chart version 3.x + enableStatefulSet: false ## Argo controller commandline flags args: @@ -52,10 +55,10 @@ controller: ## Environment variables to pass to argocd-controller ## - env: [] - # - name: "ARGOCD_CONTROLLER_REPLICAS" - # value: "" - + env: + [] + # - name: "ARGOCD_CONTROLLER_REPLICAS" + # value: "" ## Annotations to be added to controller pods ## @@ -66,7 +69,8 @@ controller: podLabels: {} ## Labels to set container specific security contexts - containerSecurityContext: {} + containerSecurityContext: + {} # capabilities: # drop: # - all @@ -244,12 +248,12 @@ dex: priorityClassName: "" ## Labels to set container specific security contexts - containerSecurityContext: {} + containerSecurityContext: + {} # capabilities: # drop: # - all - resources: {} # limits: # cpu: 50m @@ -293,7 +297,8 @@ redis: priorityClassName: "" ## Labels to set container specific security contexts - containerSecurityContext: {} + containerSecurityContext: + {} # capabilities: # drop: # - all @@ -328,7 +333,7 @@ redis-ha: redis: masterGroupName: argocd config: - save: "\"\"" + save: '""' haproxy: enabled: true metrics: @@ -411,7 +416,8 @@ server: priorityClassName: "" ## Labels to set container specific security contexts - containerSecurityContext: {} + containerSecurityContext: + {} # capabilities: # drop: # - all @@ -761,7 +767,8 @@ repoServer: priorityClassName: "" ## Labels to set container specific security contexts - containerSecurityContext: {} + containerSecurityContext: + {} # capabilities: # drop: # - all @@ -817,24 +824,24 @@ repoServer: ## Use init containers to configure custom tooling ## https://argoproj.github.io/argo-cd/operator-manual/custom_tools/ ## When using the volumes & volumeMounts section bellow, please comment out those above. - # volumes: - # - name: custom-tools - # emptyDir: {} - # - # initContainers: - # - name: download-tools - # image: alpine:3.8 - # command: [sh, -c] - # args: - # - wget -qO- https://get.helm.sh/helm-v2.16.1-linux-amd64.tar.gz | tar -xvzf - && - # mv linux-amd64/helm /custom-tools/ - # volumeMounts: - # - mountPath: /custom-tools - # name: custom-tools - # volumeMounts: - # - mountPath: /usr/local/bin/helm - # name: custom-tools - # subPath: helm + # volumes: + # - name: custom-tools + # emptyDir: {} + # + # initContainers: + # - name: download-tools + # image: alpine:3.8 + # command: [sh, -c] + # args: + # - wget -qO- https://get.helm.sh/helm-v2.16.1-linux-amd64.tar.gz | tar -xvzf - && + # mv linux-amd64/helm /custom-tools/ + # volumeMounts: + # - mountPath: /custom-tools + # name: custom-tools + # volumeMounts: + # - mountPath: /usr/local/bin/helm + # name: custom-tools + # subPath: helm ## Argo Configs configs: @@ -923,10 +930,11 @@ configs: # Custom secrets. Useful for injecting SSO secrets into environment variables. # Ref: https://argoproj.github.io/argo-cd/operator-manual/sso/ # Note that all values must be non-empty. - extra: {} + extra: + {} # LDAP_PASSWORD: "mypassword" - # Argo TLS Data. + # Argo TLS Data. argocdServerTlsConfig: {} # key: diff --git a/charts/argo-rollouts/Chart.yaml b/charts/argo-rollouts/Chart.yaml index 4bf8c39b..2acfa9cc 100644 --- a/charts/argo-rollouts/Chart.yaml +++ b/charts/argo-rollouts/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v1 appVersion: "0.9.1" description: A Helm chart for Argo Rollouts name: argo-rollouts -version: 0.3.9 +version: 0.3.10 icon: https://raw.githubusercontent.com/argoproj/argo/master/argo.png home: https://github.com/argoproj/argo-helm maintainers: diff --git a/charts/argo-rollouts/templates/argo-rollouts-deployment.yaml b/charts/argo-rollouts/templates/argo-rollouts-deployment.yaml index 595fe120..c2c2df64 100644 --- a/charts/argo-rollouts/templates/argo-rollouts-deployment.yaml +++ b/charts/argo-rollouts/templates/argo-rollouts-deployment.yaml @@ -2,12 +2,6 @@ apiVersion: apps/v1 kind: Deployment metadata: name: {{ .Release.Name }} - {{- if .Values.podAnnotations }} - annotations: - {{- range $key, $value := .Values.podAnnotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - {{- end }} labels: app.kubernetes.io/component: {{ .Values.controller.component }} app.kubernetes.io/name: {{ .Release.Name }} @@ -21,6 +15,12 @@ spec: app.kubernetes.io/name: {{ .Release.Name }} template: metadata: + {{- if .Values.podAnnotations }} + annotations: + {{- range $key, $value := .Values.podAnnotations }} + {{ $key }}: {{ $value | quote }} + {{- end }} + {{- end }} labels: app.kubernetes.io/name: {{ .Release.Name }} spec: diff --git a/charts/argo/Chart.yaml b/charts/argo/Chart.yaml index 76a5299a..0a90e20f 100644 --- a/charts/argo/Chart.yaml +++ b/charts/argo/Chart.yaml @@ -1,8 +1,8 @@ -apiVersion: v1 +apiVersion: v2 appVersion: v2.11.7 description: A Helm chart for Argo Workflows name: argo -version: 0.13.10 +version: 0.14.0 icon: https://raw.githubusercontent.com/argoproj/argo/master/docs/assets/argo.png home: https://github.com/argoproj/argo-helm maintainers: diff --git a/charts/argo/templates/workflow-controller-deployment.yaml b/charts/argo/templates/workflow-controller-deployment.yaml index dda3df94..82b36bf6 100755 --- a/charts/argo/templates/workflow-controller-deployment.yaml +++ b/charts/argo/templates/workflow-controller-deployment.yaml @@ -61,6 +61,9 @@ spec: fieldRef: apiVersion: v1 fieldPath: metadata.namespace + {{- with .Values.controller.extraEnv }} + {{ toYaml . | nindent 10 }} + {{- end }} resources: {{- toYaml .Values.controller.resources | nindent 12 }} {{- if .Values.controller.metricsConfig.enabled }} diff --git a/charts/argo/values.yaml b/charts/argo/values.yaml index 67c9af29..cd7d7603 100644 --- a/charts/argo/values.yaml +++ b/charts/argo/values.yaml @@ -115,6 +115,9 @@ controller: # service type `LoadBalancer` loadBalancerSourceRanges: [] resources: {} + # The list of environment variable definitions to be added to the controller + # manages container verbatim. + extraEnv: [] replicas: 1 pdb: enabled: false