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
If two Services select the same pods then pods won't start #592
Comments
Hello, any further updates on this? I'd like to implement it :) |
@chauhanshubham Could you tell me more about why you would need this particular feature? In this case we are ignoring one of the services via a label. Are you also looking to deploy something like NGINX Ingress controller with Consul K8s sidecar proxies? |
hi @david-yu i was just looking at it as a good first issue. Since the connect-init loop seems to get stuck in this scenario, I thought it should probably get fixed, irrespective of any specific usecases. |
@david-yu Actually I exactly have a case with nginx. My understanding is that having nginx with sidecar proxy is a valid scenario because otherwise I won't be able the to allow the nginx's loadbalancer service to communicate with applications that have sidecar proxies enabled. Nginx deployment deploys two services |
@mike-code We will be releasing the functionality that addresses this issue in our next release most likely around mid-December. Stay tuned! |
@david-yu any update on this? |
Hey @markharding the fix for this was released, and you can now add the |
Community Note
Overview of the Issue
If two kube services have the same selector of mesh pods then Consul will register 4 service instances (two for each pod, sidecar and app) and then connect-init will loop forever because it's waiting for exactly 2 service instances.
Possible solutions
We can't register two service instances for one pod because the pod's sidecar can only receive traffic for one service name. So I think we need to provide a way to exclude one of the services from syncing. I checked and if you label the service, the labels are available at the endpoints level so we could do something basic like:
The text was updated successfully, but these errors were encountered: