-
Notifications
You must be signed in to change notification settings - Fork 654
feat: add support for load balancer, listener, and pool tags annotations #3058
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
base: master
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
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.
Agree with that, I'd like to do.
|
@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: