Skip to content

Commit

Permalink
e2e test prometheus operator scrape config and probes
Browse files Browse the repository at this point in the history
Signed-off-by: qiyang <[email protected]>
  • Loading branch information
dominicqi committed Dec 5, 2024
1 parent 2716ce4 commit 1a6fdb9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 21 deletions.
2 changes: 2 additions & 0 deletions internal/manifests/targetallocator/configmap_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,8 @@ https:
prometheus_cr:
enabled: true
pod_monitor_selector: null
probe_selector: null
scrape_config_selector: null
scrape_interval: 30s
service_monitor_selector: null
`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ rules:
resources:
- servicemonitors
- podmonitors
- scrapeconfigs
- probes
verbs:
- get
- watch
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,27 +58,6 @@ spec:
---
apiVersion: batch/v1
kind: Job
metadata:
name: check-metrics-cr
spec:
template:
spec:
restartPolicy: OnFailure
containers:
- name: check-metrics
image: curlimages/curl
args:
- /bin/sh
- -c
- |
for i in $(seq 30); do
if curl -m 1 -s http://prometheus-cr-v1beta1-collector:9090/metrics | grep "otelcol"; then exit 0; fi
sleep 5
done
exit 1
---
apiVersion: batch/v1
kind: Job
metadata:
name: check-ta-scrape-config-v1beta1
spec:
Expand Down

0 comments on commit 1a6fdb9

Please sign in to comment.