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.

43 lines
1.4 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 *:{{ loadbalancer_apiserver_healthcheck_port }}
  23. mode http
  24. monitor-uri /healthz
  25. {% endif %}
  26. frontend kube_api_frontend
  27. bind 127.0.0.1:{{ loadbalancer_apiserver_port|default(kube_apiserver_port) }}
  28. mode tcp
  29. option tcplog
  30. default_backend kube_api_backend
  31. backend kube_api_backend
  32. mode tcp
  33. balance leastconn
  34. default-server inter 15s downinter 15s rise 2 fall 2 slowstart 60s maxconn 1000 maxqueue 256 weight 100
  35. option httpchk GET /healthz
  36. http-check expect status 200
  37. {% for host in groups['kube_control_plane'] -%}
  38. server {{ host }} {{ hostvars[host]['access_ip'] | default(hostvars[host]['ip'] | default(fallback_ips[host])) }}:{{ kube_apiserver_port }} check check-ssl verify none
  39. {% endfor -%}