diff --git a/releasenotes/notes/haproxy-bind-override-9562bab32b964de2.yaml b/releasenotes/notes/haproxy-bind-override-9562bab32b964de2.yaml new file mode 100644 index 0000000..2eb70d8 --- /dev/null +++ b/releasenotes/notes/haproxy-bind-override-9562bab32b964de2.yaml @@ -0,0 +1,7 @@ +--- +fixes: + - Setting the haproxy_bind list on a service is now used as an override to the + other VIPs defined in the environment. Previously it was being treated as + an append to the other VIPs so there was no path to override the VIP binds + for a service. For example, haproxy_bind could be used to bind a service to + the internal VIP only. diff --git a/templates/service.j2 b/templates/service.j2 index 50f615f..3abd2af 100644 --- a/templates/service.j2 +++ b/templates/service.j2 @@ -19,9 +19,7 @@ {% endif -%} {%- if item.service.haproxy_bind is defined %} - {% if item.service.haproxy_bind not in vip_binds %} - {% set _ = vip_binds.append(item.service.haproxy_bind) %} - {% endif %} + {% set vip_binds = item.service.haproxy_bind %} {% endif -%} {% for vip_bind in vip_binds %}