From 41468fb31288f6ad63298a487556ecf3ff316dc1 Mon Sep 17 00:00:00 2001 From: "Madhusudan.C.S" Date: Thu, 19 Jan 2017 11:10:51 -0800 Subject: [PATCH] Read the VERSIONS file for the FEDERATION_IMAGE_TAG value. This is particularly important in the local builds where there is no $KUBERNETES_RELEASE defined. --- federation/cluster/federation-up.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/federation/cluster/federation-up.sh b/federation/cluster/federation-up.sh index 1486060fc90..bd13d797a5f 100755 --- a/federation/cluster/federation-up.sh +++ b/federation/cluster/federation-up.sh @@ -82,6 +82,10 @@ if [[ "${USE_KUBEFED}" == "true" ]]; then init create_cluster_secrets else - export FEDERATION_IMAGE_TAG="$(echo ${KUBERNETES_RELEASE:-} | tr + _)" + # Read the version back from the versions file if no version is given. + readonly kube_version="$(cat ${KUBE_ROOT}/_output/federation/versions | python -c '\ +import json, sys;\ +print json.load(sys.stdin)["KUBE_VERSION"]')" + export FEDERATION_IMAGE_TAG="$(echo ${KUBERNETES_RELEASE:-${kube_version}} | tr + _)" create-federation-api-objects fi