Merge "Fix prometheus metrics gathering in postrun job"

This commit is contained in:
Zuul 2019-04-24 14:26:09 +00:00 committed by Gerrit Code Review
commit 53e1278bab

View File

@ -23,7 +23,7 @@
SERVICES=$(kubectl get svc -l component=metrics -n $NS -o json | jq -r '.items[].metadata.name')
for SVC in $SERVICES; do
PORT=$(kubectl get svc $SVC -n $NS -o json | jq -r '.spec.ports[].port')
curl "$SVC.$NS:$PORT/metrics" >> "{{ logs_dir }}"/prometheus/$NS-$SVC.txt
curl "$SVC.$NS:$PORT/metrics" >> "{{ logs_dir }}"/prometheus/$NS-$SVC.txt || true
done
done
args: