Skip to content

Commit

Permalink
haproxy-proxy-ipv6 (kubernetes-sigs#9674)
Browse files Browse the repository at this point in the history
  • Loading branch information
yankay authored Mar 22, 2023
1 parent 9a8bf0e commit cc382f2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion roles/kubernetes/node/templates/loadbalancer/haproxy.cfg.j2
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,19 @@ defaults

{% if loadbalancer_apiserver_healthcheck_port is defined -%}
frontend healthz
bind *:{{ loadbalancer_apiserver_healthcheck_port }}
bind 0.0.0.0:{{ loadbalancer_apiserver_healthcheck_port }}
{% if enable_dual_stack_networks -%}
bind :::{{ loadbalancer_apiserver_healthcheck_port }}
{% endif -%}
mode http
monitor-uri /healthz
{% endif %}

frontend kube_api_frontend
bind 127.0.0.1:{{ loadbalancer_apiserver_port|default(kube_apiserver_port) }}
{% if enable_dual_stack_networks -%}
bind [::1]:{{ loadbalancer_apiserver_port|default(kube_apiserver_port) }};
{% endif -%}
mode tcp
option tcplog
default_backend kube_api_backend
Expand Down
2 changes: 1 addition & 1 deletion roles/kubernetes/node/templates/loadbalancer/nginx.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ stream {
server {
listen 127.0.0.1:{{ loadbalancer_apiserver_port|default(kube_apiserver_port) }};
{% if enable_dual_stack_networks -%}
listen [::]:{{ loadbalancer_apiserver_port|default(kube_apiserver_port) }};
listen [::1]:{{ loadbalancer_apiserver_port|default(kube_apiserver_port) }};
{% endif -%}
proxy_pass kube_apiserver;
proxy_timeout 10m;
Expand Down

0 comments on commit cc382f2

Please sign in to comment.