@@ -248,16 +248,21 @@ function set-preferred-region() {
248
248
# Assumed vars:
249
249
# PROJECT
250
250
# SERVER_BINARY_TAR
251
+ # NODE_BINARY_TAR (optional)
251
252
# KUBE_MANIFESTS_TAR
252
253
# ZONE
253
254
# Vars set:
254
255
# SERVER_BINARY_TAR_URL
255
256
# SERVER_BINARY_TAR_HASH
257
+ # NODE_BINARY_TAR_URL
258
+ # NODE_BINARY_TAR_HASH
256
259
# KUBE_MANIFESTS_TAR_URL
257
260
# KUBE_MANIFESTS_TAR_HASH
258
- function upload-server- tars() {
261
+ function upload-tars() {
259
262
SERVER_BINARY_TAR_URL=
260
263
SERVER_BINARY_TAR_HASH=
264
+ NODE_BINARY_TAR_URL=
265
+ NODE_BINARY_TAR_HASH=
261
266
KUBE_MANIFESTS_TAR_URL=
262
267
KUBE_MANIFESTS_TAR_HASH=
263
268
@@ -279,11 +284,16 @@ function upload-server-tars() {
279
284
fi
280
285
281
286
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
282
291
if [[ -n " ${KUBE_MANIFESTS_TAR:- } " ]]; then
283
292
KUBE_MANIFESTS_TAR_HASH=$( sha1sum-file " ${KUBE_MANIFESTS_TAR} " )
284
293
fi
285
294
286
295
local server_binary_tar_urls=()
296
+ local node_binary_tar_urls=()
287
297
local kube_manifest_tar_urls=()
288
298
289
299
for region in " ${PREFERRED_REGION[@]} " ; do
@@ -301,12 +311,20 @@ function upload-server-tars() {
301
311
302
312
local staging_path=" ${staging_bucket} /${INSTANCE_PREFIX} -devel"
303
313
304
- echo " +++ Staging server tars to Google Storage: ${staging_path} "
314
+ echo " +++ Staging tars to Google Storage: ${staging_path} "
305
315
local server_binary_gs_url=" ${staging_path} /${SERVER_BINARY_TAR##*/ } "
306
316
copy-to-staging " ${staging_path} " " ${server_binary_gs_url} " " ${SERVER_BINARY_TAR} " " ${SERVER_BINARY_TAR_HASH} "
307
317
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
+
308
323
# Convert from gs:// URL to an https:// URL
309
324
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
310
328
if [[ -n " ${KUBE_MANIFESTS_TAR:- } " ]]; then
311
329
local kube_manifests_gs_url=" ${staging_path} /${KUBE_MANIFESTS_TAR##*/ } "
312
330
copy-to-staging " ${staging_path} " " ${kube_manifests_gs_url} " " ${KUBE_MANIFESTS_TAR} " " ${KUBE_MANIFESTS_TAR_HASH} "
@@ -316,6 +334,9 @@ function upload-server-tars() {
316
334
done
317
335
318
336
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
319
340
if [[ -n " ${KUBE_MANIFESTS_TAR:- } " ]]; then
320
341
KUBE_MANIFESTS_TAR_URL=$( join_csv " ${kube_manifests_tar_urls[@]} " )
321
342
fi
@@ -436,7 +457,7 @@ function tars_from_version() {
436
457
437
458
if [[ -z " ${KUBE_VERSION-} " ]]; then
438
459
find-release-tars
439
- upload-server- tars
460
+ upload-tars
440
461
elif [[ ${KUBE_VERSION} =~ ${KUBE_RELEASE_VERSION_REGEX} ]]; then
441
462
SERVER_BINARY_TAR_URL=" https://storage.googleapis.com/kubernetes-release/release/${KUBE_VERSION} /kubernetes-server-linux-amd64.tar.gz"
442
463
# TODO: Clean this up.
@@ -1756,7 +1777,7 @@ function kube-up() {
1756
1777
1757
1778
# Make sure we have the tar files staged on Google Storage
1758
1779
find-release-tars
1759
- upload-server- tars
1780
+ upload-tars
1760
1781
1761
1782
# ensure that environmental variables specifying number of migs to create
1762
1783
set_num_migs
0 commit comments