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

Use similar syntax for static and dynamic routes. #38

Open
5 tasks
jmalloc opened this issue Apr 10, 2017 · 0 comments
Open
5 tasks

Use similar syntax for static and dynamic routes. #38

jmalloc opened this issue Apr 10, 2017 · 0 comments

Comments

@jmalloc
Copy link
Contributor

jmalloc commented Apr 10, 2017

Static routes are configured by setting an environment variable on the Honeycomb service:

ROUTE_WWW="www.* https://webserver.internal.domain:8443"

Dynamic routes are configured by setting labels on other services on the public network:

--label-add honeycomb.match=www.*
--label-add honeycomb.match.whatever=other.domain.org
--label-add honeycomb.port=80

Ideally, the syntax for both should be unified, which would also allow a single service to listen on multiple ports. For dynamic routes, the "host" part of the target URL is not required. As weird as it looks, a URL without the host is valid and parsable:

--label-add "honeycomb.route.www=www.* https://:80"

Lastly, the honeycomb.match label is always required, as that's how Honeycomb locates routable Docker services. It would be better to use a different label to find services, that way routes can be added and removed without having to rename any labels. Perhaps something like:

--label-add "honeycomb.expose"

TL;DR:

  • retain existing behaviour, but emit warnings when used
  • add honeycomb.expose label to identify routable services
  • add honeycomb.route.<name>=<pattern> <backend-url> label to discover dynamic routes
  • add HONEYCOMB_ROUTE_<name>=<pattern> <backend-url> env var to configure static routes
  • remove existing behaviour in next major version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant