Skip to content

Commit 25a23c0

Browse files
jantzenallphinjallphin
and
jallphin
authored
Use tpl function for defaultTags in Deployment (#97)
This PR modifies the `defaultTags` argument in the Deployment configuration. Previously, the `defaultTags` value was directly converted to JSON. This PR changes this behavior by first passing the `defaultTags` through the Helm `tpl` function before converting it to JSON. The `tpl` function allows us to use templating in the `defaultTags`values. This means we can now use values from other Helm variables within `defaultTags`. This provides more flexibility and dynamic configuration options for users. This change is backward compatible. If no templating is used in defaultTags, the behavior remains the same as before. Co-authored-by: jallphin <[email protected]>
1 parent 138d57e commit 25a23c0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

charts/k8s-pvc-tagger/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ keywords:
1616
sources:
1717
- https://github.com/mtougeron/k8s-pvc-tagger
1818

19-
version: 2.1.0
19+
version: 2.1.1
2020
appVersion: v1.1.0

charts/k8s-pvc-tagger/templates/deployment.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ spec:
3333
- --annotation-prefix={{ .Values.annotationPrefix }}
3434
{{- end }}
3535
{{- if .Values.defaultTags }}
36-
- --default-tags={{ .Values.defaultTags | toJson }}
36+
- --default-tags={{ tpl (.Values.defaultTags) $ | toJson }}
3737
{{- end }}
3838
{{- if .Values.watchNamespace }}
3939
- --watch-namespace={{ .Values.watchNamespace }}

0 commit comments

Comments
 (0)