-
Notifications
You must be signed in to change notification settings - Fork 268
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
Make bind
parameter processing more flexible
#154
Make bind
parameter processing more flexible
#154
Conversation
This fixes <https://tickets.puppetlabs.com/browse/MODULES-1741>. HAProxy's `bind` parameter for listen and frontend services accepts multiple ways of specifying addresses, ports, port ranges, sockets and bind options. The template `templates/fragments/_bind.erb` that processes the `haproxy::listen::bind` and `haproxy::frontend::bind` hash should accomodate that, meaning specifically that it should not assume that a valid bind configuration is universally of the format `bind <ip address>:<port> [<options>*]`. The HAProxy documentation at http://cbonte.github.io/haproxy-dconv/configuration-1.5.html#4.2-bind details how complex the `bind` configuration can be. The `templates/fragments/_bind.erb` template now processes the `bind` hash very simply by using the hash keys as "address and/or port" and the key's value as a list of bind options that together make up a single `bind` line in the resulting listen or frontend service configuration. Most notably there is no more IP address or port validation. The values are taken as is from the `bind` hash. The rationale behind that is discussed in <https://tickets.puppetlabs.com/browse/MODULES-1741>. Contains updated and expanded documentation, and updated spec tests.
ef7e96a
to
1041fba
Compare
now i finally understand the title of your jira. |
Granted, I created the Jira issue at 5 AM but I didn't think the title was going to be a problem :) Do you have a suggestion for a better title? |
no worries, it's alright! |
Would be nice if we could this get merged :-) |
ping @cmurphy / @mhaskel: ping, given that @antaflos and me use this in our prod infra, maye we could merge it :) also, now that concat has a |
Make `bind` parameter processing more flexible
…ility Make `bind` parameter processing more flexible
This fixes https://tickets.puppetlabs.com/browse/MODULES-1741.
HAProxy's
bind
parameter for listen and frontend services acceptsmultiple ways of specifying addresses, ports, port ranges, sockets and
bind options. The template
templates/fragments/_bind.erb
thatprocesses the
haproxy::listen::bind
andhaproxy::frontend::bind
hashshould accomodate that, meaning specifically that it should not assume
that a valid bind configuration is universally of the format
bind <ip address>:<port> [<options>*]
. The HAProxy documentation athttp://cbonte.github.io/haproxy-dconv/configuration-1.5.html#4.2-bind
details how complex the
bind
configuration can be.The
templates/fragments/_bind.erb
template now processes thebind
hash very simply by using the hash keys as "address and/or port" and the
key's value as a list of bind options that together make up a single
bind
line in the resulting listen or frontend service configuration.Most notably there is no more IP address or port validation. The values
are taken as is from the
bind
hash. The rationale behind that isdiscussed in https://tickets.puppetlabs.com/browse/MODULES-1741.
Contains updated and expanded documentation, and updated spec tests.