Skip to content

Commit

Permalink
Add env var option
Browse files Browse the repository at this point in the history
  • Loading branch information
slackspace-io committed Apr 6, 2024
1 parent 30e07f1 commit 8270a39
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
13 changes: 13 additions & 0 deletions charts/slackwatch/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
13 changes: 13 additions & 0 deletions charts/slackwatch/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,16 @@ config:
commit_message: "Automated commit by slackwatch"
commit_email: "[email protected]"
# ... 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"

0 comments on commit 8270a39

Please sign in to comment.