From 8c41b622568c804ec1824f5eaf2c5d98d1788686 Mon Sep 17 00:00:00 2001 From: Mike Tougeron Date: Thu, 6 Jun 2024 12:21:46 -0700 Subject: [PATCH] Allow for passing in a raw string for the defaultTags --- charts/k8s-pvc-tagger/Chart.yaml | 2 +- charts/k8s-pvc-tagger/templates/deployment.yaml | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/charts/k8s-pvc-tagger/Chart.yaml b/charts/k8s-pvc-tagger/Chart.yaml index 96b1a72..726e3b0 100644 --- a/charts/k8s-pvc-tagger/Chart.yaml +++ b/charts/k8s-pvc-tagger/Chart.yaml @@ -16,5 +16,5 @@ keywords: sources: - https://github.com/mtougeron/k8s-pvc-tagger -version: 2.1.1 +version: 2.2.0 appVersion: v1.1.0 diff --git a/charts/k8s-pvc-tagger/templates/deployment.yaml b/charts/k8s-pvc-tagger/templates/deployment.yaml index 2686251..cb0d7a1 100644 --- a/charts/k8s-pvc-tagger/templates/deployment.yaml +++ b/charts/k8s-pvc-tagger/templates/deployment.yaml @@ -33,14 +33,18 @@ spec: - --annotation-prefix={{ .Values.annotationPrefix }} {{- end }} {{- if .Values.defaultTags }} - - --default-tags={{ tpl (.Values.defaultTags) $ | toJson }} + {{- if kindIs "string" .Values.defaultTags }} + - '--default-tags={{ tpl (.Values.defaultTags) $ }}' + {{- else }} + - '--default-tags={{ tpl (.Values.defaultTags | toJson) $ }}' + {{- end }} {{- end }} {{- if .Values.watchNamespace }} - --watch-namespace={{ .Values.watchNamespace }} {{- end }} {{- range $key, $value := .Values.extraArgs }} {{- if $value }} - - --{{ $key }}={{ $value }} + - --{{ $key }}={{ tpl $value $ }} {{- else }} - --{{ $key }} {{- end }}