From b8d5b174c5d53fdfbee7540164eae6a088995e29 Mon Sep 17 00:00:00 2001 From: Julien Girardin Date: Thu, 17 Mar 2022 22:08:49 +0100 Subject: [PATCH] [kube-prometheus-stack] Add alertmanager alertmanager configuration (#1880) * [kube-prometheus-stack] add alertmanagerConfigurarion to the generated altermanager object Signed-off-by: Julien Girardin * [kube-prometheus-stack] bump kube-prometheus-stack to 34.0.1 Signed-off-by: Julien Girardin * New feature means minor version (and not patch) Signed-off-by: Julien Girardin --- charts/kube-prometheus-stack/Chart.yaml | 2 +- .../templates/alertmanager/alertmanager.yaml | 4 ++++ charts/kube-prometheus-stack/values.yaml | 5 +++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/charts/kube-prometheus-stack/Chart.yaml b/charts/kube-prometheus-stack/Chart.yaml index c2163fff24ce..9923b07012ea 100644 --- a/charts/kube-prometheus-stack/Chart.yaml +++ b/charts/kube-prometheus-stack/Chart.yaml @@ -23,7 +23,7 @@ name: kube-prometheus-stack sources: - https://github.com/prometheus-community/helm-charts - https://github.com/prometheus-operator/kube-prometheus -version: 34.0.0 +version: 34.1.0 appVersion: 0.55.0 kubeVersion: ">=1.16.0-0" home: https://github.com/prometheus-operator/kube-prometheus diff --git a/charts/kube-prometheus-stack/templates/alertmanager/alertmanager.yaml b/charts/kube-prometheus-stack/templates/alertmanager/alertmanager.yaml index b296acfc2084..b30f6b2acdae 100644 --- a/charts/kube-prometheus-stack/templates/alertmanager/alertmanager.yaml +++ b/charts/kube-prometheus-stack/templates/alertmanager/alertmanager.yaml @@ -68,6 +68,10 @@ spec: {{ else }} alertmanagerConfigNamespaceSelector: {} {{- end }} +{{- if .Values.alertmanager.alertmanagerSpec.alertmanagerConfiguration }} + alertmanagerConfiguration: +{{ toYaml .Values.alertmanager.alertmanagerSpec.alertmanagerConfiguration | indent 4 }} +{{- end }} {{- if .Values.alertmanager.alertmanagerSpec.resources }} resources: {{ toYaml .Values.alertmanager.alertmanagerSpec.resources | indent 4 }} diff --git a/charts/kube-prometheus-stack/values.yaml b/charts/kube-prometheus-stack/values.yaml index a3de079462ee..b232ffee10f6 100644 --- a/charts/kube-prometheus-stack/values.yaml +++ b/charts/kube-prometheus-stack/values.yaml @@ -473,6 +473,11 @@ alertmanager: # matchLabels: # alertmanagerconfig: enabled + ## AlermanagerConfig to be used as top level configuration + ## + altermanagerConfiguration: {} + # - name: global-alertmanager-Configuration + ## Define Log Format # Use logfmt (default) or json logging logFormat: logfmt