diff --git a/charts/atlantis/Chart.yaml b/charts/atlantis/Chart.yaml index 97000504..96b7dfce 100644 --- a/charts/atlantis/Chart.yaml +++ b/charts/atlantis/Chart.yaml @@ -3,7 +3,7 @@ apiVersion: v1 appVersion: v0.33.0 description: A Helm chart for Atlantis https://www.runatlantis.io name: atlantis -version: 5.14.0 +version: 5.15.0 keywords: - terraform home: https://www.runatlantis.io diff --git a/charts/atlantis/README.md b/charts/atlantis/README.md index 30fcad2f..4ff83d7b 100644 --- a/charts/atlantis/README.md +++ b/charts/atlantis/README.md @@ -183,6 +183,7 @@ extraManifests: | replicaCount | int | `1` | Replica count for Atlantis pods. | | repoConfig | string | `""` | Use Server Side Repo Config, ref: https://www.runatlantis.io/docs/server-side-repo-config.html. Check values.yaml for examples. | | resources | object | `{}` | Resources for Atlantis. Check values.yaml for examples. | +| secretAnnotations | object | `{}` | | | service.annotations | object | `{}` | | | service.externalTrafficPolicy | string | `nil` | | | service.loadBalancerIP | string | `nil` | | diff --git a/charts/atlantis/templates/secret-api.yaml b/charts/atlantis/templates/secret-api.yaml index 1fe2e761..f0a4e17b 100644 --- a/charts/atlantis/templates/secret-api.yaml +++ b/charts/atlantis/templates/secret-api.yaml @@ -6,9 +6,14 @@ metadata: namespace: {{ .Release.Namespace }} labels: {{- include "atlantis.labels" . | nindent 4 }} - {{- with .Values.extraAnnotations }} + {{- if or .Values.secretAnnotations .Values.extraAnnotations }} annotations: + {{- with .Values.secretAnnotations }} {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.extraAnnotations }} + {{- toYaml . | nindent 4 }} + {{- end }} {{- end }} data: apisecret: {{ .Values.api.secret | b64enc }} diff --git a/charts/atlantis/templates/secret-aws.yaml b/charts/atlantis/templates/secret-aws.yaml index 0e202fab..dcf0747d 100644 --- a/charts/atlantis/templates/secret-aws.yaml +++ b/charts/atlantis/templates/secret-aws.yaml @@ -6,9 +6,14 @@ metadata: namespace: {{ .Release.Namespace }} labels: {{- include "atlantis.labels" . | nindent 4 }} - {{- with .Values.extraAnnotations }} + {{- if or .Values.secretAnnotations .Values.extraAnnotations }} annotations: + {{- with .Values.secretAnnotations }} {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.extraAnnotations }} + {{- toYaml . | nindent 4 }} + {{- end }} {{- end }} data: {{- if .Values.aws.credentials }} diff --git a/charts/atlantis/templates/secret-basic-auth.yaml b/charts/atlantis/templates/secret-basic-auth.yaml index 66b7c469..ff5d3802 100644 --- a/charts/atlantis/templates/secret-basic-auth.yaml +++ b/charts/atlantis/templates/secret-basic-auth.yaml @@ -6,9 +6,14 @@ metadata: namespace: {{ .Release.Namespace }} labels: {{- include "atlantis.labels" . | nindent 4 }} - {{- with .Values.extraAnnotations }} + {{- if or .Values.secretAnnotations .Values.extraAnnotations }} annotations: + {{- with .Values.secretAnnotations }} {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.extraAnnotations }} + {{- toYaml . | nindent 4 }} + {{- end }} {{- end }} data: username: {{ .Values.basicAuth.username | b64enc }} diff --git a/charts/atlantis/templates/secret-gitconfig.yaml b/charts/atlantis/templates/secret-gitconfig.yaml index 05cbcabb..8e9ffd8c 100644 --- a/charts/atlantis/templates/secret-gitconfig.yaml +++ b/charts/atlantis/templates/secret-gitconfig.yaml @@ -6,9 +6,14 @@ metadata: namespace: {{ .Release.Namespace }} labels: {{- include "atlantis.labels" . | nindent 4 }} - {{- with .Values.extraAnnotations }} + {{- if or .Values.secretAnnotations .Values.extraAnnotations }} annotations: + {{- with .Values.secretAnnotations }} {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.extraAnnotations }} + {{- toYaml . | nindent 4 }} + {{- end }} {{- end }} data: gitconfig: {{ .Values.gitconfig | b64enc }} diff --git a/charts/atlantis/templates/secret-netrc.yaml b/charts/atlantis/templates/secret-netrc.yaml index d985664a..cbcab2e2 100644 --- a/charts/atlantis/templates/secret-netrc.yaml +++ b/charts/atlantis/templates/secret-netrc.yaml @@ -6,9 +6,14 @@ metadata: namespace: {{ .Release.Namespace }} labels: {{- include "atlantis.labels" . | nindent 4 }} - {{- with .Values.extraAnnotations }} + {{- if or .Values.secretAnnotations .Values.extraAnnotations }} annotations: + {{- with .Values.secretAnnotations }} {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.extraAnnotations }} + {{- toYaml . | nindent 4 }} + {{- end }} {{- end }} data: netrc: {{ .Values.netrc | b64enc }} diff --git a/charts/atlantis/templates/secret-redis.yaml b/charts/atlantis/templates/secret-redis.yaml index d43082ad..92b193ac 100644 --- a/charts/atlantis/templates/secret-redis.yaml +++ b/charts/atlantis/templates/secret-redis.yaml @@ -6,9 +6,14 @@ metadata: namespace: {{ .Release.Namespace }} labels: {{- include "atlantis.labels" . | nindent 4 }} - {{- with .Values.extraAnnotations }} + {{- if or .Values.secretAnnotations .Values.extraAnnotations }} annotations: + {{- with .Values.secretAnnotations }} {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.extraAnnotations }} + {{- toYaml . | nindent 4 }} + {{- end }} {{- end }} data: password: {{ .Values.redis.password | b64enc }} diff --git a/charts/atlantis/templates/secret-service-account.yaml b/charts/atlantis/templates/secret-service-account.yaml index b0ea4793..f7912b80 100644 --- a/charts/atlantis/templates/secret-service-account.yaml +++ b/charts/atlantis/templates/secret-service-account.yaml @@ -8,9 +8,14 @@ metadata: labels: component: service-account-secret {{- include "atlantis.labels" $ | nindent 4 }} - {{- with $.Values.extraAnnotations }} + {{- if or .Values.secretAnnotations .Values.extraAnnotations }} annotations: + {{- with .Values.secretAnnotations }} {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.extraAnnotations }} + {{- toYaml . | nindent 4 }} + {{- end }} {{- end }} data: service-account.json: {{ $secret }} diff --git a/charts/atlantis/templates/secret-webhook.yaml b/charts/atlantis/templates/secret-webhook.yaml index b309a2ff..53d23e21 100644 --- a/charts/atlantis/templates/secret-webhook.yaml +++ b/charts/atlantis/templates/secret-webhook.yaml @@ -6,9 +6,14 @@ metadata: namespace: {{ .Release.Namespace }} labels: {{- include "atlantis.labels" . | nindent 4 }} - {{- with .Values.extraAnnotations }} + {{- if or .Values.secretAnnotations .Values.extraAnnotations }} annotations: + {{- with .Values.secretAnnotations }} {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.extraAnnotations }} + {{- toYaml . | nindent 4 }} + {{- end }} {{- end }} data: {{- if .Values.githubApp }} diff --git a/charts/atlantis/values.schema.json b/charts/atlantis/values.schema.json index 9bd743fc..8e1e63cc 100644 --- a/charts/atlantis/values.schema.json +++ b/charts/atlantis/values.schema.json @@ -1193,6 +1193,16 @@ "description": "SecurityContext configuration for atlantis containers.", "$ref": "#/definitions/io.k8s.api.core.v1.SecurityContext" }, + "secretAnnotations": { + "type": "object", + "description": "Add additional secret annotations", + "items": { + "type": "object" + }, + "examples": { + "team": "example" + } + }, "servicemonitor": { "type": "object", "description": "ServiceMonitor configuration for atlantis containers.", diff --git a/charts/atlantis/values.yaml b/charts/atlantis/values.yaml index 52881a68..86de13c9 100644 --- a/charts/atlantis/values.yaml +++ b/charts/atlantis/values.yaml @@ -652,6 +652,12 @@ dnsConfig: {} hostNetwork: false +# - These annotations will be added to secrets. +# Check values.yaml for examples. +secretAnnotations: {} +# secretAnnotations: +# team: example + # - These annotations will be added to all the resources. # Check values.yaml for examples. extraAnnotations: {}