allow prom to scrape services and endpoints

This commit is contained in:
Finn 2024-07-10 20:18:39 -07:00
parent 8280da0007
commit 4b7717d07a
2 changed files with 6 additions and 2 deletions

View file

@ -14,6 +14,10 @@
action: replace action: replace
target_label: __metrics_path__ target_label: __metrics_path__
regex: (.+) regex: (.+)
- source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scheme]
action: replace
target_label: __scheme__
regex: (.+)
- action: labelmap - action: labelmap
regex: __meta_kubernetes_pod_label_(.+) regex: __meta_kubernetes_pod_label_(.+)
- source_labels: [__meta_kubernetes_namespace] - source_labels: [__meta_kubernetes_namespace]

View file

@ -2,5 +2,5 @@
path: /rules/- path: /rules/-
value: value:
apiGroups: [""] apiGroups: [""]
resources: [pods] resources: [pods, services, endpoints]
verbs: [list, get, watch] verbs: [list, watch]