forked from ryanhay/ocp4-metal-install
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhaproxy.cfg
77 lines (68 loc) · 2.12 KB
/
haproxy.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# 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
server kb01 10.20.30.201:6443 check
# OCP Ingress - layer 4 tcp mode for each. Ingress Controller will handle layer 7.
frontend kb_http_ingress_frontend
bind :80
default_backend kb_http_ingress_backend
mode tcp
backend kb_http_ingress_backend
balance source
mode tcp
server kb01 10.20.30.201:80 check
server kb02 10.20.30.202:80 check
server kb03 10.20.30.203:80 check
frontend kb_https_ingress_frontend
bind *:443
default_backend kb_https_ingress_backend
mode tcp
backend kb_https_ingress_backend
mode tcp
balance source
server kb01 10.20.30.201:443 check
server kb02 10.20.30.202:443 check
server kb03 10.20.30.203:443 check