-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
> Don't reload nginx when L4 endpoints changed #3695
Conversation
/assign @ElvinEfendi |
Hi, @ElvinEfendi , https://github.com/kubernetes/ingress-nginx/blob/master/internal/ingress/controller/nginx.go#L780 for _, ep := range pcfg.TCPEndpoints {
var service *apiv1.Service
if ep.Service != nil {
service = &apiv1.Service{Spec: ep.Service.Spec}
}
key := fmt.Sprintf("tcp-%v-%v-%v", ep.Backend.Namespace, ep.Backend.Name, ep.Backend.Port.String())
streams = append(streams, ingress.Backend{
Name: key,
Endpoints: ep.Endpoints,
Port: intstr.FromInt(ep.Port),
Service: service,
})
}
for _, ep := range pcfg.UDPEndpoints {
var service *apiv1.Service
if ep.Service != nil {
service = &apiv1.Service{Spec: ep.Service.Spec}
}
key := fmt.Sprintf("udp-%v-%v-%v", ep.Backend.Namespace, ep.Backend.Name, ep.Backend.Port.String())
streams = append(streams, ingress.Backend{
Name: key,
Endpoints: ep.Endpoints,
Port: intstr.FromInt(ep.Port),
Service: service,
})
}
err = updateStreamConfiguration(streams) |
Hi @yowenter, the test fails at ingress-nginx/test/e2e/tcpudp/tcp.go Line 84 in d74dea7
I don't know offhand why it's failing but my guess is because of your changes in this PR, controller does not regenerate a new Nginx configuration. I hope that gives you some starting point to debug - sorry I don't have much time now to dig into this deeper. But your PR makes sense in general! |
Thanks for your information, I'll fix it soon.
Sent by my pixel 2
…On Tue, Feb 19, 2019, 12:01 Elvin Efendi ***@***.*** wrote:
Hi @yowenter <https://github.com/yowenter>, the test fails at
https://github.com/kubernetes/ingress-nginx/blob/d74dea7585b7b26cf5a16ca9d7ac402b1e0cf8df/test/e2e/tcpudp/tcp.go#L84
.
I don't know offhand why it's failing but my guess is because of your
changes in this PR, controller does not regenerate a new Nginx
configuration.
I hope that gives you some starting point to debug - sorry I don't have
much time now to dig into this deeper. But your PR makes sense in general!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3695 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AGWWtgPmwhU3eQ0Xf8ymTxtvqRqfuD4zks5vO3c1gaJpZM4aQ73E>
.
|
Since we use lua upstream for L4 service balancer. We don't need reload nginx when L4 service pod changed.
@ElvinEfendi I've fixed the test.
The nginx use TCPBackends for L4 services. |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ElvinEfendi, yowenter 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 |
What this PR does / why we need it:
Since we use lua upstream for L4 service balancer. We don't need reload nginx when L4 service endpoints changed.