diff --git a/stable/atlantis/Chart.yaml b/stable/atlantis/Chart.yaml index 21fb7a8ce5..ffd6f7f611 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.9.2 +version: 3.10.0 keywords: - terraform home: https://www.runatlantis.io diff --git a/stable/atlantis/README.md b/stable/atlantis/README.md index b691623c09..eec6abb0d5 100644 --- a/stable/atlantis/README.md +++ b/stable/atlantis/README.md @@ -54,6 +54,7 @@ The following options are supported. See [values.yaml](values.yaml) for more de | `extraVolumeMounts` | List of additional volumes mounted to the container. | `[]` | | `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 | +| `gitconfigSecretName` | Name of a pre-existing Kubernetes `Secret` containing a `gitconfig` key. Use this instead of `gitconfig` (optional) | 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 | | `github.user` | Name of the Atlantis GitHub user. | n/a | | `github.token` | Personal access token for the Atlantis GitHub user. | n/a | diff --git a/stable/atlantis/templates/statefulset.yaml b/stable/atlantis/templates/statefulset.yaml index 0b877d846e..ea0dc31feb 100644 --- a/stable/atlantis/templates/statefulset.yaml +++ b/stable/atlantis/templates/statefulset.yaml @@ -58,6 +58,10 @@ spec: - name: gitconfig-volume secret: secretName: {{ template "atlantis.fullname" . }}-gitconfig + {{- else if .Values.gitconfigSecretName }} + - name: gitconfig-volume + secret: + secretName: {{ .Values.gitconfigSecretName }} {{- end }} {{- if or .Values.aws .Values.awsSecretName}} - name: aws-volume @@ -87,7 +91,7 @@ spec: - name: {{ .Chart.Name }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" imagePullPolicy: {{ .Values.image.pullPolicy }} - {{- if .Values.gitconfig }} + {{- if or .Values.gitconfig .Values.gitconfigSecretName }} lifecycle: postStart: exec: @@ -249,7 +253,7 @@ spec: readOnly: true mountPath: /var/secrets/{{ .name }} {{- end }} - {{- if .Values.gitconfig}} + {{- if or .Values.gitconfig .Values.gitconfigSecretName }} - name: gitconfig-volume readOnly: true mountPath: /etc/secret-gitconfig diff --git a/stable/atlantis/values.yaml b/stable/atlantis/values.yaml index f2dd3cb265..bcc3dd8063 100644 --- a/stable/atlantis/values.yaml +++ b/stable/atlantis/values.yaml @@ -53,6 +53,9 @@ orgWhitelist: # insteadOf = ssh://git@gitlab.com # Source: https://stackoverflow.com/questions/42148841/github-clone-with-oauth-access-token +# If managing secrets outside the chart for the gitconfig, use this variable to reference the secret name + # gitconfigSecretName: 'mygitconfigsecret' + # To specify AWS credentials to be mapped to ~/.aws: # aws: # credentials: |