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
2 changes: 1 addition & 1 deletion Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: A Helm chart to create per-clustergroup ArgoCD applications and any
keywords:
- pattern
name: clustergroup
version: 0.9.47
version: 0.9.48
home: https://github.com/validatedpatterns/clustergroup-chart
maintainers:
- name: Validated Patterns Team
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
# clustergroup

![Version: 0.9.47](https://img.shields.io/badge/Version-0.9.47-informational?style=flat-square)
![Version: 0.9.48](https://img.shields.io/badge/Version-0.9.48-informational?style=flat-square)

A Helm chart to create per-clustergroup ArgoCD applications and any required namespaces or subscriptions.

This chart is used to set up the basic building blocks in [Validated Patterns](https://validatedpatterns.io)

### Notable changes

* 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`
* v0.9.43: Add support to `env`, `volumes` and `volumeMounts` in repository server
* v0.9.38: Ensure sharedValueFiles and extraValueFiles are always prefixed with $patternref
Expand Down
2 changes: 2 additions & 0 deletions README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ This chart is used to set up the basic building blocks in [Validated Patterns](h

### Notable changes

* 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`
* v0.9.43: Add support to `env`, `volumes` and `volumeMounts` in repository server
* v0.9.38: Ensure sharedValueFiles and extraValueFiles are always prefixed with $patternref
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: {{ .value | quote }}
value: {{ tpl .value $ | quote }}
{{- if .forceString }}
forceString: true
{{- end }}
Expand Down Expand Up @@ -154,7 +154,7 @@ spec:
{{- end }}
{{- range .overrides }}
- name: {{ .name }}
value: {{ .value | quote }}
value: {{ tpl .value $ | quote }}
{{- if .forceString }}
forceString: true
{{- end }}
Expand Down
103 changes: 103 additions & 0 deletions tests/application_override_test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
suite: Test application helm overrides
templates:
- templates/plumbing/applications.yaml
release:
name: release-test
tests:
- it: should add override parameters on 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_override
value: test_value
asserts:
- hasDocuments:
count: 1
- contains:
path: spec.sources[1].helm.parameters
content:
name: test_override
value: test_value

- it: should add override parameters on single-source applications
set:
clusterGroup:
applications:
test-app:
name: test-app
namespace: test-ns
project: default
path: charts/test
overrides:
- name: test_override
value: test_value
asserts:
- hasDocuments:
count: 1
- contains:
path: spec.source.helm.parameters
content:
name: test_override
value: test_value

- it: should add forceString on override when specified
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_override
value: test_value
forceString: true
asserts:
- hasDocuments:
count: 1
- contains:
path: spec.sources[1].helm.parameters
content:
name: test_override
value: test_value
forceString: true

- it: should render tpl in override value using global.repoURL
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_override
value: "{{ .Values.global.repoURL }}"
asserts:
- hasDocuments:
count: 1
- contains:
path: spec.sources[1].helm.parameters
content:
name: test_override
value: https://github.com/validatedpatterns/multicloud-gitops