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
Ensure only one LoadBalancer rule is created when HA mode is enabled #99825
Conversation
/priority critical-urgent |
@feiskyer: The label(s) In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/priority critical-urgent |
/assign @andrewsykim |
/lgtm |
/retest |
weird gce package unit tests are failing: |
/retest |
1 similar comment
/retest |
@andrewsykim @cheftako could you help to get this approved before code freeze? /milestone v1.21 |
/retest |
@andrewsykim @cheftako the test failures are expected, we could ignore them. |
for _, port := range ports { | ||
if highAvailabilityPortsEnabled { | ||
// Since the port is always 0 when enabling HA, only one rule should be configured. |
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.
Might be nice to add an info line that you are skipping additional rules.
Also it seems like its possible that HA rule might not be the first, in which case you will have more than one rule, if a non HA rule snuck in first.
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.
Also it seems like its possible that HA rule might not be the first, in which case you will have more than one rule, if a non HA rule snuck in first.
this shouldn't happen as the HA mode is determined by service annotation, instead of some configure on ports. And, when the first HA rule created, highAvailabilityPortsEnabled
would be marked as true.
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.
Might be nice to add an info line that you are skipping additional rules.
And this is actually not skipping additional rules. It is one rule to allow all ports, that's why the comment said only one rule should be configured
.
/lgtm |
@cheftako thanks for reviewing. Added comments and could you help to approve? |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cheftako, feiskyer, nilo19 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 |
/retest Review the full test history for this PR. Silence the bot with an |
@feiskyer we need to reopen the pr to disable the failed azure file ci test |
@feiskyer: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
Test_Run_Positive_VolumeAttachMountUnmountDetach |
/test pull-kubernetes-unit |
…25-upstream-release-1.20 Automated cherry pick of #99825: Ensure only one LoadBalancer rule is created when HA mode is
What type of PR is this?
/kind bug
/sig cloud-provider
/area provider/azure
What this PR does / why we need it:
When highAvailabilityPorts enabled, the LoadBalancer port is always using 0, hence only one rule should be configured. Orelse, a RulesUseSameBackendPortProtocolAndPoolAndFrontendIPWithFloatingIPEnabled error would be reported from LoadBalancer API.
Which issue(s) this PR fixes:
Fixes kubernetes-sigs/cloud-provider-azure#521
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: