Skip to content
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

Cross Namespace Service Support #40

Closed
stevenpall opened this issue Mar 6, 2017 · 4 comments

Comments

Projects
None yet
3 participants
@stevenpall
Copy link

commented Mar 6, 2017

Hi there,

I was wondering if you could explain how "cross namespace service support" noted in the project's README works. I'm particularly interested in understanding this because I would like to know if I can use this ingress controller to do weighted load balancing to a set of backends in different namespaces. Essentially, I would like to siphon off a percentage of production traffic to services in separate, isolated namespaces for testing. Would something like this be possible? Does Voyager support customization of the HAProxy template (for example, to include weights in the backends section of the config?

Thanks!

@tamalsaha

This comment has been minimized.

Copy link
Member

commented Mar 6, 2017

@stevenpall , currently it is not possible to assign weight directly. This will actually require changes in the YAML format so that multiple services can be defined for a single endpoint.

But if you are looking to use the canary deployment model, you might be interested in https://kubernetes.io/docs/user-guide/managing-deployments/#canary-deployments . This will work with voyager.

Let me know if you have more questions.

@stevenpall

This comment has been minimized.

Copy link
Author

commented Mar 6, 2017

Thanks for the info. I have looked at the canary deployment model, though two issues with it stand out to me for this use case.

The first is that services would not be namespaced, so service discovery becomes more complicated (i.e. having to refer to a service as my-app-feature vs. just my-app).

The other issue is that the percentage of traffic a canary deployment receives is dependant upon the number of replicas of the service in question. This number could change dynamically if horizontal pod autoscaling is enabled, so it would be difficult to use the percentage of traffic going to the canary deployment as a baseline for performance testing. By contrast, setting a weight of, for example, 1 for a backend in the HAProxy config vs. 100 for the other backends guarantees the canary service will always receive 1% of traffic. Of course, 1% of traffic would not be a constant number of req/s over time, but it seems like a more stable value than the alternative.

As far as the original question though, for my own knowledge and for anyone searching for this answer later, does "cross namespace service support" simply mean that one can route to different namespaces in the same config?

Thanks!

@tamalsaha

This comment has been minimized.

Copy link
Member

commented Mar 6, 2017

@stevenpall thanks for explaining your use-case. I think it will be an useful feature to have. PRs are welcome. If you are interested, we can discuss the design. I think it will be similar to passing an array of services with weights.

As far as the original question though, for my own knowledge and for anyone searching for this answer later, does "cross namespace service support" simply mean that one can route to different namespaces in the same config?

Yes. If you provide the servicename as svc_name.ns_name, then service name will resolved accordingly. This allows you to use ingress from one namespace and service from another namespace.

@tamalsaha tamalsaha modified the milestone: 1.5.7 May 8, 2017

@tamalsaha

This comment has been minimized.

Copy link
Member

commented May 20, 2017

@stevenpall , we have added option to set weights to a service using annotation ingress.appscode.com/backend.weight . This will give you more fine grain control over backends of a ingress. All the backends must be in the same namespace.

Cross namespace support will not be added, as that can't be supported without breaking the current. YAML format.

This will be out with 1.5.5 release in next week.

@tamalsaha tamalsaha closed this May 20, 2017

@tamalsaha tamalsaha added this to the 1.5.5 milestone May 20, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.