@@ -130,7 +130,7 @@ function cleanup_kind_cluster() {
130
130
# check_default_cluster_yaml checks the presence of default cluster YAML
131
131
# It returns 1 if it is not present
132
132
function check_default_cluster_yaml() {
133
- if [[ -z " ${DEFAULT_CLUSTER_YAML} " ]]; then
133
+ if [[ -z " ${DEFAULT_CLUSTER_YAML:- } " ]]; then
134
134
echo ' DEFAULT_CLUSTER_YAML file must be specified. Exiting...'
135
135
return 1
136
136
fi
@@ -148,11 +148,11 @@ function setup_kind_cluster_retry() {
148
148
# This function returns 0 when everything goes well, or 1 otherwise
149
149
# If Kind cluster was already created then it would be cleaned up in case of errors
150
150
function setup_kind_cluster() {
151
- NAME=" ${1:- istio-testing} "
152
- IMAGE=" ${2:- " ${DEFAULT_KIND_IMAGE} " } "
153
- CONFIG=" ${3:- } "
154
- NOMETALBINSTALL=" ${4:- } "
155
- CLEANUP=" ${5:- true} "
151
+ local NAME=" ${1:- istio-testing} "
152
+ local IMAGE=" ${2:- " ${DEFAULT_KIND_IMAGE} " } "
153
+ local CONFIG=" ${3:- } "
154
+ local NOMETALBINSTALL=" ${4:- } "
155
+ local CLEANUP=" ${5:- true} "
156
156
157
157
check_default_cluster_yaml
158
158
192
192
193
193
# If metrics server configuration directory is specified then deploy in
194
194
# the cluster just created
195
- if [[ -n ${METRICS_SERVER_CONFIG_DIR} ]]; then
195
+ if [[ -n ${METRICS_SERVER_CONFIG_DIR:- } ]]; then
196
196
retry kubectl apply -f " ${METRICS_SERVER_CONFIG_DIR} "
197
197
fi
198
198
0 commit comments