fix gce.conf multi-value parameter processing
This commit is contained in:
@@ -215,14 +215,19 @@ EOF
|
||||
if [[ -n "${NODE_INSTANCE_PREFIX:-}" ]]; then
|
||||
use_cloud_config="true"
|
||||
if [[ -n "${NODE_TAGS:-}" ]]; then
|
||||
local -r node_tags="${NODE_TAGS}"
|
||||
# split NODE_TAGS into an array by comma.
|
||||
IFS=',' read -r -a node_tags <<< ${NODE_TAGS}
|
||||
else
|
||||
local -r node_tags="${NODE_INSTANCE_PREFIX}"
|
||||
fi
|
||||
cat <<EOF >>/etc/gce.conf
|
||||
node-tags = ${node_tags}
|
||||
node-instance-prefix = ${NODE_INSTANCE_PREFIX}
|
||||
EOF
|
||||
for tag in ${node_tags[@]}; do
|
||||
cat <<EOF >>/etc/gce.conf
|
||||
node-tags = ${tag}
|
||||
EOF
|
||||
done
|
||||
fi
|
||||
if [[ -n "${MULTIZONE:-}" ]]; then
|
||||
use_cloud_config="true"
|
||||
@@ -232,9 +237,13 @@ EOF
|
||||
fi
|
||||
if [[ -n "${GCE_ALPHA_FEATURES:-}" ]]; then
|
||||
use_cloud_config="true"
|
||||
cat <<EOF >>/etc/gce.conf
|
||||
alpha-features = ${GCE_ALPHA_FEATURES}
|
||||
# split GCE_ALPHA_FEATURES into an array by comma.
|
||||
IFS=',' read -r -a alpha_features <<< ${GCE_ALPHA_FEATURES}
|
||||
for feature in ${alpha_features[@]}; do
|
||||
cat <<EOF >>/etc/gce.conf
|
||||
alpha-features = ${feature}
|
||||
EOF
|
||||
done
|
||||
fi
|
||||
if [[ -n "${SECONDARY_RANGE_NAME:-}" ]]; then
|
||||
use_cloud_config="true"
|
||||
|
@@ -585,14 +585,19 @@ EOF
|
||||
if [[ -n "${NODE_INSTANCE_PREFIX:-}" ]]; then
|
||||
use_cloud_config="true"
|
||||
if [[ -n "${NODE_TAGS:-}" ]]; then
|
||||
local -r node_tags="${NODE_TAGS}"
|
||||
# split NODE_TAGS into an array by comma.
|
||||
IFS=',' read -r -a node_tags <<< ${NODE_TAGS}
|
||||
else
|
||||
local -r node_tags="${NODE_INSTANCE_PREFIX}"
|
||||
fi
|
||||
cat <<EOF >>/etc/gce.conf
|
||||
node-tags = ${node_tags}
|
||||
node-instance-prefix = ${NODE_INSTANCE_PREFIX}
|
||||
EOF
|
||||
for tag in ${node_tags[@]}; do
|
||||
cat <<EOF >>/etc/gce.conf
|
||||
node-tags = ${tag}
|
||||
EOF
|
||||
done
|
||||
fi
|
||||
if [[ -n "${MULTIZONE:-}" ]]; then
|
||||
use_cloud_config="true"
|
||||
@@ -602,9 +607,13 @@ EOF
|
||||
fi
|
||||
if [[ -n "${GCE_ALPHA_FEATURES:-}" ]]; then
|
||||
use_cloud_config="true"
|
||||
cat <<EOF >>/etc/gce.conf
|
||||
alpha-features = ${GCE_ALPHA_FEATURES}
|
||||
# split GCE_ALPHA_FEATURES into an array by comma.
|
||||
IFS=',' read -r -a alpha_features <<< ${GCE_ALPHA_FEATURES}
|
||||
for feature in ${alpha_features[@]}; do
|
||||
cat <<EOF >>/etc/gce.conf
|
||||
alpha-features = ${feature}
|
||||
EOF
|
||||
done
|
||||
fi
|
||||
if [[ -n "${SECONDARY_RANGE_NAME:-}" ]]; then
|
||||
use_cloud_config="true"
|
||||
|
Reference in New Issue
Block a user