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

Url Parameter based routing #1159

Open
erulabs opened this issue Aug 7, 2024 · 0 comments
Open

Url Parameter based routing #1159

erulabs opened this issue Aug 7, 2024 · 0 comments

Comments

@erulabs
Copy link

erulabs commented Aug 7, 2024

What are you trying to do

I want to route traffic to a particular service based on an optional URL parameter. Without the parameter, it should match either the default backend or any other matching backend.

What HAProxy Ingress should do or how it should behave differently

HAPRoxy ingress should allow an annotation on a service or ingress level that adds a frontend acl like:

acl route_to_urlparam_gated_service urlp(myFlag) -m found
use_backend urlparam_gated_service if route_to_urlparam_gated_service

Unless I'm missing something, this seems to be currently only possible by adding a global frontend config snippet and knowing the generated name of the backend ahead of time. This isn't so bad, but it does mean if the related ingress is deleted, haproxy will stop reloading as the backend referenced in the global config will no longer exist.

This is the only part of migrating from plain haproxy to haproxy-ingress that has been a pain for me so far. Thanks so much for your efforts -- looking forward to contributing when I can!

haproxytech's ingress controller supports haproxy.org/route-acl (docs) which supports this functionality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants