Open zvlb opened 7 months ago
Nginx configuration
/remove-kind bug @zvlb , While we have to look at the implementation on why this did not work for you, it will help a lot if you can explain the real world use case here. We discussed in the community meeting just now and could not understand why a user would create a ingress for a backend service, that is already the configured backend canary service for another service.
/triage needs-information
/assign
it will help a lot if you can explain the real world use case here
Oh. I have a problem with english, but I will try)
In my case I have production application, and I want test new release with 1% requests. (To gather user experience). Then I have 2 deployment, 2 services and 2 ingresses. (For main and new application version)
In this time my QA team say: "We want access to new release on production". Then I create new ingress for service with new application version with new internal-domain, but it's not work.
(I find fast fix - I create new service for new release (with new name and without ingresses), and create Ingress for internal domain with new service and it work good)
It's my real case)
Hey @zvlb! That's also the use case we were assuming when we went through the issues recently.
From a users expectation of how the Ingress API and this feature in particular work, one should not need to create a third service for this use case.
I'll try to reproduce and debug this issue as soon as I got time for it. Just to be sure I'm getting you right: You just followed the instructions of the guide and added on extra Ingress pointing to the canary / second service so you can access it with a 100% chance for testing purposes.
Just to be sure I'm getting you right: You just followed the instructions of the guide and added on extra Ingress pointing to the canary / second service so you can access it with a 100% chance for testing purposes.
Correct
/triage accepted
So I put some effort into testing this on my own cluster and actually it's far from perfect:
If you first create ...
Deployment
AService
A pointing to Deployment
AIngress
A pointing to Service
A... and then create ...
Deployment
BService
B pointing to Deployment
BIngress
B pointing to Service
B... you can access both Ingresses
without any problems - as expected.
When you now create the canary Ingress
A pointing to Service
B, it's not getting taken into account at all.
If you create ...
Deployment
AService
A pointing to Deployment
AIngress
A pointing to Service
AIngress
A pointing to Service
B... and then create ...
Deployment
BService
B pointing to Deployment
BIngress
B pointing to Service
B... the canary feature for Ingress
A works as expected, but you can not access Service
B via Ingress
B at all. Same goes for the first scenario and deleting Ingress
B.
I feel like it's a question of order and that the backend for Service
B is somehow getting "consumed" and therefore not available for an extra Ingress
anymore. In the nginx.conf
you can see that the backend for Ingress
B is the default 404 backend when you follow the guide.
I'll now try to have a look into the code and check what's happening there.
I continued working on this. As your logs already tell, the upstream upstream-default-backend
is getting set for this Ingress
while it should be your service instead. Unfortunately I haven't managed to dig down this rabbit hole, yet.
Here are my manifests and the resulting nginx.conf
. Storing them here so they don't get lost.
What happened:
If I create an Ingress for a service that is being monitored by another Ingress with canary settings, the newly created Ingress does not work.
Prepare envoronment:
Install kind for testing:
Install ingress nginx:
Ingress Nginx version:
Deploy all manifests from THIS documentation:
Test it:
Show what work wrong:
Then I create NEW ingress for NEW domain, but with canary service:
But this ingress not work:
In nginx-ingress-controller logs:
I donβt understand why my new ingress and new domain (
test.prod.mydomain.com
) doesnβt work(