98 lines
2.9 KiB
INI
98 lines
2.9 KiB
INI
|
# Global settings
|
||
|
#---------------------------------------------------------------------
|
||
|
global
|
||
|
maxconn 20000
|
||
|
log /dev/log local0 info
|
||
|
#chroot /var/lib/haproxy
|
||
|
#pidfile /var/run/haproxy.pid
|
||
|
user haproxy
|
||
|
group haproxy
|
||
|
#daemon
|
||
|
|
||
|
# turn on stats unix socket
|
||
|
#stats socket /var/lib/haproxy/stats
|
||
|
|
||
|
#---------------------------------------------------------------------
|
||
|
# common defaults that all the 'listen' and 'backend' sections will
|
||
|
# use if not designated in their block
|
||
|
#---------------------------------------------------------------------
|
||
|
defaults
|
||
|
log global
|
||
|
mode http
|
||
|
option httplog
|
||
|
option dontlognull
|
||
|
option http-server-close
|
||
|
option redispatch
|
||
|
option forwardfor except 127.0.0.0/8
|
||
|
retries 3
|
||
|
maxconn 20000
|
||
|
timeout http-request 10000ms
|
||
|
timeout http-keep-alive 10000ms
|
||
|
timeout check 10000ms
|
||
|
timeout connect 40000ms
|
||
|
timeout client 300000ms
|
||
|
timeout server 300000ms
|
||
|
timeout queue 50000ms
|
||
|
|
||
|
# Enable HAProxy stats
|
||
|
listen stats
|
||
|
bind :9000
|
||
|
stats uri /stats
|
||
|
stats refresh 10000ms
|
||
|
|
||
|
# Kube API Server
|
||
|
frontend k8s_api_frontend
|
||
|
bind *:6443
|
||
|
default_backend k8s_api_backend
|
||
|
mode tcp
|
||
|
|
||
|
backend k8s_api_backend
|
||
|
mode tcp
|
||
|
balance source
|
||
|
#option httpchk GET /readyz
|
||
|
#server ocp-bootstrap 192.169.22.10:6443 check
|
||
|
server ocp-cp-1 192.169.22.100:6443 check
|
||
|
server ocp-cp-2 192.169.22.101:6443 check
|
||
|
server ocp-cp-3 192.169.22.102:6443 check
|
||
|
|
||
|
# OCP Machine Config Server
|
||
|
frontend ocp_machine_config_server_frontend
|
||
|
mode tcp
|
||
|
bind :22623
|
||
|
default_backend ocp_machine_config_server_backend
|
||
|
|
||
|
backend ocp_machine_config_server_backend
|
||
|
mode tcp
|
||
|
balance source
|
||
|
#server ocp-bootstrap 192.169.22.10:22623 check
|
||
|
server ocp-cp-1 192.169.22.100:22623 check
|
||
|
server ocp-cp-2 192.169.22.101:22623 check
|
||
|
server ocp-cp-3 192.169.22.102:22623 check
|
||
|
|
||
|
# OCP Ingress - layer 4 tcp mode for each. Ingress Controller will handle layer 7.
|
||
|
frontend ocp_http_ingress_frontend
|
||
|
bind *:80
|
||
|
default_backend ocp_http_ingress_backend
|
||
|
mode tcp
|
||
|
|
||
|
backend ocp_http_ingress_backend
|
||
|
balance source
|
||
|
mode tcp
|
||
|
server ocp-w-1 192.169.22.110:80 check
|
||
|
server ocp-w-2 192.169.22.111:80 check
|
||
|
server ocp-w-3 192.169.22.112:80 check
|
||
|
#server ocp-w-5 192.169.22.215:80 check
|
||
|
|
||
|
frontend ocp_https_ingress_frontend
|
||
|
bind *:443
|
||
|
default_backend ocp_https_ingress_backend
|
||
|
mode tcp
|
||
|
|
||
|
backend ocp_https_ingress_backend
|
||
|
mode tcp
|
||
|
balance source
|
||
|
server ocp-w-1 192.169.22.110:443 check
|
||
|
server ocp-w-2 192.169.22.111:443 check
|
||
|
server ocp-w-3 192.169.22.112:443 check
|
||
|
#server ocp-w-5 192.169.22.215:443 check
|