diff --git a/tests/e2e-targetallocator/targetallocator-prometheuscr/02-install.yaml b/tests/e2e-targetallocator/targetallocator-prometheuscr/02-install.yaml index 1ddd2cec9b..895a7aa8b7 100644 --- a/tests/e2e-targetallocator/targetallocator-prometheuscr/02-install.yaml +++ b/tests/e2e-targetallocator/targetallocator-prometheuscr/02-install.yaml @@ -57,6 +57,27 @@ spec: --- apiVersion: batch/v1 kind: Job +metadata: + name: check-metrics +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: