From 3fe663f1e2087da9e6f61d331edaf53eac4f8e95 Mon Sep 17 00:00:00 2001 From: Ashley Penney Date: Thu, 2 Jan 2020 14:43:40 -0600 Subject: [PATCH] [stable/atlantis] Add service account annotations (#19818) * Add service account annotations This allows you to pass annotations to the service account. Signed-off-by: Ashley Penney * Rename key as it's under serviceaccount already Signed-off-by: Ashley Penney --- stable/atlantis/Chart.yaml | 2 +- stable/atlantis/README.md | 1 + stable/atlantis/templates/serviceaccount.yaml | 3 +++ stable/atlantis/values.yaml | 7 +++++++ 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/stable/atlantis/Chart.yaml b/stable/atlantis/Chart.yaml index ffd6f7f611..d77828bc79 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.10.0 +version: 3.10.1 keywords: - terraform home: https://www.runatlantis.io diff --git a/stable/atlantis/README.md b/stable/atlantis/README.md index eec6abb0d5..bf1a5b292e 100644 --- a/stable/atlantis/README.md +++ b/stable/atlantis/README.md @@ -79,6 +79,7 @@ The following options are supported. See [values.yaml](values.yaml) for more de | `disableApplyAll` | Disables running `atlantis apply` without any flags | `false` | | `serviceAccount.create` | Whether to create a Kubernetes ServiceAccount if no account matching `serviceAccount.name` exists. | `true` | | `serviceAccount.name` | Name of the Kubernetes ServiceAccount under which Atlantis should run. If no value is specified and `serviceAccount.create` is `true`, Atlantis will be run under a ServiceAccount whose name is the FullName of the Helm chart's instance, else Atlantis will be run under the `default` ServiceAccount. | n/a | +| `serviceAccount.annotations` | Additional Service Account annotations | n/a | | `serviceAccountSecrets.credentials` | Deprecated (see googleServiceAccountSecrets) JSON string representing secrets for a Google Cloud Platform production service account. Only applicable if hosting Atlantis on GKE. | n/a | | `serviceAccountSecrets.credentials-staging` | Deprecated (see googleServiceAccountSecrets) JSON string representing secrets for a Google Cloud Platform staging service account. Only applicable if hosting Atlantis on GKE. | n/a | | `googleServiceAccountSecrets` | An array of Kubernetes secrets containing Google Service Account credentials. See `values.yaml` for examples and additional documentation. | n/a | diff --git a/stable/atlantis/templates/serviceaccount.yaml b/stable/atlantis/templates/serviceaccount.yaml index 7a079d13a6..cfab5a6cb9 100644 --- a/stable/atlantis/templates/serviceaccount.yaml +++ b/stable/atlantis/templates/serviceaccount.yaml @@ -8,4 +8,7 @@ metadata: chart: {{ template "atlantis.chart" . }} release: {{ .Release.Name }} heritage: {{ .Release.Service }} +{{- if .Values.serviceAccount.annotations }} + annotations: {{ toYaml .Values.serviceAccount.annotations | nindent 4 }} +{{- end }} {{- end -}} diff --git a/stable/atlantis/values.yaml b/stable/atlantis/values.yaml index bcc3dd8063..fc7d72fb04 100644 --- a/stable/atlantis/values.yaml +++ b/stable/atlantis/values.yaml @@ -195,6 +195,13 @@ serviceAccount: # The name of the ServiceAccount to use. # If not set and create is true, a name is generated using the fullname template name: + # Annotations for the Service Account + # Example: + # + # annotations: + # annotation1: value + # annotation2: value + annotations: {} # tlsSecretName: tls