Skip to content

Commit

Permalink
Use tpl function for defaultTags in Deployment (#97)
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
jantzenallphin and jallphin authored Jun 5, 2024
1 parent 138d57e commit 25a23c0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/k8s-pvc-tagger/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ keywords:
sources:
- https://github.com/mtougeron/k8s-pvc-tagger

version: 2.1.0
version: 2.1.1
appVersion: v1.1.0
2 changes: 1 addition & 1 deletion charts/k8s-pvc-tagger/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ spec:
- --annotation-prefix={{ .Values.annotationPrefix }}
{{- end }}
{{- if .Values.defaultTags }}
- --default-tags={{ .Values.defaultTags | toJson }}
- --default-tags={{ tpl (.Values.defaultTags) $ | toJson }}
{{- end }}
{{- if .Values.watchNamespace }}
- --watch-namespace={{ .Values.watchNamespace }}
Expand Down

0 comments on commit 25a23c0

Please sign in to comment.