New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use compute v1 api to specify network tier #88487
Use compute v1 api to specify network tier #88487
Conversation
/assign @cheftako |
b90ea05
to
9275d19
Compare
staging/src/k8s.io/legacy-cloud-providers/gce/gce_loadbalancer_external.go
Outdated
Show resolved
Hide resolved
Drop the use of the alpha api for operations that are supported by compute v1 The switch/case logic was wrong because the user can set the default tier for a project: https://cloud.google.com/network-tiers/docs/using-network-service-tiers#setting_the_tier_for_all_resources_in_a_project The assumption that the default tier is always PREMIUM is wrong This patch uses the explicit network tier when possible, or it falls back to the project default. Signed-off-by: Saverio Proto <saverioproto@google.com>
9275d19
to
bdc54eb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mikedanese, zioproto The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/cherrypick-candidate |
…87-upstream-release-1.17 Automated cherry pick of #88487: Use compute v1 api to specify network tier
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
Drop the use of the alpha compute api for operations that are supported by compute v1.
With this change the users of GKE will be able to test the annotation
cloud.google.com/network-tier: Standard
when creating a GKE alpha cluster, but without the need of whitelisting the project for the compute alpha api.Bonus: the switch/case logic was wrong because the user can set the default tier for a project:
https://cloud.google.com/network-tiers/docs/using-network-service-tiers#setting_the_tier_for_all_resources_in_a_project
The assumption that the default tier is always PREMIUM is wrong
This patch uses the explicit network tier when possible,
or it falls back to the project default.
Which issue(s) this PR fixes:
Fixes #69314
Does this PR introduce a user-facing change?: