diff --git a/stable/atlantis/Chart.yaml b/stable/atlantis/Chart.yaml index e09a6d2f0d..1f3a3684d0 100644 --- a/stable/atlantis/Chart.yaml +++ b/stable/atlantis/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v1 appVersion: "v0.8.2" description: A Helm chart for Atlantis https://www.runatlantis.io name: atlantis -version: 3.6.2 +version: 3.7.0 keywords: - terraform home: https://www.runatlantis.io diff --git a/stable/atlantis/README.md b/stable/atlantis/README.md index 99c20fab9e..42874a282b 100644 --- a/stable/atlantis/README.md +++ b/stable/atlantis/README.md @@ -34,6 +34,7 @@ The following options are supported. See [values.yaml](values.yaml) for more de | `bitbucket.secret` | Webhook secret for Bitbucket repositories (Bitbucket Server only). | n/a | | `bitbucket.baseURL` | Base URL of Bitbucket Server installation. | n/a | | `environment` | Map of environment variables for the container. | `{}` | +| `environmentSecrets` | Array of Kubernetes secrets that can be used to set environment variables. See `values.yaml` for example. | `{}` | | `imagePullSecrets` | List of secrets for pulling images from private registries. | `[]` | | `gitconfig` | Contents of a file to be mounted to `~/.gitconfig`. Use to allow redirection for Terraform modules in private git repositories. | n/a | | `command` | Optionally override the [`command` field](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.14/#container-v1-core) of the Atlantis Docker container. If not set, the default Atlantis `ENTRYPOINT` is used. Must be an array. | n/a | diff --git a/stable/atlantis/templates/statefulset.yaml b/stable/atlantis/templates/statefulset.yaml index f9d723e971..5ccf7dec9a 100644 --- a/stable/atlantis/templates/statefulset.yaml +++ b/stable/atlantis/templates/statefulset.yaml @@ -104,6 +104,13 @@ spec: - name: {{ $key }} value: {{ $value | quote }} {{- end }} + {{- range .Values.environmentSecrets }} + - name: {{ .name }} + valueFrom: + secretKeyRef: + name: {{ .secretKeyRef.name }} + key: {{ .secretKeyRef.key }} + {{- end }} {{- if .Values.allowForkPRs }} - name: ATLANTIS_ALLOW_FORK_PRS value: {{ .Values.allowForkPRs | quote }} diff --git a/stable/atlantis/values.yaml b/stable/atlantis/values.yaml index acb613792c..ff8d6aea63 100644 --- a/stable/atlantis/values.yaml +++ b/stable/atlantis/values.yaml @@ -194,3 +194,12 @@ serviceAccount: name: # tlsSecretName: tls + +# Optionally specify additional environment variables to be populated from Kubernetes secrets. +# Useful for passing in TF_VAR_foo or other secret environment variables from Kubernetes secrets. +environmentSecrets: [] +# environmentSecrets: +# - name: THE_ENV_VAR +# secretKeyRef: +# name: the_k8s_secret_name +# value: the_key_of_the_value_in_the_secret