Slackbot
11/08/2023, 10:25 AMFelippe Bueno
11/08/2023, 12:01 PMFelippe Bueno
11/08/2023, 12:01 PMDaniel Boca
11/08/2023, 12:12 PMRB
11/08/2023, 1:11 PMDaniel Boca
11/08/2023, 1:14 PMgithubApp from the values.yaml file ? ( inside the statefulset.yaml template it only seems to reference the key, so i added:
{{- if .Values.githubApp }}
{{- if or .Values.githubApp.key .Values.vcsSecretName}}
- name: github-app-key-volume
secret:
secretName: {{ template "atlantis.vcsSecretName" . }}
items:
- key: key.pem
path: key.pem
- key: secret <-- this
path: secret <-- and this
• for the volume mount, i guess i can use this field from the `values.yaml`file:
# Optionally specify additional volume mounts for the container.
extraVolumeMounts: []
# extraVolumeMounts:
# - name: some-volume-name
# mountPath: /path/in/containerDaniel Boca
11/08/2023, 4:57 PMkey, and i ended up customizing the statefulset.yaml like this:
{{- if or .Values.githubApp.secret .Values.vcsSecretName}}
- name: ATLANTIS_GH_WEBHOOK_SECRET
value: "/var/github-app-secret/secret.txt"
# valueFrom:
# secretKeyRef:
# name: {{ template "atlantis.vcsSecretName" . }}
# key: github_secret
{{- end }}
then modified this:
# to mount the githubApp secret in a volume, just like the key
{{- if .Values.githubApp }}
{{- if or .Values.githubApp.secret .Values.vcsSecretName}}
- name: github-app-secret-volume
mountPath: /var/github-app-secret
readOnly: true
{{- end }}
{{- end }}
and in the `values.yaml`file:
githubApp:
id: 54353453
slug: slug-name
vcsSecretName: "secret-from-k8s"
and i think all that remains is to configure the extraVolumeMounts for the key and secret?