kubelet: Revert label selector

The Kubelet's Service/Endpoints object maintained by the Prometheus
Operator does not have the recommended app label (yet). Therefore we
need to use the old label until a Prometheus Operator version has been
released and integrated in kube-promteheus that does use it.
This commit is contained in:
Frederic Branczyk
2021-01-04 16:45:27 +01:00
parent a4306c9c7a
commit cf916082b8
2 changed files with 4 additions and 4 deletions

View File

@@ -309,7 +309,7 @@ local relabelings = import 'kube-prometheus/dropping-deprecated-metrics-relabeli
labels: { 'app.kubernetes.io/name': 'kubelet' }, labels: { 'app.kubernetes.io/name': 'kubelet' },
}, },
spec: { spec: {
jobLabel: 'app.kubernetes.io/name', jobLabel: 'k8s-app',
endpoints: [ endpoints: [
{ {
port: 'https-metrics', port: 'https-metrics',
@@ -364,7 +364,7 @@ local relabelings = import 'kube-prometheus/dropping-deprecated-metrics-relabeli
}, },
], ],
selector: { selector: {
matchLabels: { 'app.kubernetes.io/name': 'kubelet' }, matchLabels: { 'k8s-app': 'kubelet' },
}, },
namespaceSelector: { namespaceSelector: {
matchNames: ['kube-system'], matchNames: ['kube-system'],

View File

@@ -81,10 +81,10 @@ spec:
scheme: https scheme: https
tlsConfig: tlsConfig:
insecureSkipVerify: true insecureSkipVerify: true
jobLabel: app.kubernetes.io/name jobLabel: k8s-app
namespaceSelector: namespaceSelector:
matchNames: matchNames:
- kube-system - kube-system
selector: selector:
matchLabels: matchLabels:
app.kubernetes.io/name: kubelet k8s-app: kubelet