From 0bd33f936d8178d771d29267b5f25bc30ff1f919 Mon Sep 17 00:00:00 2001 From: Faisal K Date: Sun, 31 Mar 2024 22:13:24 +0200 Subject: [PATCH] Updates and incorporating review comments Signed-off-by: Faisal K --- charts/prometheus-json-exporter/templates/deployment.yaml | 6 +++--- .../prometheus-json-exporter/templates/servicemonitor.yaml | 5 ++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/charts/prometheus-json-exporter/templates/deployment.yaml b/charts/prometheus-json-exporter/templates/deployment.yaml index 102c78460c33..e35c719c68d1 100644 --- a/charts/prometheus-json-exporter/templates/deployment.yaml +++ b/charts/prometheus-json-exporter/templates/deployment.yaml @@ -38,13 +38,13 @@ spec: {{- toYaml .Values.podSecurityContext | nindent 8 }} {{- with .Values.extraInitContainers }} initContainers: - {{ toYaml . | nindent 8 }} + {{- toYaml . | nindent 8 }} {{- end }} containers: - name: {{ .Chart.Name }} - {{- if .Values.extraArgs }} + {{- with .Values.extraArgs }} args: - {{- range .Values.extraArgs }} + {{- range . }} - {{ .name | quote }} - {{ .value | quote }} {{- end }} diff --git a/charts/prometheus-json-exporter/templates/servicemonitor.yaml b/charts/prometheus-json-exporter/templates/servicemonitor.yaml index 14c709d80c29..66abfb4fed2b 100644 --- a/charts/prometheus-json-exporter/templates/servicemonitor.yaml +++ b/charts/prometheus-json-exporter/templates/servicemonitor.yaml @@ -38,10 +38,9 @@ spec: - targetLabel: {{ $targetLabel }} replacement: {{ $replacement }} {{- end }} - {{- $relabelings := .additionalRelabels | default $.Values.serviceMonitor.defaults.additionalRelabels }} - {{- if $relabelings }} + {{- with .additionalRelabels | default $.Values.serviceMonitor.defaults.additionalRelabels }} relabelings: - {{- toYaml $relabelings | nindent 6 }} + {{- toYaml . | nindent 6 }} {{- end }} jobLabel: "{{ $.Release.Name }}" selector: