Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ This chart is used to set up the basic building blocks in [Validated Patterns](h

### Notable changes

* v0.9.49: Boolean Templates in override values now also render correctly
* v0.9.48: Templates in override values now render
* v0.9.45: Default value of `resourceTrackingMethod` is now `annotation`
* v0.9.44: Default value of `resourceTrackingMethod` is now `annotation`
Expand Down
4 changes: 2 additions & 2 deletions templates/plumbing/applications.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ spec:
{{- end }}
{{- range .overrides }}
- name: {{ .name }}
value: {{ tpl .value $ | quote }}
value: {{ tpl (toString .value) $ | quote }}
{{- if .forceString }}
forceString: true
{{- end }}
Expand Down Expand Up @@ -154,7 +154,7 @@ spec:
{{- end }}
{{- range .overrides }}
- name: {{ .name }}
value: {{ tpl .value $ | quote }}
value: {{ tpl (toString .value) $ | quote }}
{{- if .forceString }}
forceString: true
{{- end }}
Expand Down
53 changes: 53 additions & 0 deletions tests/application_override_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,56 @@ tests:
content:
name: test_override
value: https://github.com/validatedpatterns/multicloud-gitops

- it: should stringify boolean override values for multisource applications
set:
global:
repoURL: https://github.com/validatedpatterns/multicloud-gitops
multiSourceRepoUrl: https://charts.validatedpatterns.io
clusterGroup:
applications:
acm:
name: acm
namespace: open-cluster-management
project: hub
chart: acm
chartVersion: 0.1.*
overrides:
- name: test_bool_true
value: true
- name: test_bool_false
value: false
asserts:
- hasDocuments:
count: 1
- contains:
path: spec.sources[1].helm.parameters
content:
name: test_bool_true
value: "true"
- contains:
path: spec.sources[1].helm.parameters
content:
name: test_bool_false
value: "false"

- it: should stringify boolean override values for single-source applications
set:
clusterGroup:
applications:
test-app:
name: test-app
namespace: test-ns
project: default
path: charts/test
overrides:
- name: test_bool_true
value: true
asserts:
- hasDocuments:
count: 1
- contains:
path: spec.source.helm.parameters
content:
name: test_bool_true
value: "true"