From 60404a55fc2448476c58cb27385a2f38e517ccb6 Mon Sep 17 00:00:00 2001 From: gmarek Date: Wed, 14 Oct 2015 15:56:19 +0200 Subject: [PATCH] Make Node.yaml use KUBELET_PORT instead of hardcoded 10250 --- cluster/gce/trusty/helper.sh | 2 ++ cluster/gce/trusty/{node.yaml => node_template.yaml} | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) rename cluster/gce/trusty/{node.yaml => node_template.yaml} (99%) diff --git a/cluster/gce/trusty/helper.sh b/cluster/gce/trusty/helper.sh index 72062dc8296..075395514bf 100755 --- a/cluster/gce/trusty/helper.sh +++ b/cluster/gce/trusty/helper.sh @@ -30,7 +30,9 @@ source "${KUBE_ROOT}/cluster/gce/debian/helper.sh" # $1: template name (required) function create-node-instance-template { local template_name="$1" + sed "s/##KUBELET_PORT##/${KUBELET_PORT}/g" ${KUBE_ROOT}/cluster/gce/trusty/node_template.yaml > ${KUBE_ROOT}/cluster/gce/trusty/node.yaml create-node-template "$template_name" "${scope_flags[*]}" \ "kube-env=${KUBE_TEMP}/node-kube-env.yaml" \ "user-data=${KUBE_ROOT}/cluster/gce/trusty/node.yaml" + rm ${KUBE_ROOT}/cluster/gce/trusty/node.yaml } diff --git a/cluster/gce/trusty/node.yaml b/cluster/gce/trusty/node_template.yaml similarity index 99% rename from cluster/gce/trusty/node.yaml rename to cluster/gce/trusty/node_template.yaml index 2069d910deb..c9babe361f4 100644 --- a/cluster/gce/trusty/node.yaml +++ b/cluster/gce/trusty/node_template.yaml @@ -403,7 +403,7 @@ script echo "Docker daemon failed!" pkill docker fi - if ! curl --insecure -m ${max_seconds} -f -s https://127.0.0.1:10250/healthz > /dev/null; then + if ! curl --insecure -m ${max_seconds} -f -s https://127.0.0.1:##KUBELET_PORT##/healthz > /dev/null; then echo "Kubelet is unhealthy!" pkill kubelet fi