-
Notifications
You must be signed in to change notification settings - Fork 301
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
Create Forwarding Rules provider #1759
Create Forwarding Rules provider #1759
Conversation
ca3d16a
to
ef431d0
Compare
"k8s.io/legacy-cloud-providers/gce" | ||
) | ||
|
||
type ForwardingRulesController struct { |
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.
Perhaps Manager instead of controller so it isn't considered the same as the actual controllers?
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.
Definitely agree, I actually wanted to ask for help with the name, cause also felt that in this project “controller” has its own meaning
Thanks!
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 am thinking, maybe ForwardingRulesService will be better?
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.
But I am still not very sure, and even Inteliji gives warning like "Name starts with the package name"
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.
Actually, I think interface should be named
ForwardingRulesManager (and it is good that it ends on "er")
and struct will be just
ForwardingRules (and even in Inteliji checker, they are happy with this name, as it matches the package)
dc88c18
to
b465bc0
Compare
I am also not 100% sure about naming, should methods name contain "ForwardingRule", so we would call them l.forwardingRules.DeleteForwardingRule or it is better to not double the name, so they would be l.forwardingRules.Delete (personally, I think option 2 is better) |
183b3a5
to
4055264
Compare
/assign cezarygerard |
e4b51b8
to
644a386
Compare
644a386
to
000a145
Compare
/assign bowei |
2881c5c
to
8f33a15
Compare
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 see most of the forwarding rules logic iI see most of the forwarding rules logic is still in the
pkg/loadbalancers/forwarding_rules.go
do you think you can move more here?
or the rest of the logic is L4 specific?
if so
- do you plan to split the pkg/loadbalancers/forwarding_rules.go into l4-/l4netlb-/l7-forwarding_rules.go files?s still in the
6ff6e52
to
67a29ef
Compare
/hold I will squash before merging (after approve) |
67a29ef
to
e6d94b6
Compare
/lgtm |
This service encapsulates interactions with Cloud forwading rules This removes copy pasted code between l4 ilb and l4 elb
e6d94b6
to
758a0da
Compare
/unhold |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cezarygerard, panslava 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 |
This separates "business" logic of creating forwarding rules for our controllers, from interacting with forwarding rules in google cloud
This removes copy pasted code between l4 ilb and l4 elb