Unverified Commit 5f780938 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #61203 from rmmh/fix-mode-flag

Automatic merge from submit-queue (batch tested with PRs 61203, 61071). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. 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. **What this PR does / why we need it**: **Which issue(s) this PR fixes** Fixes #54238 **Special notes for your reviewer**: **Release note**: ```release-note NONE ```
parents 448f9a37 68f5d448
......@@ -1639,7 +1639,7 @@ function create-network() {
network_mode="custom"
fi
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
PREEXISTING_NETWORK=true
PREEXISTING_NETWORK_MODE="$(check-network-mode)"
......@@ -1674,8 +1674,8 @@ function create-network() {
}
function expand-default-subnetwork() {
gcloud compute networks switch-mode "${NETWORK}" \
--mode custom \
gcloud compute networks update "${NETWORK}" \
--switch-to-custom-subnet-mode \
--project "${NETWORK_PROJECT}" \
--quiet || true
gcloud compute networks subnets expand-ip-range "${NETWORK}" \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment