mirror of https://github.com/k3s-io/k3s
Fix deprecated gcloud compute networks --mode switches.
"create --mode" becomes "create --subnet-mode", and switch-mode has been folded into "update". Create --mode was deprecated in October and will be removed in the next gcloud release. It is already failing in staging tests.pull/6/head
parent
02611149c1
commit
68f5d44865
|
@ -1639,7 +1639,7 @@ function create-network() {
|
||||||
network_mode="custom"
|
network_mode="custom"
|
||||||
fi
|
fi
|
||||||
echo "Creating new ${network_mode} network: ${NETWORK}"
|
echo "Creating new ${network_mode} network: ${NETWORK}"
|
||||||
gcloud compute networks create --project "${NETWORK_PROJECT}" "${NETWORK}" --mode="${network_mode}"
|
gcloud compute networks create --project "${NETWORK_PROJECT}" "${NETWORK}" --subnet-mode="${network_mode}"
|
||||||
else
|
else
|
||||||
PREEXISTING_NETWORK=true
|
PREEXISTING_NETWORK=true
|
||||||
PREEXISTING_NETWORK_MODE="$(check-network-mode)"
|
PREEXISTING_NETWORK_MODE="$(check-network-mode)"
|
||||||
|
@ -1674,8 +1674,8 @@ function create-network() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function expand-default-subnetwork() {
|
function expand-default-subnetwork() {
|
||||||
gcloud compute networks switch-mode "${NETWORK}" \
|
gcloud compute networks update "${NETWORK}" \
|
||||||
--mode custom \
|
--switch-to-custom-subnet-mode \
|
||||||
--project "${NETWORK_PROJECT}" \
|
--project "${NETWORK_PROJECT}" \
|
||||||
--quiet || true
|
--quiet || true
|
||||||
gcloud compute networks subnets expand-ip-range "${NETWORK}" \
|
gcloud compute networks subnets expand-ip-range "${NETWORK}" \
|
||||||
|
|
Loading…
Reference in New Issue