Support additional environment variables from kubernertes secrets (#15368)

Signed-off-by: Kyle Purdon <kylepurdon@gmail.com>
This commit is contained in:
Kyle Purdon
2019-07-30 08:30:52 -07:00
committed by Kubernetes Prow Robot
parent c5229cc0bb
commit da373a6db3
4 changed files with 18 additions and 1 deletions
+1 -1
View File
@@ -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
+1
View File
@@ -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 |
@@ -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 }}
+9
View File
@@ -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