-
Notifications
You must be signed in to change notification settings - Fork 40k
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
Azure: Support multiple standard load balancers in one cluster #96111
Azure: Support multiple standard load balancers in one cluster #96111
Conversation
/retest |
@@ -197,6 +197,12 @@ type Config struct { | |||
// "external": for external LoadBalancer | |||
// "all": for both internal and external LoadBalancer | |||
PreConfiguredBackendPoolLoadBalancerTypes string `json:"preConfiguredBackendPoolLoadBalancerTypes,omitempty" yaml:"preConfiguredBackendPoolLoadBalancerTypes,omitempty"` | |||
// EnableMultipleStandardLoadBalancers determines the behavior of the standard load balancer. If set to true | |||
// there would be one standard load balancer per agent pool, which is similar with the behavior of the basic |
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.
s/per agent pool/per VMAS or VMSS/
// there would be one standard load balancer per agent pool, which is similar with the behavior of the basic | ||
// load balancer. Users could select the specific standard load balancer for their service by the service | ||
// annotation `service.beta.kubernetes.io/azure-load-balancer-mode`, If set to false, the standard load balancer | ||
// would keep the current behavior, which is one per cluster. In this case, the mode selection annotation would be ignored. |
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.
s/the standard load balancer would keep the current behavior, which is one per cluster/the same standard load balancer would be shared by all services in the cluster/
ProvisioningState: to.StringPtr("Succeeded"), | ||
IPConfigurations: &[]network.InterfaceIPConfiguration{ | ||
{ | ||
InterfaceIPConfigurationPropertiesFormat: &network.InterfaceIPConfigurationPropertiesFormat{ |
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.
nit: add a helper function to reduce the duplicated codes
return fmt.Sprintf("%s-%s", prefix, suffix), nil | ||
agentpoolName := strings.Split(prefix, "-")[1] | ||
agentpoolUUID := strings.Split(prefix, "-")[2] | ||
availabilitySetName := fmt.Sprintf("%s-availabilitySet-%s", agentpoolName, agentpoolUUID) |
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.
availabilitySetName should be get from VM vm.AvailabilitySet.ID
b3a4cca
to
f29efd7
Compare
f29efd7
to
667b2be
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 |
/retest |
What type of PR is this?
/kind feature
What this PR does / why we need it:
Currently, only one SLB is allowed per cluster. If users set the mode selection annotation when using the SLB, they would get an error. After this feature implemented, the users could choose if they want a single SLB (current behavior), or they want multiple SLBs, with one SLB binding to one VMAS/VMSS. If the annotation is not set, everything is unchanged: every agent node in the cluster would join the backend pool of the SLB and only one SLB is allowed. If the annotation is set to
__auto__
ornodepool1Name,nodepool2Name
, there would be a 1: 1 mapping between the SLBs and the VMAS/VMSS. Specifically, for__auto__
mode, the SLB with the minimum load balancing rules would be selected to serve the newly created service; fornodepool1Name,nodepool2Name
mode, the SLB of the given VMAS/VMSS with the minimum load balancing rules would be selected. In this way, users could set different outbound rules for different VMAS/VMSS. If there is no SLB of the given VMAS/VMSS, a new SLB would be created.Which issue(s) this PR fixes:
Fixes kubernetes-sigs/cloud-provider-azure#380
Special notes for your reviewer:
Does this PR introduce a user-facing change?:
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:
/sig cloud-provider
/area provider/azure
/priority important-soon
/triage accepted