From a13fb8d07912caae1e75ab1a1413e2b1e6c2515a Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Tue, 25 Feb 2020 22:30:39 +0100 Subject: [PATCH] no service selector --- monitoring/k3s.libsonnet | 4 ++-- ...theus-kubeControllerManagerPrometheusDiscoveryService.yaml | 1 + .../prometheus-kubeSchedulerPrometheusDiscoveryService.yaml | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/monitoring/k3s.libsonnet b/monitoring/k3s.libsonnet index b1bf8e0..f3b7657 100644 --- a/monitoring/k3s.libsonnet +++ b/monitoring/k3s.libsonnet @@ -14,7 +14,7 @@ local masterIP = '185.95.218.11'; service.mixin.metadata.withNamespace('kube-system') + service.mixin.metadata.withLabels({ 'k8s-app': 'kube-scheduler' }) + service.mixin.spec.withClusterIp('None') + - service.mixin.spec.withSelector(''), + service.mixin.spec.withSelector({}), kubeSchedulerPrometheusDiscoveryEndpoints: local port = endpointPort.new() + endpointPort.withName('http-metrics') + @@ -37,7 +37,7 @@ local masterIP = '185.95.218.11'; service.mixin.metadata.withNamespace('kube-system') + service.mixin.metadata.withLabels({ 'k8s-app': 'kube-controller-manager' }) + service.mixin.spec.withClusterIp('None') + - service.mixin.spec.withSelector(''), + service.mixin.spec.withSelector({}), kubeControllerManagerPrometheusDiscoveryEndpoints: local port = endpointPort.new() + endpointPort.withName('http-metrics') + diff --git a/monitoring/manifests/prometheus-kubeControllerManagerPrometheusDiscoveryService.yaml b/monitoring/manifests/prometheus-kubeControllerManagerPrometheusDiscoveryService.yaml index 325b862..70bfd1b 100644 --- a/monitoring/manifests/prometheus-kubeControllerManagerPrometheusDiscoveryService.yaml +++ b/monitoring/manifests/prometheus-kubeControllerManagerPrometheusDiscoveryService.yaml @@ -11,3 +11,4 @@ spec: - name: http-metrics port: 10252 targetPort: 10252 + selector: {} diff --git a/monitoring/manifests/prometheus-kubeSchedulerPrometheusDiscoveryService.yaml b/monitoring/manifests/prometheus-kubeSchedulerPrometheusDiscoveryService.yaml index 10783bf..ad76360 100644 --- a/monitoring/manifests/prometheus-kubeSchedulerPrometheusDiscoveryService.yaml +++ b/monitoring/manifests/prometheus-kubeSchedulerPrometheusDiscoveryService.yaml @@ -11,3 +11,4 @@ spec: - name: http-metrics port: 10251 targetPort: 10251 + selector: {}