-
Notifications
You must be signed in to change notification settings - Fork 280
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
feat: support node selection for multiple standard load balancers #4201
feat: support node selection for multiple standard load balancers #4201
Conversation
/retest |
1 similar comment
/retest |
pkg/provider/azure_loadbalancer.go
Outdated
} | ||
} | ||
|
||
func (az *Cloud) removeNodeFromLBConfig(nodeNameToLBConfigIDXMap map[string]int, nodeName string) string { |
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.
could you add comments for the newly added functions?
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.
added
pkg/provider/azure.go
Outdated
multipleStandardLoadBalancerConfigurationsSynced bool | ||
// nodesWithCorrectLoadBalancerByPrimaryVMSet marks nodes that are matched with load balancers by primary vmSet. | ||
nodesWithCorrectLoadBalancerByPrimaryVMSet sets.Set[string] |
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.
the property is a little confusing and a lock should be added to avoid race conditions
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.
the service reconciliation is triggered in serial, do we still need a lock to guard this?
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.
It may be updated by different go routines, e.g. service controller and node watcher
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.
please check the new commit
88a7901
to
34b9faa
Compare
/retest |
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
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: 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 |
205ac9f
to
b0b436b
Compare
@feiskyer squashed commits and rebased. |
b0b436b
to
bd9fa86
Compare
/lgtm |
What type of PR is this?
/kind feature
What this PR does / why we need it:
Support node selection for multiple standard load balancers.
When nodes are created, each node will be evaluated to see what load balancer it should be placed into.
Valid placement targets will be determined as follows (rules match from top to bottom, first match wins):
After the list of potential placement targets has been calculated, the node should be placed into the kubernetes backend pool of the load balancer with the fewest number of nodes already assigned.
Which issue(s) this PR fixes:
Fixes #
Related: #4013
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: