-
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
Container Load Balancer - BackendPool #8176
base: master
Are you sure you want to change the base?
Container Load Balancer - BackendPool #8176
Conversation
|
Hi @georgeedward2000. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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-sigs/prow repository. |
func (bpi *backendPoolTypePodIP) CleanupVMSetFromBackendPoolByCondition(_ context.Context, _ *armnetwork.LoadBalancer, _ *v1.Service, _ []*v1.Node, _ string, _ func(string) bool) (*armnetwork.LoadBalancer, error) { | ||
return nil, errors.New("CleanupVMSetFromBackendPoolByCondition is not applicable for pod IP backend pool") | ||
} | ||
|
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.
Probably a comment why this function is a NOP(doesn't do anything) for POD IP based backendpool would be nice.
@@ -381,9 +381,8 @@ const ( | |||
LoadBalancerBackendPoolConfigurationTypeNodeIPConfiguration = "nodeIPConfiguration" |
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.
Can we add some PR description?
pkg/provider/azure_local_services.go
Outdated
|
||
func (az *Cloud) getBackendPoolNameForCLBService(service *v1.Service) (string, error) { | ||
if isDualStackService(service) { | ||
return "", fmt.Errorf("dual-stack service is not supported for container load balancer") |
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.
I think we should use names hinting towards "pod ip backend". container load balancer won't mean much here
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.
+1
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: georgeedward2000, kartickmsft The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@georgeedward2000 Thanks for the contribution. Could you sign CLA? |
And could you use the template (the template would show when you open the PR) and fill the template contents (including release notes information together with what this PR does)? /kind feature |
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.
there are some lint failures either, could you rebase to master?
} | ||
|
||
func (bpi *backendPoolTypePodIP) CleanupVMSetFromBackendPoolByCondition(_ context.Context, _ *armnetwork.LoadBalancer, _ *v1.Service, _ []*v1.Node, _ string, _ func(string) bool) (*armnetwork.LoadBalancer, error) { | ||
return nil, errors.New("CleanupVMSetFromBackendPoolByCondition is not applicable for pod IP backend pool") |
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.
return success (return nil,nil) for no-op?
pkg/provider/azure_local_services.go
Outdated
|
||
func (az *Cloud) getBackendPoolNameForCLBService(service *v1.Service) (string, error) { | ||
if isDualStackService(service) { | ||
return "", fmt.Errorf("dual-stack service is not supported for container load balancer") |
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.
+1
return &backendPoolTypePodIP{c} | ||
} | ||
|
||
func (bpi *backendPoolTypePodIP) CleanupVMSetFromBackendPoolByCondition(_ context.Context, _ *armnetwork.LoadBalancer, _ *v1.Service, _ []*v1.Node, _ string, _ func(string) bool) (*armnetwork.LoadBalancer, error) { |
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.
where is the lb part? we'd need first provision lb and then create/update backend pool
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.
If you are referring to the LB changes to support POD IP as backend, then those changes are being done as part of a different PR. Here, changes corresponding to the POD IP backendpool interface is being introduced.
|
||
switch service.Spec.IPFamilies[0] { | ||
case v1.IPv4Protocol: | ||
return string(service.GetUID()), nil |
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.
would we have multiple backend. pools on the same CLB? If not, I'd suggest to use service namespace+name for better matching with service object (e.g. namespace-name and namespace-name-ipv6)
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.
CLB will have 1 LB rule(1 FIP) with 1 backendpool. I think namespace-name-ipv6 can exceed the 80 characters limit of NRP resource name. That's why we thought of using UID.
807b4d6
to
0d329fb
Compare
Adding label 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-sigs/prow repository. |
} | ||
|
||
backendPrivateIPs := utilsets.NewString() | ||
for _, bp := range lb.Properties.BackendAddressPools { |
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 looks similiar with nodeIP backend pool GetBackendPrivateIPs. Is is possible to reuse some logic as a separate func?
return backendPrivateIPs.UnsortedList(), nil | ||
} | ||
|
||
func (bpi *backendPoolTypePodIP) ReconcileBackendPools(ctx context.Context, _ string, service *v1.Service, lb *armnetwork.LoadBalancer) (bool, bool, *armnetwork.LoadBalancer, error) { |
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.
Do we need to remove unwanted nodes in this func?
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.
Endpoint-slice update resulting in endpoint (POD) removal will trigger the removal of POD from the backendpool.
Are you referring to migration scenario?
Could you please create a github issue, list todo items and link to all related PRs? |
/label tide/merge-method-squash |
|
What type of PR is this?
/kind feature
What this PR does / why we need it:
This PR introduces the implementation of the backend pool interface for pod backend pools. The key changes are as follows:
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: