runatlantis / helm-charts

Atlantis Helm Chart
Apache License 2.0
115 stars 186 forks source link

ATLANTIS_WRITE_GIT_CREDS is hardcoded to "true" #313

Closed kawa-marcin closed 1 year ago

kawa-marcin commented 1 year ago

Hello,

I have noticed that the env var ATLANTIS_WRITE_GIT_CREDS has been hardcoded to "true" and can not be modified through the values passed to the chart.

https://github.com/runatlantis/helm-charts/blob/faa63773ef23851f1466341b2abf55fd303eb4cb/charts/atlantis/templates/statefulset.yaml#L281-L284

It could either be parametrized to include/exclude (as it is false by default in Atlantis) or at least have a default value in the chart. Something like:

# values.yaml
githubApp:
    writeGitCreds: true

---
# statefulset.yaml
{{- if .Values.githubApp.writeGitCreds }}
    - name: ATLANTIS_WRITE_GIT_CREDS
      value: "true"
{{- end }}

The inability to set it to "false" is causing issues due to the bug mentioned here:

kawa-marcin commented 1 year ago

Actually, I have just checked and if githubApp is used, Atlantis won't start without the ATLANTIS_WRITE_GIT_CREDS="true" flag, hence I need to look for another solution.