enable k8s scraping by annotation servicemonitors are too hard

This commit is contained in:
Finn 2024-07-10 15:57:09 -07:00
parent fd41ce8cc2
commit 9088fad25e
3 changed files with 25 additions and 0 deletions

View file

@ -0,0 +1,6 @@
- op: add
path: /rules/-
value:
apiGroups: [""]
resources: [pods]
verbs: [list, get, watch]

View file

@ -24,3 +24,13 @@ patches:
target: target:
kind: NetworkPolicy kind: NetworkPolicy
name: alertmanager-main name: alertmanager-main
- path: prometheus-patch.yaml
target:
kind: Prometheus
name: k8s
- path: cluster-role-patch.yaml
target:
kind: ClusterRole
name: prometheus-k8s

View file

@ -0,0 +1,9 @@
- op: add
path: /spec/additionalScrapeConfigs
value:
key: scrape-configs.yaml
name: additional-scrape-configs
optional: true
- op: add
path: /spec/secrets
value: [scrape-secrets]