mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 20:53:33 +00:00
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 ```
This commit is contained in:
commit
5f78093869
@ -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
Block a user