Add the GCE cluster name to instance metadata.

This commit is contained in:
Robert Bailey
2016-02-25 16:00:16 -08:00
parent 80e201f74b
commit 30b78e4d7f
7 changed files with 24 additions and 11 deletions

View File

@@ -427,6 +427,15 @@ function build-runtime-config() {
:
}
# Writes the cluster name into a temporary file.
# Assumed vars
# CLUSTER_NAME
function write-cluster-name {
cat >"${KUBE_TEMP}/cluster-name.txt" << EOF
${CLUSTER_NAME}
EOF
}
function write-master-env {
# If the user requested that the master be part of the cluster, set the
# environment variable to program the master kubelet to register itself.