@@ -248,16 +248,21 @@ function set-preferred-region() {
248248# Assumed vars:
249249# PROJECT
250250# SERVER_BINARY_TAR
251+ # NODE_BINARY_TAR (optional)
251252# KUBE_MANIFESTS_TAR
252253# ZONE
253254# Vars set:
254255# SERVER_BINARY_TAR_URL
255256# SERVER_BINARY_TAR_HASH
257+ # NODE_BINARY_TAR_URL
258+ # NODE_BINARY_TAR_HASH
256259# KUBE_MANIFESTS_TAR_URL
257260# KUBE_MANIFESTS_TAR_HASH
258- function upload-server- tars() {
261+ function upload-tars() {
259262 SERVER_BINARY_TAR_URL=
260263 SERVER_BINARY_TAR_HASH=
264+ NODE_BINARY_TAR_URL=
265+ NODE_BINARY_TAR_HASH=
261266 KUBE_MANIFESTS_TAR_URL=
262267 KUBE_MANIFESTS_TAR_HASH=
263268
@@ -279,11 +284,16 @@ function upload-server-tars() {
279284 fi
280285
281286 SERVER_BINARY_TAR_HASH=$( sha1sum-file " ${SERVER_BINARY_TAR} " )
287+
288+ if [[ -n " ${NODE_BINARY_TAR:- } " ]]; then
289+ NODE_BINARY_TAR_HASH=$( sha1sum-file " ${NODE_BINARY_TAR} " )
290+ fi
282291 if [[ -n " ${KUBE_MANIFESTS_TAR:- } " ]]; then
283292 KUBE_MANIFESTS_TAR_HASH=$( sha1sum-file " ${KUBE_MANIFESTS_TAR} " )
284293 fi
285294
286295 local server_binary_tar_urls=()
296+ local node_binary_tar_urls=()
287297 local kube_manifest_tar_urls=()
288298
289299 for region in " ${PREFERRED_REGION[@]} " ; do
@@ -301,12 +311,20 @@ function upload-server-tars() {
301311
302312 local staging_path=" ${staging_bucket} /${INSTANCE_PREFIX} -devel"
303313
304- echo " +++ Staging server tars to Google Storage: ${staging_path} "
314+ echo " +++ Staging tars to Google Storage: ${staging_path} "
305315 local server_binary_gs_url=" ${staging_path} /${SERVER_BINARY_TAR##*/ } "
306316 copy-to-staging " ${staging_path} " " ${server_binary_gs_url} " " ${SERVER_BINARY_TAR} " " ${SERVER_BINARY_TAR_HASH} "
307317
318+ if [[ -n " ${NODE_BINARY_TAR:- } " ]]; then
319+ local node_binary_gs_url=" ${staging_path} /${NODE_BINARY_TAR##*/ } "
320+ copy-to-staging " ${staging_path} " " ${node_binary_gs_url} " " ${NODE_BINARY_TAR} " " ${NODE_BINARY_TAR_HASH} "
321+ fi
322+
308323 # Convert from gs:// URL to an https:// URL
309324 server_binary_tar_urls+=(" ${server_binary_gs_url/ gs: \/\/ / https:// storage.googleapis.com/ } " )
325+ if [[ -n " ${NODE_BINARY_TAR:- } " ]]; then
326+ node_binary_tar_urls+=(" ${node_binary_gs_url/ gs: \/\/ / https:// storage.googleapis.com/ } " )
327+ fi
310328 if [[ -n " ${KUBE_MANIFESTS_TAR:- } " ]]; then
311329 local kube_manifests_gs_url=" ${staging_path} /${KUBE_MANIFESTS_TAR##*/ } "
312330 copy-to-staging " ${staging_path} " " ${kube_manifests_gs_url} " " ${KUBE_MANIFESTS_TAR} " " ${KUBE_MANIFESTS_TAR_HASH} "
@@ -316,6 +334,9 @@ function upload-server-tars() {
316334 done
317335
318336 SERVER_BINARY_TAR_URL=$( join_csv " ${server_binary_tar_urls[@]} " )
337+ if [[ -n " ${NODE_BINARY_TAR:- } " ]]; then
338+ NODE_BINARY_TAR_URL=$( join_csv " ${node_binary_tar_urls[@]} " )
339+ fi
319340 if [[ -n " ${KUBE_MANIFESTS_TAR:- } " ]]; then
320341 KUBE_MANIFESTS_TAR_URL=$( join_csv " ${kube_manifests_tar_urls[@]} " )
321342 fi
@@ -436,7 +457,7 @@ function tars_from_version() {
436457
437458 if [[ -z " ${KUBE_VERSION-} " ]]; then
438459 find-release-tars
439- upload-server- tars
460+ upload-tars
440461 elif [[ ${KUBE_VERSION} =~ ${KUBE_RELEASE_VERSION_REGEX} ]]; then
441462 SERVER_BINARY_TAR_URL=" https://storage.googleapis.com/kubernetes-release/release/${KUBE_VERSION} /kubernetes-server-linux-amd64.tar.gz"
442463 # TODO: Clean this up.
@@ -1756,7 +1777,7 @@ function kube-up() {
17561777
17571778 # Make sure we have the tar files staged on Google Storage
17581779 find-release-tars
1759- upload-server- tars
1780+ upload-tars
17601781
17611782 # ensure that environmental variables specifying number of migs to create
17621783 set_num_migs
0 commit comments