Skip to content

Commit

Permalink
Allow custom templating in .extraValueFiles
Browse files Browse the repository at this point in the history
  • Loading branch information
beekhof committed Sep 29, 2023
1 parent 5a64bfb commit 3b8f539
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
8 changes: 4 additions & 4 deletions clustergroup/templates/plumbing/applications.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ spec:
ignoreMissingValueFiles: true
valueFiles:
{{- include "clustergroup.app.globalvalues.valuefiles" $ | nindent 12 }}
{{- range .extraValueFiles }}
- {{ . | quote }}
{{- range $valueFile := .extraValuesFiles }}
- {{ tpl $valueFile $.Values.global | quote }}
{{- end }}
{{- if .useGeneratorValues }}
values: |-
Expand Down Expand Up @@ -211,8 +211,8 @@ spec:
ignoreMissingValueFiles: true
valueFiles:
{{- include "clustergroup.app.globalvalues.valuefiles" $ | nindent 6 }}
{{- range $valueFile := .extraValueFiles }}
- {{ $valueFile | quote }}
{{- range $valueFile := .extraValuesFiles }}
- {{ tpl $valueFile $.Values.global | quote }}
{{- end }}
parameters:
{{- include "clustergroup.app.globalvalues.helmparameters" $ | nindent 8 }}
Expand Down
5 changes: 5 additions & 0 deletions clustergroup/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ global:
installPlanApproval: Automatic
applicationRetryLimit: 20

# This is deeply unpleasant but makes values files easier to template
Template:
BasePath: "global-vars.yml"
Name: "global-vars"

enabled: "all"

# Note that sometimes changing helm values might require a hard refresh (https://github.com/helm/helm/issues/3486)
Expand Down

0 comments on commit 3b8f539

Please sign in to comment.