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 name: node-exporter
namespace: monitoring namespace: monitoring
annotations: annotations:
prometheus.io/scrape: 'true' prometheus.io/scrape: 'true'
prometheus.io/port: '9100' prometheus.io/port: '9100'
labels:
app.kubernetes.io/component: exporter
app.kubernetes.io/name: node-exporter
spec: spec:
selector:
app.kubernetes.io/component: exporter
app.kubernetes.io/name: node-exporter
ports: ports:
- name: node-exporter - name: node-exporter
protocol: TCP protocol: TCP
port: 9100 port: 9100
targetPort: 9100 targetPort: 9100
selector:
app.kubernetes.io/component: exporter
app.kubernetes.io/name: node-exporter

View File

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