From c14fc2a709fb4d6ea2079b5ceaa5ad552a74294b Mon Sep 17 00:00:00 2001
From: Philipp Schleier <philipp.schleier@ic-consult.com>
Date: Thu, 12 Nov 2020 17:35:41 +0100
Subject: [PATCH] Fix kubeadm selector and nodePort

---
 jsonnet/kube-prometheus/kube-prometheus-kubeadm.libsonnet    | 4 ++--
 jsonnet/kube-prometheus/kube-prometheus-node-ports.libsonnet | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/jsonnet/kube-prometheus/kube-prometheus-kubeadm.libsonnet b/jsonnet/kube-prometheus/kube-prometheus-kubeadm.libsonnet
index 0eccc939..ad35df2e 100644
--- a/jsonnet/kube-prometheus/kube-prometheus-kubeadm.libsonnet
+++ b/jsonnet/kube-prometheus/kube-prometheus-kubeadm.libsonnet
@@ -19,14 +19,14 @@ local service(name, namespace, labels, selector, ports) = {
       'kube-controller-manager-prometheus-discovery',
       'kube-system',
       { 'k8s-app': 'kube-controller-manager' },
-      { 'k8s-app': 'kube-controller-manager' },
+      { 'component': 'kube-controller-manager' },
       [{ name: 'https-metrics', port: 10257, targetPort: 10257 }]
     ),
     kubeSchedulerPrometheusDiscoveryService: service(
       'kube-scheduler-prometheus-discovery',
       'kube-system',
       { 'k8s-app': 'kube-scheduler' },
-      { 'k8s-app': 'kube-scheduler' },
+      { 'component': 'kube-scheduler' },
       [{ name: 'https-metrics', port: 10259, targetPort: 10259 }],
     ),
   },
diff --git a/jsonnet/kube-prometheus/kube-prometheus-node-ports.libsonnet b/jsonnet/kube-prometheus/kube-prometheus-node-ports.libsonnet
index b9369011..405a70ce 100644
--- a/jsonnet/kube-prometheus/kube-prometheus-node-ports.libsonnet
+++ b/jsonnet/kube-prometheus/kube-prometheus-node-ports.libsonnet
@@ -1,6 +1,6 @@
 local patch(ports) = {
   spec+: {
-    ports+: ports,
+    ports: ports,
     type: 'NodePort',
   },
 };
-- 
GitLab