From d57542eae14bca36c82db080e3db5be6824b2d05 Mon Sep 17 00:00:00 2001
From: Ajit <9692020+a8j8i8t8@users.noreply.github.com>
Date: Mon, 31 May 2021 23:08:59 +0200
Subject: [PATCH] Fix for bug #1163 (#1164)

---
 jsonnet/kube-prometheus/platforms/kops.libsonnet | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/jsonnet/kube-prometheus/platforms/kops.libsonnet b/jsonnet/kube-prometheus/platforms/kops.libsonnet
index 914ffb02..52eac362 100644
--- a/jsonnet/kube-prometheus/platforms/kops.libsonnet
+++ b/jsonnet/kube-prometheus/platforms/kops.libsonnet
@@ -18,22 +18,22 @@ local service(name, namespace, labels, selector, ports) = {
     kubeControllerManagerPrometheusDiscoveryService: service(
       'kube-controller-manager-prometheus-discovery',
       'kube-system',
-      { 'app.kubernetes.io/name': 'kube-controller-manager' },
-      { 'app.kubernetes.io/name': 'kube-controller-manager' },
+      { 'k8s-app': 'kube-controller-manager', 'app.kubernetes.io/name': 'kube-controller-manager' },
+      { 'k8s-app': 'kube-controller-manager' },
       [{ name: 'https-metrics', port: 10257, targetPort: 10257 }]
     ),
     kubeSchedulerPrometheusDiscoveryService: service(
       'kube-scheduler-prometheus-discovery',
       'kube-system',
-      { 'app.kubernetes.io/name': 'kube-scheduler' },
-      { 'app.kubernetes.io/name': 'kube-scheduler' },
+      { 'k8s-app': 'kube-controller-manager', 'app.kubernetes.io/name': 'kube-scheduler' },
+      { 'k8s-app': 'kube-scheduler' },
       [{ name: 'https-metrics', port: 10259, targetPort: 10259 }]
     ),
     kubeDnsPrometheusDiscoveryService: service(
       'kube-dns-prometheus-discovery',
       'kube-system',
-      { 'app.kubernetes.io/name': 'kube-dns' },
-      { 'app.kubernetes.io/name': 'kube-dns' },
+      { 'k8s-app': 'kube-controller-manager', 'app.kubernetes.io/name': 'kube-dns' },
+      { 'k8s-app': 'kube-dns' },
       [{ name: 'metrics', port: 10055, targetPort: 10055 }, { name: 'http-metrics-dnsmasq', port: 10054, targetPort: 10054 }]
     ),
   },
-- 
GitLab