Skip to content

Commit d7d852a

Browse files
authored
Merge pull request kubernetes#75994 from mrunalp/fix_unbound_args_array
Fix older bash failing on unbound array variables
2 parents b118643 + 8c9b169 commit d7d852a

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

hack/local-up-cluster.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,7 @@ function start_controller_manager {
638638
--cluster-signing-cert-file="${CLUSTER_SIGNING_CERT_FILE}" \
639639
--cluster-signing-key-file="${CLUSTER_SIGNING_KEY_FILE}" \
640640
--enable-hostpath-provisioner="${ENABLE_HOSTPATH_PROVISIONER}" \
641-
"${node_cidr_args[@]}" \
641+
${node_cidr_args[@]+"${node_cidr_args[@]}"} \
642642
--pvclaimbinder-sync-period="${CLAIM_BINDER_SYNC_PERIOD}" \
643643
--feature-gates="${FEATURE_GATES}" \
644644
"${cloud_config_arg[@]}" \
@@ -770,13 +770,13 @@ function start_kubelet {
770770
"--eviction-pressure-transition-period=${EVICTION_PRESSURE_TRANSITION_PERIOD}"
771771
"--pod-manifest-path=${POD_MANIFEST_PATH}"
772772
"--fail-swap-on=${FAIL_SWAP_ON}"
773-
"${auth_args[@]}"
774-
"${dns_args[@]}"
775-
"${cni_conf_dir_args[@]}"
776-
"${cni_bin_dir_args[@]}"
777-
"${net_plugin_args[@]}"
778-
"${container_runtime_endpoint_args[@]}"
779-
"${image_service_endpoint_args[@]}"
773+
${auth_args[@]+"${auth_args[@]}"}
774+
${dns_args[@]+"${dns_args[@]}"}
775+
${cni_conf_dir_args[@]+"${cni_conf_dir_args[@]}"}
776+
${cni_bin_dir_args[@]+"${cni_bin_dir_args[@]}"}
777+
${net_plugin_args[@]+"${net_plugin_args[@]}"}
778+
${container_runtime_endpoint_args[@]+"${container_runtime_endpoint_args[@]}"}
779+
${image_service_endpoint_args[@]+"${image_service_endpoint_args[@]}"}
780780
"--port=${KUBELET_PORT}"
781781
${KUBELET_FLAGS}
782782
)

0 commit comments

Comments
 (0)