From b76894ae69d2860aa34a116136c245c2de82e9ca Mon Sep 17 00:00:00 2001 From: gietschess <49275246+gietschess@users.noreply.github.com> Date: Wed, 16 Jun 2021 15:15:11 +0200 Subject: [PATCH] [prometheus] allow boolean pushgateway extraArgs (#1076) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * allow boolean pushgateway extraArgs Signed-off-by: marius.schmidt * string comparison Signed-off-by: marius.schmidt Co-authored-by: marius.schmidt Co-authored-by: André Bauer --- charts/prometheus/Chart.yaml | 2 +- charts/prometheus/templates/pushgateway/deploy.yaml | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/charts/prometheus/Chart.yaml b/charts/prometheus/Chart.yaml index 37c5ed74..59b9c50f 100644 --- a/charts/prometheus/Chart.yaml +++ b/charts/prometheus/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: prometheus appVersion: 2.26.0 -version: 14.1.3 +version: 14.2.0 description: Prometheus is a monitoring system and time series database. home: https://prometheus.io/ icon: https://raw.githubusercontent.com/prometheus/prometheus.github.io/master/assets/prometheus_logo-cb55bb5c346.png diff --git a/charts/prometheus/templates/pushgateway/deploy.yaml b/charts/prometheus/templates/pushgateway/deploy.yaml index b9a71ab5..ffdbfcc4 100644 --- a/charts/prometheus/templates/pushgateway/deploy.yaml +++ b/charts/prometheus/templates/pushgateway/deploy.yaml @@ -31,9 +31,9 @@ spec: {{- end }} labels: {{- include "prometheus.pushgateway.labels" . | nindent 8 }} - {{- if .Values.pushgateway.podLabels}} + {{- if .Values.pushgateway.podLabels }} {{ toYaml .Values.pushgateway.podLabels | nindent 8 }} - {{- end}} + {{- end }} spec: serviceAccountName: {{ template "prometheus.serviceAccountName.pushgateway" . }} {{- if .Values.pushgateway.extraInitContainers }} @@ -49,8 +49,13 @@ spec: imagePullPolicy: "{{ .Values.pushgateway.image.pullPolicy }}" args: {{- range $key, $value := .Values.pushgateway.extraArgs }} + {{- $stringvalue := toString $value }} + {{- if eq $stringvalue "true" }} + - --{{ $key }} + {{- else }} - --{{ $key }}={{ $value }} {{- end }} + {{- end }} ports: - containerPort: 9091 livenessProbe: