Skip to content

Use similar syntax for static and dynamic routes. #38

@jmalloc

Description

@jmalloc

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions