added existing gitconfig secret support (#19167)

Signed-off-by: Jonny Ford <jonnyford1@gmail.com>

Co-authored-by: David J. M. Karlsen <david@davidkarlsen.com>
This commit is contained in:
jonnydford
2019-12-27 09:19:39 -08:00
committed by Kubernetes Prow Robot
co-authored by David J. M. Karlsen
parent ee0434cfbb
commit e54d688da0
4 changed files with 11 additions and 3 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.9.2
version: 3.10.0
keywords:
- terraform
home: https://www.runatlantis.io
+1
View File
@@ -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 |
+6 -2
View File
@@ -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
+3
View File
@@ -53,6 +53,9 @@ orgWhitelist: <replace-me>
# 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: |