34c2cb8e64
To improve security, operators have asked for two VIPs for their cloud. VIP 1 is the internal VIP that can reach internal and admin endpoints. In addition, the internal VIP can also reach other internal services, such as the database and message services. VIP 2 is the external VIP that can only reach public endpoints. With one VIP only, all services are reached at the same address. To add a second VIP, this patch adds two new configuration parameters. kolla_external_vip_address: is an IPv4 address to use for created VIP kolla_external_vip_interface: is the network interface to use for VIP In this scenario, the first VIP (the internal VIP), is defined by the original parameters (kolla_internal address and network_interface). When using two VIPs, the existing kolla_external_address parameter should be/point to/resolve to the kolla_external_vip_address. Closes-bug: 1535333 Change-Id: I5bfcefaf7899298455cdade8209c34324aebfecb
37 lines
790 B
Django/Jinja
37 lines
790 B
Django/Jinja
vrrp_script check_alive {
|
|
script "/check_alive.sh"
|
|
interval 2
|
|
fall 2
|
|
rise 10
|
|
}
|
|
|
|
vrrp_instance kolla_internal_vip {
|
|
state MASTER
|
|
interface {{ api_interface }}
|
|
virtual_router_id 51
|
|
priority {{ groups['haproxy'].index(inventory_hostname) + 1 }}
|
|
advert_int 1
|
|
virtual_ipaddress {
|
|
{{ kolla_internal_address }}
|
|
}
|
|
track_script {
|
|
check_alive
|
|
}
|
|
}
|
|
|
|
{% if haproxy_enable_external_vip | bool %}
|
|
vrrp_instance kolla_external_vip {
|
|
state MASTER
|
|
interface {{ kolla_external_vip_interface }}
|
|
virtual_router_id 52
|
|
priority {{ groups['haproxy'].index(inventory_hostname) + 1 }}
|
|
advert_int 1
|
|
virtual_ipaddress {
|
|
{{ kolla_external_vip_address }}
|
|
}
|
|
track_script {
|
|
check_alive
|
|
}
|
|
}
|
|
{% endif %}
|