Skip to content

Commit 543fdf6

Browse files
authored
[kube-prometheus-stack] Add support for tpl in various prometheus spec fields (#5286)
* [kube-prometheus-stack] Add support for templating in AM relabel configs and secrets There is a need to dynamically templating relabel config and mounting secrets like the `.Release.Name`. Signed-off-by: Richard Tief <richard.tief@sap.com> * [kube-prometheus-stack] Add support for templating ConfigMaps names Signed-off-by: Richard Tief <richard.tief@sap.com> --------- Signed-off-by: Richard Tief <richard.tief@sap.com> Signed-off-by: Richard Tief <56597015+richardtief@users.noreply.github.com>
1 parent 3aa3bbb commit 543fdf6

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

charts/kube-prometheus-stack/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ name: kube-prometheus-stack
3131
sources:
3232
- https://github.com/prometheus-community/helm-charts
3333
- https://github.com/prometheus-operator/kube-prometheus
34-
version: 69.2.1
34+
version: 69.2.2
3535
appVersion: v0.80.0
3636
kubeVersion: ">=1.19.0-0"
3737
home: https://github.com/prometheus-operator/kube-prometheus

charts/kube-prometheus-stack/templates/prometheus/additionalAlertRelabelConfigs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ metadata:
1212
app: {{ template "kube-prometheus-stack.name" . }}-prometheus-am-relabel-confg
1313
{{ include "kube-prometheus-stack.labels" . | indent 4 }}
1414
data:
15-
additional-alert-relabel-configs.yaml: {{ toYaml .Values.prometheus.prometheusSpec.additionalAlertRelabelConfigs | b64enc | quote }}
15+
additional-alert-relabel-configs.yaml: {{ tpl (toYaml .Values.prometheus.prometheusSpec.additionalAlertRelabelConfigs) . | b64enc | quote }}
1616
{{- end }}

charts/kube-prometheus-stack/templates/prometheus/prometheus.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,11 +153,11 @@ spec:
153153
{{- end }}
154154
{{- if .Values.prometheus.prometheusSpec.secrets }}
155155
secrets:
156-
{{ toYaml .Values.prometheus.prometheusSpec.secrets | indent 4 }}
156+
{{ tpl (toYaml .Values.prometheus.prometheusSpec.secrets) . | indent 4 }}
157157
{{- end }}
158158
{{- if .Values.prometheus.prometheusSpec.configMaps }}
159159
configMaps:
160-
{{ toYaml .Values.prometheus.prometheusSpec.configMaps | indent 4 }}
160+
{{ tpl (toYaml .Values.prometheus.prometheusSpec.configMaps) . | indent 4 }}
161161
{{- end }}
162162
serviceAccountName: {{ template "kube-prometheus-stack.prometheus.serviceAccountName" . }}
163163
{{- if .Values.prometheus.prometheusSpec.serviceMonitorSelector }}

0 commit comments

Comments
 (0)