diff --git a/template/CHART_NAME/templates/daemonset.yaml b/template/CHART_NAME/templates/daemonset.yaml index b498cfb362..888a21c738 100644 --- a/template/CHART_NAME/templates/daemonset.yaml +++ b/template/CHART_NAME/templates/daemonset.yaml @@ -11,14 +11,14 @@ metadata: labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: %%COMPONENT_NAME%% {{- if or .Values.%%MAIN_OBJECT_BLOCK%%.daemonsetAnnotations .Values.commonAnnotations }} - {{- $annotations := include "common.tplvalues.merge" (dict "values" .Values.%%MAIN_OBJECT_BLOCK%%.daemonsetAnnotations .Values.commonAnnotations "context" .) | fromYaml }} + {{- $annotations := include "common.tplvalues.merge" (dict "values" (list .Values.%%MAIN_OBJECT_BLOCK%%.daemonsetAnnotations .Values.commonAnnotations) "context" .) }} annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $ ) | nindent 4 }} {{- end }} spec: {{- if .Values.%%MAIN_OBJECT_BLOCK%%.updateStrategy }} updateStrategy: {{- toYaml .Values.%%MAIN_OBJECT_BLOCK%%.updateStrategy | nindent 4 }} {{- end }} - {{- $podLabels := include "common.tplvalues.merge" (dict "values" .Values.%%MAIN_OBJECT_BLOCK%%.podLabels .Values.commonLabels "context" .) | fromYaml }} + {{- $podLabels := include "common.tplvalues.merge" (dict "values" (list .Values.%%MAIN_OBJECT_BLOCK%%.podLabels .Values.commonLabels) "context" .) }} selector: matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} app.kubernetes.io/component: %%COMPONENT_NAME%% diff --git a/template/CHART_NAME/templates/deployment.yaml b/template/CHART_NAME/templates/deployment.yaml index 887b3014ea..db0023d386 100644 --- a/template/CHART_NAME/templates/deployment.yaml +++ b/template/CHART_NAME/templates/deployment.yaml @@ -11,7 +11,7 @@ metadata: labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: %%COMPONENT_NAME%% {{- if or .Values.%%MAIN_OBJECT_BLOCK%%.deploymentAnnotations .Values.commonAnnotations }} - {{- $annotations := include "common.tplvalues.merge" (dict "values" .Values.%%MAIN_OBJECT_BLOCK%%.deploymentAnnotations .Values.commonAnnotations "context" .) | fromYaml }} + {{- $annotations := include "common.tplvalues.merge" (dict "values" (list .Values.%%MAIN_OBJECT_BLOCK%%.deploymentAnnotations .Values.commonAnnotations) "context" .) }} annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $ ) | nindent 4 }} {{- end }} spec: @@ -21,7 +21,7 @@ spec: {{- if .Values.%%MAIN_OBJECT_BLOCK%%.updateStrategy }} strategy: {{- toYaml .Values.%%MAIN_OBJECT_BLOCK%%.updateStrategy | nindent 4 }} {{- end }} - {{- $podLabels := include "common.tplvalues.merge" (dict "values" .Values.%%MAIN_OBJECT_BLOCK%%.podLabels .Values.commonLabels "context" .) | fromYaml }} + {{- $podLabels := include "common.tplvalues.merge" (dict "values" (list .Values.%%MAIN_OBJECT_BLOCK%%.podLabels .Values.commonLabels) "context" .) }} selector: matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} app.kubernetes.io/component: %%COMPONENT_NAME%% diff --git a/template/CHART_NAME/templates/ingress.yaml b/template/CHART_NAME/templates/ingress.yaml index e4eff6f7fe..5e865e24b9 100644 --- a/template/CHART_NAME/templates/ingress.yaml +++ b/template/CHART_NAME/templates/ingress.yaml @@ -12,7 +12,7 @@ metadata: labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: %%COMPONENT_NAME%% {{- if or .Values.ingress.annotations .Values.commonAnnotations }} - {{- $annotations := include "common.tplvalues.merge" (dict "values" .Values.ingress.annotations .Values.commonAnnotations "context" .) | fromYaml }} + {{- $annotations := include "common.tplvalues.merge" (dict "values" (list .Values.ingress.annotations .Values.commonAnnotations) "context" .) }} annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $ ) | nindent 4 }} {{- end }} spec: diff --git a/template/CHART_NAME/templates/pdb.yaml b/template/CHART_NAME/templates/pdb.yaml index fcbb3eadcc..68a0dd8d89 100644 --- a/template/CHART_NAME/templates/pdb.yaml +++ b/template/CHART_NAME/templates/pdb.yaml @@ -22,7 +22,7 @@ spec: {{- if .Values.%%MAIN_OBJECT_BLOCK%%.pdb.maxUnavailable }} maxUnavailable: {{ .Values.%%MAIN_OBJECT_BLOCK%%.pdb.maxUnavailable }} {{- end }} - {{- $podLabels := include "common.tplvalues.merge" (dict "values" .Values.%%MAIN_OBJECT_BLOCK%%.podLabels .Values.commonLabels "context" .) | fromYaml }} + {{- $podLabels := include "common.tplvalues.merge" (dict "values" (list .Values.%%MAIN_OBJECT_BLOCK%%.podLabels .Values.commonLabels) "context" .) }} selector: matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} app.kubernetes.io/component: %%COMPONENT_NAME%% diff --git a/template/CHART_NAME/templates/pvc.yaml b/template/CHART_NAME/templates/pvc.yaml index 0414c33baa..13acdc736c 100644 --- a/template/CHART_NAME/templates/pvc.yaml +++ b/template/CHART_NAME/templates/pvc.yaml @@ -12,7 +12,7 @@ metadata: labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: %%COMPONENT_NAME%% {{- if or .Values.persistence.annotations .Values.commonAnnotations }} - {{- $annotations := include "common.tplvalues.merge" (dict "values" .Values.persistence.annotations .Values.commonAnnotations "context" .) | fromYaml }} + {{- $annotations := include "common.tplvalues.merge" (dict "values" (list .Values.persistence.annotations .Values.commonAnnotations) "context" .) }} annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $ ) | nindent 4 }} {{- end }} spec: diff --git a/template/CHART_NAME/templates/service-account.yaml b/template/CHART_NAME/templates/service-account.yaml index da3e923158..426248cdca 100644 --- a/template/CHART_NAME/templates/service-account.yaml +++ b/template/CHART_NAME/templates/service-account.yaml @@ -12,7 +12,7 @@ metadata: labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: %%COMPONENT_NAME%% {{- if or .Values.serviceAccount.annotations .Values.commonAnnotations }} - {{- $annotations := include "common.tplvalues.merge" (dict "values" .Values.serviceAccount.annotations .Values.commonAnnotations "context" .) | fromYaml }} + {{- $annotations := include "common.tplvalues.merge" (dict "values" (list .Values.serviceAccount.annotations .Values.commonAnnotations) "context" .) }} annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $ ) | nindent 4 }} {{- end }} automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }} diff --git a/template/CHART_NAME/templates/service.yaml b/template/CHART_NAME/templates/service.yaml index 3ab90f2dbb..064e604dac 100644 --- a/template/CHART_NAME/templates/service.yaml +++ b/template/CHART_NAME/templates/service.yaml @@ -11,7 +11,7 @@ metadata: labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: %%COMPONENT_NAME%% {{- if or .Values.service.annotations .Values.commonAnnotations }} - {{- $annotations := include "common.tplvalues.merge" (dict "values" .Values.service.annotations .Values.commonAnnotations "context" .) | fromYaml }} + {{- $annotations := include "common.tplvalues.merge" (dict "values" (list .Values.service.annotations .Values.commonAnnotations) "context" .) }} annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $ ) | nindent 4 }} {{- end }} spec: diff --git a/template/CHART_NAME/templates/servicemonitor.yaml b/template/CHART_NAME/templates/servicemonitor.yaml index 1a09ef2c73..6b500d4cd8 100644 --- a/template/CHART_NAME/templates/servicemonitor.yaml +++ b/template/CHART_NAME/templates/servicemonitor.yaml @@ -9,11 +9,11 @@ kind: ServiceMonitor metadata: name: {{ include "common.names.fullname" . }} namespace: {{ default (include "common.names.namespace" .) .Values.metrics.serviceMonitor.namespace | quote }} - {{- $labels := include "common.tplvalues.merge" (dict "values" .Values.metrics.serviceMonitor.labels .Values.commonLabels "context" .) | fromYaml }} + {{- $labels := include "common.tplvalues.merge" (dict "values" (list .Values.metrics.serviceMonitor.labels .Values.commonLabels) "context" .) }} labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }} app.kubernetes.io/component: %%COMPONENT_NAME%% {{- if or .Values.metrics.serviceMonitor.annotations .Values.commonAnnotations }} - {{- $annotations := include "common.tplvalues.merge" (dict "values" .Values.metrics.serviceMonitor.annotations .Values.commonAnnotations "context" .) | fromYaml }} + {{- $annotations := include "common.tplvalues.merge" (dict "values" (list .Values.metrics.serviceMonitor.annotations .Values.commonAnnotations) "context" .) }} annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $ ) | nindent 4 }} {{- end }} spec: diff --git a/template/CHART_NAME/templates/statefulset.yaml b/template/CHART_NAME/templates/statefulset.yaml index 4febbdaf89..c1e2c23b29 100644 --- a/template/CHART_NAME/templates/statefulset.yaml +++ b/template/CHART_NAME/templates/statefulset.yaml @@ -11,7 +11,7 @@ metadata: labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: %%COMPONENT_NAME%% {{- if or .Values.%%MAIN_OBJECT_BLOCK%%.statefulsetAnnotations .Values.commonAnnotations }} - {{- $annotations := include "common.tplvalues.merge" (dict "values" .Values.%%MAIN_OBJECT_BLOCK%%.statefulsetAnnotations .Values.commonAnnotations "context" .) | fromYaml }} + {{- $annotations := include "common.tplvalues.merge" (dict "values" (list .Values.%%MAIN_OBJECT_BLOCK%%.statefulsetAnnotations .Values.commonAnnotations) "context" .) }} annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $ ) | nindent 4 }} {{- end }} spec: @@ -19,7 +19,7 @@ spec: replicas: {{ .Values.replicaCount }} {{- end }} podManagementPolicy: {{ .Values.podManagementPolicy | quote }} - {{- $podLabels := include "common.tplvalues.merge" (dict "values" .Values.%%MAIN_OBJECT_BLOCK%%.podLabels .Values.commonLabels "context" .) | fromYaml }} + {{- $podLabels := include "common.tplvalues.merge" (dict "values" (list .Values.%%MAIN_OBJECT_BLOCK%%.podLabels .Values.commonLabels) "context" .) }} selector: matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} app.kubernetes.io/component: %%COMPONENT_NAME%%