kubeasz/roles/ex-lb/templates/keepalived-master.conf.j2

30 lines
536 B
Plaintext
Raw Normal View History

2019-02-07 15:10:49 +08:00
global_defs {
}
2021-04-09 08:35:12 +08:00
vrrp_track_process check-l4lb {
process l4lb
2019-02-07 15:10:49 +08:00
weight -60
2021-04-09 08:35:12 +08:00
delay 3
2019-02-07 15:10:49 +08:00
}
2021-04-09 08:35:12 +08:00
vrrp_instance VI-01 {
2019-02-07 15:10:49 +08:00
state MASTER
priority 120
unicast_src_ip {{ inventory_hostname }}
unicast_peer {
{% for h in groups['ex_lb'] %}{% if h != inventory_hostname %}
2019-02-07 15:10:49 +08:00
{{ h }}
{% endif %}{% endfor %}
}
dont_track_primary
interface {{ LB_IF }}
virtual_router_id {{ ROUTER_ID }}
advert_int 3
2021-04-09 08:35:12 +08:00
track_process {
check-l4lb
2019-02-07 15:10:49 +08:00
}
virtual_ipaddress {
2019-05-30 21:37:01 +08:00
{{ EX_APISERVER_VIP }}
2019-02-07 15:10:49 +08:00
}
}