-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Can VirtualServers use Services as upstream instead of endpoints? #1278
Comments
Hi @zaroman Using services as upstream, unfortunately, is not supported. I wonder what problem it created? In case of 0 endpoints in upstream, NGINX will start returning 502 responses for client requests. However, you will get similar behavior if NGINX tries to connect to a service IP with zero endpoints behind. |
@pleshakov what we are trying to do is dynamically add/remove new VirtualHosts for new deployments that can happen at different points in time. If one of these deployments fail, but the VirtualServer is still around, all future attempts to create a new VirtualServer fail with errors like this:
In this case, the deployment for id1-dynamic1 failed, but the VirtualServer was not deleted, so when we tried to create id2-dynamic2 we got the error above and the VirtualServer for id2-dynamic2 was labeled as invalid even though it was correct and it's endpoint existed. One thing to note is that even deleting the VirtualServer for id1-dynamic1 did not fix the issue for id2-dynamic2 after it was deemed invalid, but it did fix it for new VirtualServers created after deleting id1-dynamic1. |
Hi @zaroman This looks like a bug in our config generation. The error you see -- If it is possible, could you share with us VirtualServer,VirtualServerRoute YAML files to reproduce this problem? and provide the generated config for the problematic virtual server (https://docs.nginx.com/nginx-ingress-controller/troubleshooting/#checking-the-generated-config) |
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
Ran into an issue where newly added VirtualServers were being considered invalid after an older VirtualServer was created but it's upstream endpoint got deleted shortly after. I found that there is an option for Ingress objects to use an annotation to use services as upstream (nginx.ingress.kubernetes.io/service-upstream: 'true'), but I cannot find documentation on how to do the same for VirtualServers. Is this possible to do?
The text was updated successfully, but these errors were encountered: