Add an option for enabling monitoring in gce/config-default.sh and disable it

for tests.
Updated heapster readme.
This commit is contained in:
Vishnu Kannan
2014-11-06 22:25:18 +00:00
parent edf6d8ee3f
commit ad9cb982e5
4 changed files with 6 additions and 55 deletions

View File

@@ -35,3 +35,5 @@ MINION_SCOPES="compute-rw"
# Increase the sleep interval value if concerned about API rate limits. 3, in seconds, is the default.
POLL_SLEEP_INTERVAL=3
PORTAL_NET="10.0.0.0/16"
# When set to true, heapster will be setup as part of the cluster bring up.
MONITORING=true

View File

@@ -35,3 +35,4 @@ MINION_SCOPES=""
# Increase the sleep interval value if concerned about API rate limits. 3, in seconds, is the default.
POLL_SLEEP_INTERVAL=3
PORTAL_NET="10.0.0.0/16"
MONITORING=false

View File

@@ -575,10 +575,7 @@ function restart-kube-proxy {
# Setup monitoring using heapster and InfluxDB
function setup-monitoring {
read -p "Setup monitoring of the cluster using heapster (https://github.com/GoogleCloudPlatform/heapster) [Y|N]? " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]
then
if [ $MONITORING ]; then
teardown-monitoring
kubectl.sh create -f "${KUBE_ROOT}/examples/monitoring/influx-grafana-pod.json" &&
kubectl.sh create -f "${KUBE_ROOT}/examples/monitoring/influx-grafana-service.json" &&