From c5a8e71717a3bacbf5af8201b64c87e0836d2092 Mon Sep 17 00:00:00 2001 From: Yair Siman Tov <63305203+yairsimantov20@users.noreply.github.com> Date: Sun, 27 Oct 2024 16:46:24 +0200 Subject: [PATCH 1/4] tpl statekey & extra env vars --- charts/port-k8s-exporter/templates/configmap.yaml | 2 +- charts/port-k8s-exporter/templates/deployment.yaml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/charts/port-k8s-exporter/templates/configmap.yaml b/charts/port-k8s-exporter/templates/configmap.yaml index 1bfa958..9e634a6 100644 --- a/charts/port-k8s-exporter/templates/configmap.yaml +++ b/charts/port-k8s-exporter/templates/configmap.yaml @@ -1,5 +1,5 @@ {{- if eq .Values.configMap.create true -}} -{{- $stateKey := lower (default (uuidv4 | replace "-" "") .Values.stateKey) -}} +{{- $stateKey := lower (default (uuidv4 | replace "-" "") (tpl .Values.stateKey $)) -}} {{- $config_lookup := (lookup "v1" "ConfigMap" .Release.Namespace (include "port-k8s-exporter.configMapName" .)) -}} {{- if (($config_lookup).data).state_key -}} {{- $stateKey = $config_lookup.data.state_key -}} diff --git a/charts/port-k8s-exporter/templates/deployment.yaml b/charts/port-k8s-exporter/templates/deployment.yaml index 28c83dd..be399b9 100644 --- a/charts/port-k8s-exporter/templates/deployment.yaml +++ b/charts/port-k8s-exporter/templates/deployment.yaml @@ -78,8 +78,8 @@ spec: volumeMounts: - name: config-volume mountPath: "/config" - {{- with .Values.extraVolumeMounts }} - {{- toYaml . | nindent 12 }} + {{- if .Values.extraVolumeMounts }} + {{- tpl (toYaml .) $ | nindent 12 }} {{- end }} volumes: - name: config-volume From 8e5844e75885f77c0d9d641cf6d0c9b588cab59a Mon Sep 17 00:00:00 2001 From: Yair Siman Tov <63305203+yairsimantov20@users.noreply.github.com> Date: Sun, 27 Oct 2024 16:59:23 +0200 Subject: [PATCH 2/4] fix --- charts/port-k8s-exporter/templates/deployment.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/charts/port-k8s-exporter/templates/deployment.yaml b/charts/port-k8s-exporter/templates/deployment.yaml index be399b9..6830100 100644 --- a/charts/port-k8s-exporter/templates/deployment.yaml +++ b/charts/port-k8s-exporter/templates/deployment.yaml @@ -72,14 +72,14 @@ spec: - name: EVENT_LISTENER_AUTHENTICATION_MECHANISM value: {{ .Values.eventListener.authenticationMechanism | quote }} {{- end }} - {{- with .Values.extraEnv }} - {{- toYaml . | nindent 12 }} + {{- if .Values.extraEnv }} + {{- tpl (toYaml .) $ | nindent 12 }} {{- end }} volumeMounts: - name: config-volume mountPath: "/config" - {{- if .Values.extraVolumeMounts }} - {{- tpl (toYaml .) $ | nindent 12 }} + {{- with .Values.extraVolumeMounts }} + {{- toYaml . | nindent 12 }} {{- end }} volumes: - name: config-volume From bb51e23885f8924939b7bcd8c3b2a96e808eeb24 Mon Sep 17 00:00:00 2001 From: yair Date: Mon, 28 Oct 2024 10:16:52 +0200 Subject: [PATCH 3/4] fix for the tpl --- charts/port-k8s-exporter/templates/deployment.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/port-k8s-exporter/templates/deployment.yaml b/charts/port-k8s-exporter/templates/deployment.yaml index 6830100..aebb08f 100644 --- a/charts/port-k8s-exporter/templates/deployment.yaml +++ b/charts/port-k8s-exporter/templates/deployment.yaml @@ -73,7 +73,7 @@ spec: value: {{ .Values.eventListener.authenticationMechanism | quote }} {{- end }} {{- if .Values.extraEnv }} - {{- tpl (toYaml .) $ | nindent 12 }} + {{- tpl (toYaml .Values.extraEnv) $ | nindent 12 }} {{- end }} volumeMounts: - name: config-volume From b67aefa29bb6073a885935177c05fde3e7d16bda Mon Sep 17 00:00:00 2001 From: yair Date: Mon, 28 Oct 2024 10:20:37 +0200 Subject: [PATCH 4/4] version bump --- charts/port-k8s-exporter/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/port-k8s-exporter/Chart.yaml b/charts/port-k8s-exporter/Chart.yaml index 6c48836..27e83fa 100644 --- a/charts/port-k8s-exporter/Chart.yaml +++ b/charts/port-k8s-exporter/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: port-k8s-exporter description: A Helm chart for Port Kubernetes Exporter type: application -version: 0.2.35 +version: 0.2.36 appVersion: "0.4.2" home: https://getport.io/ sources: