Refactor: tried to refactor code
- move scripts to assets/scripts (and updated build) - put most logic into HaproxyConfigGenerator - created DockerLabelHandler for all label handling from previous code - added unit tests and fixtures to cover HaproxyConfigGenerator and DockerLabelHandler - added a Makefile with build (for docker build) and test targets
This commit is contained in:
parent
5f9eac4b8a
commit
08de132450
21 changed files with 387 additions and 131 deletions
6
templates/frontend-mode-tcp.j2
Normal file
6
templates/frontend-mode-tcp.j2
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
mode tcp
|
||||
option tcplog
|
||||
log global
|
||||
{% set backend = (o["hosts"]|first) %}
|
||||
default_backend srv_{{ backend.replace(".", "_") + "_{0}_{1}".format(o["port"], salt) }}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue