fix(monitoring): drop redundant relabels, resolve ServiceMonitor drift
Both new ServiceMonitors sat permanently OutOfSync. Cause: `action: replace` is the API server default for relabeling rules, so the live object carried it while the manifests omitted it. Rather than write out the default to paper over drift, removed the rules that were never needed: - vllm.yaml: the namespace/pod/service relabelings were redundant — Kubernetes service discovery already supplies all three. Only `app` has to be derived (TEI panels aggregate by it and SD does not promote arbitrary pod labels). Kept that one, with an explicit action. - api-gateway.yaml: the metricRelabelings block was a no-op — it mapped __address__ onto instance, which is already the default. Removed. The series inventory it was documenting moved up into the file header, which is where it belonged anyway.
This commit is contained in:
@@ -36,11 +36,14 @@ spec:
|
||||
path: /metrics
|
||||
scheme: http
|
||||
relabelings:
|
||||
- sourceLabels: [__meta_kubernetes_namespace]
|
||||
targetLabel: namespace
|
||||
- sourceLabels: [__meta_kubernetes_pod_name]
|
||||
targetLabel: pod
|
||||
- sourceLabels: [__meta_kubernetes_service_name]
|
||||
targetLabel: service
|
||||
- sourceLabels: [__meta_kubernetes_pod_label_app_kubernetes_io_name]
|
||||
# Prometheus's Kubernetes service discovery already supplies the
|
||||
# namespace, pod and service labels; the only one that needs deriving
|
||||
# is `app`, since the TEI panels aggregate by it (by (app)) and SD does
|
||||
# not promote arbitrary pod labels.
|
||||
#
|
||||
# `action: replace` is written explicitly. It is the API server's
|
||||
# default for relabeling rules, so omitting it leaves the live object
|
||||
# diverged from this manifest and ArgoCD reports permanent OutOfSync.
|
||||
- action: replace
|
||||
sourceLabels: [__meta_kubernetes_pod_label_app_kubernetes_io_name]
|
||||
targetLabel: app
|
||||
|
||||
Reference in New Issue
Block a user