From ae13c65229f65a768ed732b767ed2dbf404fe74b Mon Sep 17 00:00:00 2001 From: Alexandre Gaudreault Date: Wed, 16 Feb 2022 13:43:46 -0500 Subject: [PATCH] feat(argocd-applicationset): add env variable in values (#1132) * feat(appset): add env variable in values Signed-off-by: Alexandre Gaudreault * wrong chart!!! Signed-off-by: Alexandre Gaudreault * quote Signed-off-by: Alexandre Gaudreault * update variable name Signed-off-by: Alexandre Gaudreault --- charts/argocd-applicationset/Chart.yaml | 4 ++-- charts/argocd-applicationset/README.md | 2 ++ .../argocd-applicationset/templates/deployment.yaml | 8 ++++++++ charts/argocd-applicationset/values.yaml | 13 +++++++++++++ 4 files changed, 25 insertions(+), 2 deletions(-) diff --git a/charts/argocd-applicationset/Chart.yaml b/charts/argocd-applicationset/Chart.yaml index 51ebf64b..69dfcf26 100644 --- a/charts/argocd-applicationset/Chart.yaml +++ b/charts/argocd-applicationset/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: argocd-applicationset description: A Helm chart for installing ArgoCD ApplicationSet type: application -version: 1.9.1 +version: 1.10.0 appVersion: "v0.3.0" home: https://github.com/argoproj/argo-helm icon: https://argocd-applicationset.readthedocs.io/en/stable/assets/logo.png @@ -14,4 +14,4 @@ maintainers: - name: maruina annotations: artifacthub.io/changes: | - - "[Changed]: Consistent .helmignore" + - "[Added]: Ability to define custom env variables for ArgoCD applicationset" diff --git a/charts/argocd-applicationset/README.md b/charts/argocd-applicationset/README.md index c1abad4d..f3637ac7 100644 --- a/charts/argocd-applicationset/README.md +++ b/charts/argocd-applicationset/README.md @@ -67,6 +67,8 @@ kubectl apply -k https://github.com/argoproj-labs/applicationset.git/manifests/c | args.policy | string | `"sync"` | How application is synced between the generator and the cluster | | args.probeBindAddr | string | `":8081"` | The default health check port | | extraArgs | list | `[]` | List of extra cli args to add | +| extraEnv | list | `[]` | Environment variables to pass to the controller | +| extraEnvFrom | list | `[]` (See [values.yaml]) | envFrom to pass to the controller | | extraVolumeMounts | list | `[]` | List of extra mounts to add (normally used with extraVolumes) | | extraVolumes | list | `[]` | List of extra volumes to add | | fullnameOverride | string | `""` | Override the default fully qualified app name | diff --git a/charts/argocd-applicationset/templates/deployment.yaml b/charts/argocd-applicationset/templates/deployment.yaml index 34b7ee49..9d39dfa8 100644 --- a/charts/argocd-applicationset/templates/deployment.yaml +++ b/charts/argocd-applicationset/templates/deployment.yaml @@ -59,6 +59,14 @@ spec: - name: webhook containerPort: 7000 protocol: TCP + {{- with .Values.extraEnv }} + env: + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.extraEnvFrom }} + envFrom: + {{- toYaml . | nindent 12 }} + {{- end }} resources: {{- toYaml .Values.resources | nindent 12 }} volumeMounts: diff --git a/charts/argocd-applicationset/values.yaml b/charts/argocd-applicationset/values.yaml index 25b8fdce..8ddcfee5 100644 --- a/charts/argocd-applicationset/values.yaml +++ b/charts/argocd-applicationset/values.yaml @@ -147,6 +147,19 @@ extraVolumes: [] extraArgs: [] # - --loglevel=warn +# -- Environment variables to pass to the controller +extraEnv: [] + # - name: "MY_VAR" + # value: "value" + +# -- envFrom to pass to the controller +# @default -- `[]` (See [values.yaml]) +extraEnvFrom: [] + # - configMapRef: + # name: config-map-name + # - secretRef: + # name: secret-name + # -- Override the Kubernetes version, which is used to evaluate certain manifests kubeVersionOverride: ""