-
Notifications
You must be signed in to change notification settings - Fork 303
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
add lbName annotation #565
Conversation
Hi @pondohva. 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. 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/test-infra repository. |
I still need to do smth with TLS configuration, but simple case with N ingresses with the same LB name in annotation works. |
@rramkumar1 are you OK with this? I decided to create annotation, because it's the simplest way to have shared LB name for ingresses. I think I need to create some logging to point out users with the same hostname or with the same static IP in different ingresses to this feature. |
|
||
func pathRuleExists(pathRules []*compute.PathRule, path string, service string) bool { | ||
for _, pr := range pathRules { | ||
//if pr.Service == service && slice.ContainsString(pr.Paths, path, 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.
can't find how I can translate backend name like "global/backendServices/k8s-be-30002--aaaaa" to k8s service name
/assign @rramkumar1 could you please help me with this? I'm kinda stuck to make a decision |
@pondohva Annotation seems like the only sensible way to do this. I'm taking a look now at your implementation Will leave comments in my review on the areas you are stuck |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: pondohva If they are not already assigned, you can assign the PR to them by writing 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 |
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.
@pondohva Made a first pass. A couple high level points:
-
I'm not clear where the actual merging happens. Is that still a WIP?
-
I would suggest breaking down this problem into two sections. The first is the "origin" LB. You can think of this as the Ingress definition which "branches" are derived from. When you dequeue an "origin", you list all other Ingresses and find its "branches". Once you have each "branch", merge them all into the "origin" and then translate and sync the "origin" as you would normally.
@@ -54,6 +54,7 @@ type ControllerContext struct { | |||
ControllerContextConfig | |||
|
|||
IngressInformer cache.SharedIndexInformer | |||
SecretInformer cache.SharedIndexInformer |
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.
Why do you need to watch secrets?
|
@rramkumar1 could you please look again? I'm not sure what I missed here. Can you give me some advice how can I test my changes? Usually I build docker image and setup GKE cluster to run some ingresses and check what happens, but I believe it's not optimal. |
BTW, I haven't tested it yet, just run go test. |
@pondohva I'm still having trouble understanding how your changes would even work. In particular, I don't see any sort of merging logic. Can you please explain your approach? |
@rramkumar1 I merged urlmap only in https://github.com/kubernetes/ingress-gce/pull/565/files#diff-3c862eb54a8e0e161b534e0c67e5379eR520. this ingresses:
result:
|
@rramkumar1 I got your point. Added merge logic here https://github.com/kubernetes/ingress-gce/pull/565/files#diff-3c862eb54a8e0e161b534e0c67e5379eR377 |
@rramkumar1 could you please review last changes? anything else to do? |
@pondohva Sorry I was on vacation and haven't had much time to look at this. Given that this is a big change I would like to spend some more time looking at it. I'll try to have some comments in a week or so. |
@rramkumar1 did you have some time to look at this PR? I'd like to implement this feature, but maybe I should rework smth? |
@pondohva Overall the PR seems to get the job done but my feeling is that the logic is going to be really flimsy and error prone. I'll leave this PR open but for the time being I don't think we will move forward with it. |
@rramkumar1 This seems like an interesting concept, do you have any comments what it would take to move forward with it? |
/ok-to-test |
@agadelshin: PR needs rebase. 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/test-infra repository. |
@agadelshin: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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/test-infra repository. I understand the commands that are listed here. |
thank you @bowei for update. I’ll rebase PR and will try to figure out why tests failed. Also I’d like to finalize it so if you have any suggestions how I can improve it, I’d appreciate. |
oh, well, it's almost 1.5 years later. I believe it will be safer and better for learning to rewrite it :) |
@agadelshin I think you will find interest in the new Gateway APIs which are more tailored to solve this problem. I don't think we will be able to merge any form of this PR to this repo |
@rramkumar1 got it! thank you, I'll look into Gateway APIs. |
this PR create feature for #369
I've created annotation "kubernetes.io/ingress.loadbalancer-name" to share LB between ingresses. Work still in progress, but it contains a lot of changes, so please look at this PR to control progress.