-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathhaproxy.cfg
80 lines (71 loc) · 2.8 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
78
79
# /etc/haproxy/haproxy.cfg
#---------------------------------------------------------------------
# Global settings
#---------------------------------------------------------------------
global
log stdout format raw local0
daemon
#---------------------------------------------------------------------
# common defaults that all the 'listen' and 'backend' sections will
# use if not designated in their block
#---------------------------------------------------------------------
defaults
mode http
log global
option httplog
option dontlognull
option forwardfor except 127.0.0.0/8
option redispatch
retries 1
timeout http-request 10s
timeout queue 20s
timeout connect 5s
timeout client 35s
timeout server 35s
timeout http-keep-alive 10s
timeout check 10s
#---------------------------------------------------------------------
# apiserver frontend which proxys to the control plane nodes
#---------------------------------------------------------------------
frontend apiserver
bind *:6443
mode tcp
option tcplog
default_backend apiserverbackend
#---------------------------------------------------------------------
# round robin balancing for apiserver
#---------------------------------------------------------------------
backend apiserverbackend
mode tcp
balance roundrobin
server delegatio-master-0 delegatio-master-0:6443 check
server delegatio-master-1 delegatio-master-1:6443 check
server delegatio-master-2 delegatio-master-2:6443 check
#---------------------------------------------------------------------
# apiserver frontend which proxys to the control plane nodes
#---------------------------------------------------------------------
frontend delegatioapi
bind *:9000 proto h2
mode http
default_backend delegatiobackend
#---------------------------------------------------------------------
# round robin balancing for apiserver
#---------------------------------------------------------------------
backend delegatiobackend
mode http
balance roundrobin
server delegatio-master-0 delegatio-master-0:9000 check proto h2
frontend etcdserver
bind *:2379
mode tcp
option tcplog
default_backend etcdserverbackend
#---------------------------------------------------------------------
# round robin balancing for apiserver
#---------------------------------------------------------------------
backend etcdserverbackend
mode tcp
balance roundrobin
server delegatio-master-0 delegatio-master-0:2379 check
server delegatio-master-1 delegatio-master-1:2379 check
server delegatio-master-2 delegatio-master-2:2379 check