mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-04 08:03:37 +01:00
81 lines
1.3 KiB
Plaintext
81 lines
1.3 KiB
Plaintext
|
global_defs {
|
||
|
router_id haborlb
|
||
|
}
|
||
|
vrrp_sync_groups VG1 {
|
||
|
group {
|
||
|
VI_1
|
||
|
}
|
||
|
}
|
||
|
#Please change to ens160 to the interface name on you loadbalancer hosts.
|
||
|
vrrp_instance VI_1 {
|
||
|
interface ens160
|
||
|
|
||
|
track_interface {
|
||
|
ens160
|
||
|
}
|
||
|
|
||
|
state MASTER
|
||
|
virtual_router_id 51
|
||
|
priority 10
|
||
|
|
||
|
virtual_ipaddress {
|
||
|
VIP/32
|
||
|
}
|
||
|
advert_int 1
|
||
|
authentication {
|
||
|
auth_type PASS
|
||
|
auth_pass d0cker
|
||
|
}
|
||
|
|
||
|
}
|
||
|
#Please change VIP, harbor_node1_ip, harbor_node2_ip to real ip address
|
||
|
virtual_server VIP 80 {
|
||
|
delay_loop 15
|
||
|
lb_algo rr
|
||
|
lb_kind DR
|
||
|
protocol TCP
|
||
|
nat_mask 255.255.255.0
|
||
|
persistence_timeout 10
|
||
|
|
||
|
real_server harbor_node1_ip 80 {
|
||
|
weight 10
|
||
|
TCP_CHECK {
|
||
|
connect_timeout 3
|
||
|
connect_port 80
|
||
|
}
|
||
|
}
|
||
|
|
||
|
real_server harbor_node2_ip 80 {
|
||
|
weight 10
|
||
|
TCP_CHECK {
|
||
|
connect_timeout 3
|
||
|
connect_port 80
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
#Please uncomment the follow when harbor running under https
|
||
|
#virtual_server VIP 443 {
|
||
|
# delay_loop 15
|
||
|
# lb_algo rr
|
||
|
# lb_kind DR
|
||
|
# protocol TCP
|
||
|
# nat_mask 255.255.255.0
|
||
|
# persistence_timeout 10
|
||
|
#
|
||
|
# real_server harbor_node1_ip 443 {
|
||
|
# weight 10
|
||
|
# TCP_CHECK {
|
||
|
# connect_timeout 3
|
||
|
# connect_port 443
|
||
|
# }
|
||
|
# }
|
||
|
#
|
||
|
# real_server harbor_node2_ip 443 {
|
||
|
# weight 10
|
||
|
# TCP_CHECK {
|
||
|
# connect_timeout 3
|
||
|
# connect_port 443
|
||
|
# }
|
||
|
# }
|
||
|
#}
|