Skip to content

Commit

Permalink
Use stringData instead of data for secrets
Browse files Browse the repository at this point in the history
  • Loading branch information
afarid committed Dec 22, 2024
1 parent 012776f commit d0ba279
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 27 deletions.
4 changes: 2 additions & 2 deletions charts/atlantis/templates/secret-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ metadata:
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
data:
apisecret: {{ .Values.api.secret | b64enc }}
stringData:
apisecret: {{ .Values.api.secret }}
{{- end }}
6 changes: 3 additions & 3 deletions charts/atlantis/templates/secret-aws.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ metadata:
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
data:
stringData:
{{- if .Values.aws.credentials }}
credentials: {{ .Values.aws.credentials | b64enc }}
credentials: {{ .Values.aws.credentials }}
{{- end }}
{{- if .Values.aws.config }}
config: {{ .Values.aws.config | b64enc }}
config: {{ .Values.aws.config }}
{{- end }}
{{- end }}
6 changes: 3 additions & 3 deletions charts/atlantis/templates/secret-basic-auth.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ metadata:
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
data:
username: {{ .Values.basicAuth.username | b64enc }}
password: {{ .Values.basicAuth.password | b64enc }}
stringData:
username: {{ .Values.basicAuth.username }}
password: {{ .Values.basicAuth.password }}
{{- end }}
4 changes: 2 additions & 2 deletions charts/atlantis/templates/secret-gitconfig.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ metadata:
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
data:
gitconfig: {{ .Values.gitconfig | b64enc }}
stringData:
gitconfig: {{ .Values.gitconfig }}
{{- end }}
4 changes: 2 additions & 2 deletions charts/atlantis/templates/secret-netrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ metadata:
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
data:
netrc: {{ .Values.netrc | b64enc }}
stringData:
netrc: {{ .Values.netrc }}
{{- end }}
4 changes: 2 additions & 2 deletions charts/atlantis/templates/secret-redis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ metadata:
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
data:
password: {{ .Values.redis.password | b64enc }}
stringData:
password: {{ .Values.redis.password }}
{{- end }}
26 changes: 13 additions & 13 deletions charts/atlantis/templates/secret-webhook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,31 +10,31 @@ metadata:
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
data:
stringData:
{{- if .Values.githubApp }}
key.pem: {{ required "githubApp.key is required if githubApp configuration is specified." .Values.githubApp.key | b64enc }}
github_secret: {{ required "githubApp.secret is required if githubApp configuration is specified." .Values.githubApp.secret | b64enc }}
key.pem: {{ required "githubApp.key is required if githubApp configuration is specified." .Values.githubApp.key }}
github_secret: {{ required "githubApp.secret is required if githubApp configuration is specified." .Values.githubApp.secret }}
{{- end }}
{{- if .Values.github.user }}
github_token: {{ required "github.token is required if github configuration is specified." .Values.github.token | b64enc }}
github_secret: {{ required "github.secret is required if github configuration is specified." .Values.github.secret | b64enc }}
github_token: {{ required "github.token is required if github configuration is specified." .Values.github.token }}
github_secret: {{ required "github.secret is required if github configuration is specified." .Values.github.secret }}
{{- end }}
{{- if .Values.gitea }}
gitea_token: {{ required "gitea.token is required if gitea configuration is specified." .Values.gitea.token | b64enc }}
gitea_secret: {{ required "gitea.secret is required if gitea configuration is specified." .Values.gitea.secret | b64enc }}
gitea_token: {{ required "gitea.token is required if gitea configuration is specified." .Values.gitea.token }}
gitea_secret: {{ required "gitea.secret is required if gitea configuration is specified." .Values.gitea.secret }}
{{- end }}
{{- if .Values.gitlab }}
gitlab_token: {{ required "gitlab.token is required if gitlab configuration is specified." .Values.gitlab.token | b64enc }}
gitlab_secret: {{ required "gitlab.secret is required if gitlab configuration is specified." .Values.gitlab.secret | b64enc }}
gitlab_token: {{ required "gitlab.token is required if gitlab configuration is specified." .Values.gitlab.token }}
gitlab_secret: {{ required "gitlab.secret is required if gitlab configuration is specified." .Values.gitlab.secret }}
{{- end }}
{{- if .Values.bitbucket }}
bitbucket_token: {{ required "bitbucket.token is required if bitbucket configuration is specified." .Values.bitbucket.token | b64enc }}
bitbucket_token: {{ required "bitbucket.token is required if bitbucket configuration is specified." .Values.bitbucket.token }}
{{- if .Values.bitbucket.baseURL }}
bitbucket_secret: {{ required "bitbucket.secret is required if bitbucket.baseURL is specified." .Values.bitbucket.secret | b64enc }}
bitbucket_secret: {{ required "bitbucket.secret is required if bitbucket.baseURL is specified." .Values.bitbucket.secret }}
{{- end }}
{{- end }}
{{- if .Values.azuredevops }}
azuredevops_token: {{ required "azuredevops.token is required if azuredevops configuration is specified." .Values.azuredevops.token | b64enc }}
azuredevops_webhook_password: {{ required "azuredevops.webhookPassword is required if azuredevops configuration is specified." .Values.azuredevops.webhookPassword | b64enc }}
azuredevops_token: {{ required "azuredevops.token is required if azuredevops configuration is specified." .Values.azuredevops.token }}
azuredevops_webhook_password: {{ required "azuredevops.webhookPassword is required if azuredevops configuration is specified." .Values.azuredevops.webhookPassword }}
{{- end }}
{{- end }}

0 comments on commit d0ba279

Please sign in to comment.