Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Infer KUBERNETES_MASTER from hostname rather than requiring it to be explicit #5396

Merged
merged 1 commit into from
Mar 12, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 7 additions & 0 deletions cluster/gce/configure-vm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,13 @@ for k,v in yaml.load(sys.stdin).iteritems():
done
fi

# Infer master status from presence in node pool
if [[ $(hostname) = ${NODE_INSTANCE_PREFIX}* ]]; then
KUBERNETES_MASTER="false"
else
KUBERNETES_MASTER="true"
fi

if [[ "${KUBERNETES_MASTER}" == "true" ]]; then
# TODO(zmerlynn): This block of code should disappear once #4561 & #4562 are done
if [[ -z "${KUBERNETES_NODE_NAMES:-}" ]]; then
Expand Down
1 change: 0 additions & 1 deletion cluster/gce/util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,6 @@ function build-kube-env {
rm -f ${file}
cat >$file <<EOF
ENV_TIMESTAMP: $(yaml-quote $(date -uIs))
KUBERNETES_MASTER: $(yaml-quote ${master})
INSTANCE_PREFIX: $(yaml-quote ${INSTANCE_PREFIX})
NODE_INSTANCE_PREFIX: $(yaml-quote ${NODE_INSTANCE_PREFIX})
SERVER_BINARY_TAR_URL: $(yaml-quote ${SERVER_BINARY_TAR_URL})
Expand Down