mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-06 18:54:06 +00:00
Fix IP-alias subnet creation logic
This commit is contained in:
parent
80bd7510df
commit
da01243af1
@ -1731,12 +1731,6 @@ function create-subnetworks() {
|
|||||||
--region ${REGION} \
|
--region ${REGION} \
|
||||||
${IP_ALIAS_SUBNETWORK} 2>/dev/null)
|
${IP_ALIAS_SUBNETWORK} 2>/dev/null)
|
||||||
if [[ -z ${subnet} ]]; then
|
if [[ -z ${subnet} ]]; then
|
||||||
# Only allow auto-creation for default subnets
|
|
||||||
if [[ ${IP_ALIAS_SUBNETWORK} != ${INSTANCE_PREFIX}-subnet-default ]]; then
|
|
||||||
echo "${color_red}Subnetwork ${NETWORK}:${IP_ALIAS_SUBNETWORK} does not exist${color_norm}"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Creating subnet ${NETWORK}:${IP_ALIAS_SUBNETWORK}"
|
echo "Creating subnet ${NETWORK}:${IP_ALIAS_SUBNETWORK}"
|
||||||
gcloud beta compute networks subnets create \
|
gcloud beta compute networks subnets create \
|
||||||
${IP_ALIAS_SUBNETWORK} \
|
${IP_ALIAS_SUBNETWORK} \
|
||||||
|
Loading…
Reference in New Issue
Block a user