You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
1.7 KiB

  1. global
  2. maxconn 4000
  3. log 127.0.0.1 local0
  4. defaults
  5. mode http
  6. log global
  7. option httplog
  8. option dontlognull
  9. option http-server-close
  10. option redispatch
  11. retries 5
  12. timeout http-request 5m
  13. timeout queue 5m
  14. timeout connect 30s
  15. timeout client {{ loadbalancer_apiserver_keepalive_timeout }}
  16. timeout server 15m
  17. timeout http-keep-alive 30s
  18. timeout check 30s
  19. maxconn 4000
  20. {% if loadbalancer_apiserver_healthcheck_port is defined -%}
  21. frontend healthz
  22. bind 0.0.0.0:{{ loadbalancer_apiserver_healthcheck_port }}
  23. {% if enable_dual_stack_networks -%}
  24. bind :::{{ loadbalancer_apiserver_healthcheck_port }}
  25. {% endif -%}
  26. mode http
  27. monitor-uri /healthz
  28. {% endif %}
  29. frontend kube_api_frontend
  30. bind 127.0.0.1:{{ loadbalancer_apiserver_port|default(kube_apiserver_port) }}
  31. {% if enable_dual_stack_networks -%}
  32. bind [::1]:{{ loadbalancer_apiserver_port|default(kube_apiserver_port) }};
  33. {% endif -%}
  34. mode tcp
  35. option tcplog
  36. default_backend kube_api_backend
  37. backend kube_api_backend
  38. mode tcp
  39. balance leastconn
  40. default-server inter 15s downinter 15s rise 2 fall 2 slowstart 60s maxconn 1000 maxqueue 256 weight 100
  41. option httpchk GET /healthz
  42. http-check expect status 200
  43. {% for host in groups['kube_control_plane'] -%}
  44. server {{ host }} {{ hostvars[host]['access_ip'] | default(hostvars[host]['ip'] | default(fallback_ips[host])) }}:{{ kube_apiserver_port }} check check-ssl verify none
  45. {% endfor -%}