mirror of https://github.com/k3s-io/k3s
Merge pull request #60102 from satyasm/gcloud_net_flag
Automatic merge from submit-queue. 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>. fixes #54017, remove deprecated --mode flag **What this PR does / why we need it**: **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*: Fixes #54017 **Special notes for your reviewer**: **Release note**: ```release-note remove deprecated --mode flag in check-network-mode ```pull/8/head
commit
4cfa2e4dfd
|
@ -1644,14 +1644,8 @@ function check-existing() {
|
|||
fi
|
||||
}
|
||||
|
||||
# TODO(#54017): Remove below logics for handling deprecated network mode field.
|
||||
# `x_gcloud_mode` was replaced by `x_gcloud_subnet_mode` in gcloud 175.0.0 and
|
||||
# the content changed as well. Keeping such logic to make the transition eaiser.
|
||||
function check-network-mode() {
|
||||
local mode="$(gcloud compute networks list --filter="name=('${NETWORK}')" --project ${NETWORK_PROJECT} --format='value(x_gcloud_subnet_mode)' || true)"
|
||||
if [[ -z "${mode}" ]]; then
|
||||
mode="$(gcloud compute networks list --filter="name=('${NETWORK}')" --project ${NETWORK_PROJECT} --format='value(x_gcloud_mode)' || true)"
|
||||
fi
|
||||
# The deprecated field uses lower case. Convert to upper case for consistency.
|
||||
echo "$(echo $mode | tr [a-z] [A-Z])"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue