From 2511a6c529e8fe166aac32623b12d48f58a6773a Mon Sep 17 00:00:00 2001
From: Prune Sebastien THOMAS <prune@lecentre.net>
Date: Tue, 27 Aug 2019 11:53:12 -0400
Subject: [PATCH] use real alertmanager name

`alertmanager-main` is hardcoded where it should derive from the real alertmanager name as defined by the user
---
 jsonnet/kube-prometheus/kube-prometheus.libsonnet | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/jsonnet/kube-prometheus/kube-prometheus.libsonnet b/jsonnet/kube-prometheus/kube-prometheus.libsonnet
index f4c45de6..497dbbbf 100644
--- a/jsonnet/kube-prometheus/kube-prometheus.libsonnet
+++ b/jsonnet/kube-prometheus/kube-prometheus.libsonnet
@@ -89,7 +89,7 @@ local configMapList = k3.core.v1.configMapList;
     coreDNSSelector: 'job="kube-dns"',
     podLabel: 'pod',
 
-    alertmanagerSelector: 'job="alertmanager-main",namespace="' + $._config.namespace + '"',
+    alertmanagerSelector: 'job="alertmanager-' + $._config.alertmanager.name + '",namespace="' + $._config.namespace + '"',
     prometheusSelector: 'job="prometheus-' + $._config.prometheus.name + '",namespace="' + $._config.namespace + '"',
     prometheusName: '{{$labels.namespace}}/{{$labels.pod}}',
     prometheusOperatorSelector: 'job="prometheus-operator",namespace="' + $._config.namespace + '"',
-- 
GitLab