diff --git a/hack/e2e-suite/monitoring.sh b/hack/e2e-suite/monitoring.sh index 5820ec463d9..1871b20d590 100755 --- a/hack/e2e-suite/monitoring.sh +++ b/hack/e2e-suite/monitoring.sh @@ -51,6 +51,10 @@ function setup { function cleanup { "${KUBECFG}" resize monitoring-influxGrafanaController 0 &> /dev/null || true "${KUBECFG}" resize monitoring-heapsterController 0 &> /dev/null || true + while kubectl.sh get pods -l "name=influxGrafana" -o template -t {{range.items}}{{.id}}:{{end}} | grep -c . &> /dev/null \ + || kubectl.sh get pods -l "name=heapster" -o template -t {{range.items}}{{.id}}:{{end}} | grep -c . &> /dev/null; do + sleep 2 + done "${KUBECTL}" delete -f "${MONITORING}/" &> /dev/null || true # This only has work to do on gce and gke @@ -104,6 +108,9 @@ function wait-for-pods { trap cleanup EXIT +# Remove any pre-existing monitoring services. +cleanup + # Start monitoring pods and services. setup