[prometheus] allow boolean pushgateway extraArgs (#1076)

* allow boolean pushgateway extraArgs

Signed-off-by: marius.schmidt <gietschess@gmail.com>

* string comparison

Signed-off-by: marius.schmidt <gietschess@gmail.com>

Co-authored-by: marius.schmidt <gietschess@gmail.com>
Co-authored-by: André Bauer <monotek@users.noreply.github.com>
This commit is contained in:
gietschess
2021-06-16 15:15:11 +02:00
committed by GitHub
co-authored by marius.schmidt André Bauer
parent 71af38441e
commit b76894ae69
2 changed files with 8 additions and 3 deletions
+1 -1
View File
@@ -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
@@ -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: