-
Notifications
You must be signed in to change notification settings - Fork 190
/
secret-webhook.yaml
40 lines (40 loc) · 2.21 KB
/
secret-webhook.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
{{- if not .Values.vcsSecretName }}
apiVersion: v1
kind: Secret
metadata:
name: {{ template "atlantis.fullname" . }}-webhook
namespace: {{ .Release.Namespace }}
labels:
{{- include "atlantis.labels" . | nindent 4 }}
{{- with .Values.extraAnnotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
data:
{{- 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 }}
{{- 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 }}
{{- 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 }}
{{- 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 }}
{{- end }}
{{- if .Values.bitbucket }}
bitbucket_token: {{ required "bitbucket.token is required if bitbucket configuration is specified." .Values.bitbucket.token | b64enc }}
{{- if .Values.bitbucket.baseURL }}
bitbucket_secret: {{ required "bitbucket.secret is required if bitbucket.baseURL is specified." .Values.bitbucket.secret | b64enc }}
{{- 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 }}
{{- end }}
{{- end }}