CiscoCloud / haproxy-consul

Dynamic haproxy configuration using consul
Apache License 2.0
168 stars 85 forks source link

use registrator-style environment variables in Mesos #6

Open BrianHicks opened 9 years ago

BrianHicks commented 9 years ago

or labels. What would be the most appropriate thing to expect here?

@stevendborrelli @ChrisAubuchon

stevendborrelli commented 9 years ago

I'd rather use mesos labels.

BrianHicks commented 9 years ago

So, labels:

{
    "HTTP_PORT_0_NAME": "x",
    "HTTP_PORT_1_NAME": "y"
}

This replaces HTTP_PORT_IDX_0_NAME in the current Marathon configuration, and would remove HAPROXY_HTTP=true. haproxy-consul would just forward any port indices which are set in this way, rather than relying on a separate variable.

How's that sound?