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: {}