Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set aws file secrets as individual files #385

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/atlantis/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: v1
appVersion: v0.28.5
description: A Helm chart for Atlantis https://www.runatlantis.io
name: atlantis
version: 5.4.5
version: 5.4.6
keywords:
- terraform
home: https://www.runatlantis.io
Expand Down
2 changes: 1 addition & 1 deletion charts/atlantis/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ extraManifests:
| atlantisDataDirectory | string | `"/atlantis-data"` | Path to the data directory for the volumeMount. |
| atlantisUrl | string | `""` | An option to override the atlantis url, if not using an ingress, set it to the external IP. Check values.yaml for examples. |
| aws | object | `{}` | To specify AWS credentials to be mapped to ~/.aws or to aws.directory. Check values.yaml for examples. |
| awsSecretName | string | `""` | To reference an already existing Secret object with AWS credentials |
| awsSecretName | string | `""` | To reference an already existing Secret object with AWS credentials. This has priority over the aws.config and aws.credential fields. |
| azuredevops | object | `{}` | If using Azure DevOps, please enter your values as follows. The chart will perform the base64 encoding for you for values that are stored in secrets. Check values.yaml for examples. |
| basicAuth | object | `{"password":"","username":""}` | Optionally specify an username and a password for basic authentication. |
| basicAuthSecretName | string | `""` | If managing secrets outside the chart for the Basic Auth secret, use this variable to reference the secret name. |
Expand Down
14 changes: 13 additions & 1 deletion charts/atlantis/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -561,10 +561,22 @@ spec:
mountPath: /home/atlantis/.netrc
subPath: netrc
{{- end }}
{{- if or .Values.aws.credentials .Values.aws.config .Values.awsSecretName }}
{{- if .Values.awsSecretName }}
- name: aws-volume
readOnly: true
mountPath: {{ .Values.aws.directory | default "/home/atlantis/.aws" }}
GMartinez-Sisti marked this conversation as resolved.
Show resolved Hide resolved
{{- else }}
{{- range $filename, $_ := .Values.aws }}
{{- if has $filename (list "credentials" "config") }}
- name: aws-volume
readOnly: true
mountPath: {{ $.Values.aws.directory | default "/home/atlantis/.aws" }}/{{ $filename }}
subPath: {{ $filename }}
{{- else if has $filename (list "awsSecretName") }}
ryan-dyer-sp marked this conversation as resolved.
Show resolved Hide resolved
- name: aws-volume
readOnly: true
mountPath: {{ $.Values.aws.directory | default "/home/atlantis/.aws" }}
{{- end }}
{{- end }}
{{- if .Values.tlsSecretName }}
- name: tls
Expand Down
2 changes: 1 addition & 1 deletion charts/atlantis/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ aws: {}
# source_profile = default
# directory: "/home/atlantis/.aws"

# -- To reference an already existing Secret object with AWS credentials
# -- To reference an already existing Secret object with AWS credentials. This has priority over the aws.config and aws.credential fields.
awsSecretName: ""

# -- To keep backwards compatibility only.
Expand Down
Loading