echo"waiting for monitoring pods to be scheduled."
for i in`seq 1 10`;do
grafana_host=$("${kubectl}" get pods -lname=influxGrafana -o template -t{{range.items}}{{.currentState.hostIP}}:{{end}})
if[[$grafana_host!=*"<"*]];then
break
fi
sleep 10
done
if[[$grafana_host!=*"<"*]];then
echo
echo-e"${color_green}Grafana dashboard will be available at ${color_yellow}http://$grafana_host${color_green}. Wait for the monitoring dashboard to be online.${color_norm}"
echo
else
echo-e"${color_red}monitoring pods failed to be scheduled.${color_norm}"
fi
else
echo"Failed to Setup Monitoring"
echo-e"${color_red}Failed to Setup Monitoring ${color_norm}"
teardown-monitoring
fi
fi
...
...
@@ -776,9 +778,10 @@ function teardown-monitoring {