Skip to content

Commit

Permalink
Merge pull request #146 from port-labs/tpl-values
Browse files Browse the repository at this point in the history
tpl statekey & extra env vars
  • Loading branch information
yairsimantov20 authored Oct 28, 2024
2 parents 9fddd76 + b67aefa commit 63643f5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion charts/port-k8s-exporter/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion charts/port-k8s-exporter/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -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 -}}
Expand Down
4 changes: 2 additions & 2 deletions charts/port-k8s-exporter/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ spec:
- name: EVENT_LISTENER_AUTHENTICATION_MECHANISM
value: {{ .Values.eventListener.authenticationMechanism | quote }}
{{- end }}
{{- with .Values.extraEnv }}
{{- toYaml . | nindent 12 }}
{{- if .Values.extraEnv }}
{{- tpl (toYaml .Values.extraEnv) $ | nindent 12 }}
{{- end }}
volumeMounts:
- name: config-volume
Expand Down

0 comments on commit 63643f5

Please sign in to comment.