fix(selector): Update labels

This commit is contained in:
Tanguy Herbron 2024-11-11 20:03:27 +01:00
parent 1f743693c5
commit 11eefe9cdb
2 changed files with 9 additions and 5 deletions

View File

@ -4,14 +4,17 @@ metadata:
name: node-exporter
namespace: monitoring
annotations:
prometheus.io/scrape: 'true'
prometheus.io/port: '9100'
prometheus.io/scrape: 'true'
prometheus.io/port: '9100'
labels:
app.kubernetes.io/component: exporter
app.kubernetes.io/name: node-exporter
spec:
selector:
app.kubernetes.io/component: exporter
app.kubernetes.io/name: node-exporter
ports:
- name: node-exporter
protocol: TCP
port: 9100
targetPort: 9100
selector:
app.kubernetes.io/component: exporter
app.kubernetes.io/name: node-exporter

View File

@ -6,6 +6,7 @@ metadata:
spec:
selector:
matchLabels:
app.kubernetes.io/component: exporter
app.kubernetes.io/name: node-exporter
endpoints:
- port: node-exporter