-
Notifications
You must be signed in to change notification settings - Fork 1
/
config.yml
44 lines (34 loc) · 1.25 KB
/
config.yml
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
apiVersion: v1
kind: ConfigMap
metadata:
name: haproxy-config
data:
haproxy.cfg: |
global
log stdout format raw local0
defaults
log global
option httplog
option dontlognull
timeout connect 5000ms
timeout client 50000ms
timeout server 50000ms
frontend http_front
bind *:80
default_backend http_back
backend http_back
balance uri
http-response set-header X-HAProxy-Hostname %[env(HOSTNAME)]
hash-type consistent
# Prevent Hotspots with consistent hashing
# <factor> is a percentage greater than 100. For example, if <factor> is 150,
# then no server will be allowed to have a load more than 1.5 times the average.
# If server weights are used, they will be respected.
hash-balance-factor 150
mode http
server nginx-0 nginx-0.nginx-service.default.svc.cluster.local:80 check
server nginx-1 nginx-1.nginx-service.default.svc.cluster.local:80 check
server nginx-2 nginx-2.nginx-service.default.svc.cluster.local:80 check
server nginx-3 nginx-3.nginx-service.default.svc.cluster.local:80 check
server nginx-4 nginx-4.nginx-service.default.svc.cluster.local:80 check
option httpchk GET /health