Skip to content

Commit 56b2462

Browse files
committed
[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>
1 parent f4f38ef commit 56b2462

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
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: 68.4.5
34+
version: 68.4.6
3535
appVersion: v0.79.2
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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ 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:

0 commit comments

Comments
 (0)