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

Fix sorting of service use_backend configs to prefer more-specifics #45

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

SpComb
Copy link
Contributor

@SpComb SpComb commented Feb 13, 2018

Fixes kontena/kontena#3269

Fix the order of the generated haproxy use_backend statements to prioritize more-specific host/virtual_path patterns if they overlap with some less-specific pattern.

This minimal fix is only for services that have a single virtual_host/virtual_path. Making this work correctly for services with multiple hosts/paths would require splitting up the ACLs, and get more complex.

TODO

  • Figure out if this breaks services with multiple hosts/paths
  • Probably needs more specs, I'm not 100% sure if the virtual_hosts sorting is entirely correct

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