From 71c0095ea5554ce51da305eb169f7e320271059b Mon Sep 17 00:00:00 2001 From: Guillaume Roland Date: Sat, 15 Oct 2022 14:11:12 -0700 Subject: [PATCH] Make values in lookup.redis optional (#401) --- .../templates/030-ConfigMap.yaml | 32 ++++++++++++++----- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/charts/kafka-lag-exporter/templates/030-ConfigMap.yaml b/charts/kafka-lag-exporter/templates/030-ConfigMap.yaml index 698a550..9136a9b 100644 --- a/charts/kafka-lag-exporter/templates/030-ConfigMap.yaml +++ b/charts/kafka-lag-exporter/templates/030-ConfigMap.yaml @@ -75,14 +75,30 @@ data: {{- if .Values.lookup.redis.enabled }} {{- with .Values.lookup.redis }} lookup-table.redis = { - host = {{ .host | quote }} - database = {{ .database | quote }} - port = {{ .port | quote }} - timeout = {{ .timeout }} - prefix = {{ .prefix | quote }} - separator = {{ .separator | quote }} - retention = {{ .retention | quote }} - expiration = {{ .expiration | quote }} + {{- with .host }} + host = {{ . }} + {{- end }} + {{- with .database }} + database = {{ . }} + {{- end }} + {{- with .port }} + port = {{ . }} + {{- end }} + {{- with .timeout }} + timeout = {{ . }} + {{- end }} + {{- with .prefix }} + prefix = {{ . }} + {{- end }} + {{- with .separator }} + separator = {{ . }} + {{- end }} + {{- with .retention }} + retention = {{ . }} + {{- end }} + {{- with .expiration }} + expiration = {{ . }} + {{- end }} } {{- end }} {{- else }}