diff --git a/charts/slackwatch/templates/deployment.yaml b/charts/slackwatch/templates/deployment.yaml index 1951c99..05117fc 100644 --- a/charts/slackwatch/templates/deployment.yaml +++ b/charts/slackwatch/templates/deployment.yaml @@ -25,6 +25,19 @@ spec: volumeMounts: - name: config-volume mountPath: /app/config + env: + {{- range $key, $val := .Values.customEnv }} + {{- if $val.fromSecret.enabled }} + - name: {{ $key }} + valueFrom: + secretKeyRef: + name: {{ $val.fromSecret.secretName }} + key: {{ $val.fromSecret.key }} + {{- else }} + - name: {{ $key }} + value: {{ $val | quote }} + {{- end }} + {{- end }} volumes: - name: config-volume configMap: diff --git a/charts/slackwatch/values.yaml b/charts/slackwatch/values.yaml index 65fd649..2b9d781 100644 --- a/charts/slackwatch/values.yaml +++ b/charts/slackwatch/values.yaml @@ -49,3 +49,16 @@ config: commit_message: "Automated commit by slackwatch" commit_email: "slackwatch@yourmail.default" # ... other GitOps settings + +# Custom environment variables for the Slackwatch application +#customEnv: +# # Example of a direct value environment variable +# # EXAMPLE_ENV_VAR: "example_value" +# +# # Environment variables that should be populated from secrets +# # Users can comment out or remove if not needed +# TEST_REPO_ACCESS_TOKEN: +# fromSecret: +# enabled: true +# secretName: "TEST_REPO_ACCESS_TOKEN" +# key: "tokensupersecret"