fix: argocd metrics port name, coredns metrics via headless service

This commit is contained in:
Martin McCaffery 2026-06-02 12:13:38 +01:00
parent eca54cb19c
commit b98486f445
No known key found for this signature in database
GPG key ID: 7C4D0F375BCEE533
2 changed files with 22 additions and 6 deletions

View file

@ -10,4 +10,4 @@ spec:
matchLabels: matchLabels:
app.kubernetes.io/part-of: argocd app.kubernetes.io/part-of: argocd
endpoints: endpoints:
- port: metrics - port: http-metrics

View file

@ -1,5 +1,22 @@
apiVersion: v1
kind: Service
metadata:
name: coredns-metrics
namespace: kube-system
labels:
k8s-app: coredns-metrics
spec:
clusterIP: None
selector:
k8s-app: coredns
ports:
- name: metrics
port: 9153
targetPort: 9153
protocol: TCP
---
apiVersion: operator.victoriametrics.com/v1beta1 apiVersion: operator.victoriametrics.com/v1beta1
kind: VMPodScrape kind: VMServiceScrape
metadata: metadata:
name: coredns name: coredns
spec: spec:
@ -8,7 +25,6 @@ spec:
- kube-system - kube-system
selector: selector:
matchLabels: matchLabels:
k8s-app: coredns k8s-app: coredns-metrics
podMetricsEndpoints: endpoints:
- targetPort: 9153 - port: metrics
path: /metrics