feat: add support for load balancer, listener, and pool tags annotations#3058
feat: add support for load balancer, listener, and pool tags annotations#3058A10ss wants to merge 3 commits intokubernetes:masterfrom
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Welcome @A10ss! |
|
Hi @A10ss. Thanks for your PR. I'm waiting for a kubernetes 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. DetailsInstructions 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. |
b9d7293 to
6da530f
Compare
|
/ok-to-test |
kayrus
left a comment
There was a problem hiding this comment.
Thanks for the PR. See my initial comments.
pkg/openstack/loadbalancer.go
Outdated
| var desiredTags []string | ||
| if len(svcConf.lbTags) == 0 { | ||
| klog.V(4).Infof("No load balancer tags found from service annotation key: %s", ServiceAnnotationLoadBalancerTags) | ||
| } else if err := json.Unmarshal([]byte(svcConf.lbTags), &desiredTags); err != nil { |
There was a problem hiding this comment.
I don't like an idea to use json inside the annotation. Can you make it simpler? See an example
There was a problem hiding this comment.
Yep, the json format could support more complex tags, and for LB tags we may don't need very complex tags, so I think your point is right, I'll change it.
pkg/openstack/loadbalancer.go
Outdated
| } else { | ||
| if svcConf.supportLBTags { |
There was a problem hiding this comment.
This logic feels a bit hard to follow with the nested if statements. Would it be possible to simplify or refactor it to improve readability? The same applies to other parts of new code.
|
@kayrus please help review this PR again, thanks! |
What this PR does / why we need it:
This PR adds support for the add tags to load balancer, listener, and pool via the service annotations in cloud-provider-openstack (OCCM).
Which issue this PR fixes(if applicable):
fixes #3032 #2327
Special notes for reviewers:
You can add annotations to the service like:
Then check if the tags have been added to the service's load blancer(the service's type should be load balancer)
Release note: