Closed MikeMichel closed 9 years ago
Did you use the default template?
EscapedId
is only used for HAProxy frontend and backend naming. It shouldn't appeare in the ACL section. In your example, acl ::socketchat-host
part is correct. hdr(host) -i ::socketchat.example.io
should really be hdr(host) -i socketchat.example.io
.
I changed the template to my needs
acl {{ $app.EscapedId }}-host hdr(host) -i {{ $app.EscapedId }}.example.io
use_backend {{ $app.EscapedId }}-cluster if {{ $app.EscapedId }}-host
This is the line in template: https://github.com/QubitProducts/bamboo/blob/master/config/haproxy_template.cfg#L52
You probably want to write something like this:
acl {{ $app.EscapedId }}-host hdr(host) -i {{ $appId }}.example.io
use_backend {{ $app.EscapedId }}-cluster if {{ $app.EscapedId }}-host
The complication is '$appId' in new Marathon app ID definition containing slash e.g. '/my-app'. What you want is really just 'my-app'.
This feature https://github.com/QubitProducts/bamboo/issues/27 might allow you to auto generate domains based on app id.
And the documentation for how to use template should be improved.
Yep, i was allready looking for the var which holds the app without any special chars but it's not there yet.
This is probably related to feature request https://github.com/QubitProducts/bamboo/issues/28
Hi,
any specific reason for the colons in
EscapedId: strings.Replace(appId, "/", "::", -1),
?The colons mess up my host acl
acl ::socketchat-host hdr(host) -i ::socketchat.example.io
Best,
Mike