From 7dffea0dc015ecb2e2f687c1682d0e5662f671c2 Mon Sep 17 00:00:00 2001 From: Random-Liu Date: Fri, 3 Jun 2016 16:51:15 -0700 Subject: [PATCH] Re-enable node problem detector by default --- .../node-problem-detector/node-problem-detector.yaml.in | 2 +- cluster/gce/config-default.sh | 2 +- cluster/gce/config-test.sh | 2 +- cluster/gce/gci/configure-helper.sh | 7 +++++++ 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/cluster/addons/node-problem-detector/node-problem-detector.yaml.in b/cluster/addons/node-problem-detector/node-problem-detector.yaml.in index 343e994ee38..6b30b328261 100644 --- a/cluster/addons/node-problem-detector/node-problem-detector.yaml.in +++ b/cluster/addons/node-problem-detector/node-problem-detector.yaml.in @@ -32,7 +32,7 @@ spec: cpu: "200m" memory: "100Mi" requests: - cpu: "50m" + cpu: "20m" memory: "20Mi" volumeMounts: - name: log diff --git a/cluster/gce/config-default.sh b/cluster/gce/config-default.sh index 8662d33af9f..844a5696313 100755 --- a/cluster/gce/config-default.sh +++ b/cluster/gce/config-default.sh @@ -112,7 +112,7 @@ CLUSTER_REGISTRY_DISK_TYPE_GCE="${CLUSTER_REGISTRY_DISK_TYPE_GCE:-pd-standard}" ENABLE_CLUSTER_UI="${KUBE_ENABLE_CLUSTER_UI:-true}" # Optional: Install node problem detector. -ENABLE_NODE_PROBLEM_DETECTOR="${KUBE_ENABLE_NODE_PROBLEM_DETECTOR:-false}" +ENABLE_NODE_PROBLEM_DETECTOR="${KUBE_ENABLE_NODE_PROBLEM_DETECTOR:-true}" # Optional: Create autoscaler for cluster's nodes. ENABLE_NODE_AUTOSCALER="${KUBE_ENABLE_NODE_AUTOSCALER:-false}" diff --git a/cluster/gce/config-test.sh b/cluster/gce/config-test.sh index 4ba03117bc8..81575b6f2b2 100755 --- a/cluster/gce/config-test.sh +++ b/cluster/gce/config-test.sh @@ -126,7 +126,7 @@ CLUSTER_REGISTRY_DISK_TYPE_GCE="${CLUSTER_REGISTRY_DISK_TYPE_GCE:-pd-standard}" ENABLE_CLUSTER_UI="${KUBE_ENABLE_CLUSTER_UI:-true}" # Optional: Install node problem detector. -ENABLE_NODE_PROBLEM_DETECTOR="${KUBE_ENABLE_NODE_PROBLEM_DETECTOR:-false}" +ENABLE_NODE_PROBLEM_DETECTOR="${KUBE_ENABLE_NODE_PROBLEM_DETECTOR:-true}" # Optional: Create autoscaler for cluster's nodes. ENABLE_NODE_AUTOSCALER="${KUBE_ENABLE_NODE_AUTOSCALER:-false}" diff --git a/cluster/gce/gci/configure-helper.sh b/cluster/gce/gci/configure-helper.sh index ddc49a80b37..6a2c9200c36 100644 --- a/cluster/gce/gci/configure-helper.sh +++ b/cluster/gce/gci/configure-helper.sh @@ -741,6 +741,13 @@ function start-kube-addons { if [[ "${ENABLE_CLUSTER_UI:-}" == "true" ]]; then setup-addon-manifests "addons" "dashboard" fi + if [[ "${ENABLE_NODE_PROBLEM_DETECTOR:-}" == "true" ]]; then + setup-addon-manifests "addons" "node-problem-detector" + local -r node_problem_detector_file="${dst_dir}/node-problem-detector/node-problem-detector.yaml" + mv "${dst_dir}/node-problem-detector/node-problem-detector.yaml.in" "${node_problem_detector_file}" + # Replace the salt configurations with variable values. + sed -i -e "s@{{ *pillar\['master_node'\] *}}@${MASTER_NAME}@g" "${node_problem_detector_file}" + fi if echo "${ADMISSION_CONTROL:-}" | grep -q "LimitRanger"; then setup-addon-manifests "admission-controls" "limit-range" fi