ad dlables
This commit is contained in:
parent
bb248f41e5
commit
c73db134d5
2 changed files with 6 additions and 5 deletions
|
@ -56,7 +56,7 @@ def get_endpoints_for_loadbalancers():
|
|||
server_number = 1
|
||||
if 'addresses' in subset:
|
||||
for address in subset['addresses']:
|
||||
gateway_endpoint['servers'].append("server %s_%s %s:%d check cookie %s" % (service_name, server_number, address['ip'], port['targetPort']), server_number)
|
||||
gateway_endpoint['servers'].append("server %s_%s %s:%d cookie %s" % (service_name, server_number, address['ip'], port['targetPort']), server_number)
|
||||
server_number += 1
|
||||
load_balanced_endpoints.append(gateway_endpoint)
|
||||
return load_balanced_endpoints
|
||||
|
|
|
@ -20,11 +20,12 @@ backend {{ backend.name }}
|
|||
mode {{ backend.mode }}
|
||||
balance {{ backend.balance }}
|
||||
{% for key, value in backend.labels %}
|
||||
option {{ value }} # {{ key }}
|
||||
{% endfor %
|
||||
cookie {{ backend.mode }} insert indirect nocache
|
||||
{% if 'haproxy_backend_option_' in key %}
|
||||
{{ value }}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% for server in backend.servers -%}
|
||||
{{ server }}
|
||||
{{ server }}{% for key, value in backend.labels %}{% if 'haproxy_server_config_' in key %} {{ value }}{% endif %}{% endfor %}
|
||||
{% endfor %}
|
||||
|
||||
{% endfor %}
|
||||
|
|
Loading…
Reference in a new issue