From 05818683794c9c3fa2c3e91852331547bca7aaac Mon Sep 17 00:00:00 2001 From: "seanson@users.noreply.github.com" Date: Tue, 15 Dec 2020 16:56:47 +1100 Subject: [PATCH] chore: Add feature flag for enabling StatefulSet Signed-off-by: seanson@users.noreply.github.com --- .../{statefulset.yaml => deployment.yaml} | 2 +- charts/argo-cd/values.yaml | 70 +++++++++++-------- 2 files changed, 40 insertions(+), 32 deletions(-) rename charts/argo-cd/templates/argocd-application-controller/{statefulset.yaml => deployment.yaml} (98%) diff --git a/charts/argo-cd/templates/argocd-application-controller/statefulset.yaml b/charts/argo-cd/templates/argocd-application-controller/deployment.yaml similarity index 98% rename from charts/argo-cd/templates/argocd-application-controller/statefulset.yaml rename to charts/argo-cd/templates/argocd-application-controller/deployment.yaml index f264e26f..4277b171 100755 --- a/charts/argo-cd/templates/argocd-application-controller/statefulset.yaml +++ b/charts/argo-cd/templates/argocd-application-controller/deployment.yaml @@ -1,6 +1,6 @@ {{- $redisHa := (index .Values "redis-ha") -}} apiVersion: apps/v1 -kind: StatefulSet +kind: {{ .Values.controller.enableStatefulSet | ternary "StatefulSet" "Deployment" }} metadata: name: {{ template "argo-cd.controller.fullname" . }} labels: diff --git a/charts/argo-cd/values.yaml b/charts/argo-cd/values.yaml index 745b270b..5331d96b 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 @@ -242,12 +246,12 @@ dex: priorityClassName: "" ## Labels to set container specific security contexts - containerSecurityContext: {} + containerSecurityContext: + {} # capabilities: # drop: # - all - resources: {} # limits: # cpu: 50m @@ -291,7 +295,8 @@ redis: priorityClassName: "" ## Labels to set container specific security contexts - containerSecurityContext: {} + containerSecurityContext: + {} # capabilities: # drop: # - all @@ -326,7 +331,7 @@ redis-ha: redis: masterGroupName: argocd config: - save: "\"\"" + save: '""' haproxy: enabled: true metrics: @@ -409,7 +414,8 @@ server: priorityClassName: "" ## Labels to set container specific security contexts - containerSecurityContext: {} + containerSecurityContext: + {} # capabilities: # drop: # - all @@ -759,7 +765,8 @@ repoServer: priorityClassName: "" ## Labels to set container specific security contexts - containerSecurityContext: {} + containerSecurityContext: + {} # capabilities: # drop: # - all @@ -815,24 +822,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: @@ -921,10 +928,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: