Adding custom api interface for keepalived
This PS adds a possibility to override api_interface for a specific host, it is very usefull when hosts do not use the same NICs. It is done the same way as for neutron-openvswitch-agent. TrivialFix Change-Id: Ica173f75ba73272aa144e65d736936f5426a91d0
This commit is contained in:
parent
8b4ef92852
commit
7e25ecd0a8
@ -24,6 +24,11 @@ spec:
|
|||||||
"sh",
|
"sh",
|
||||||
"-c",
|
"-c",
|
||||||
"cp -a /srv/configmap/..data/* /srv/pod-main-config/;
|
"cp -a /srv/configmap/..data/* /srv/pod-main-config/;
|
||||||
|
API_INTERFACE={{ api_interface }};
|
||||||
|
F=/var/lib/kolla-kubernetes/keepalived/api_interface;
|
||||||
|
[ -f $F ] && API_INTERFACE=$(<$F);
|
||||||
|
sed -i ''s|interface.*|interface ''$API_INTERFACE''|g'' /srv/pod-main-config/keepalived.conf;
|
||||||
|
sed -i ''s|\\(dev*\\).*|\\1 ''$API_INTERFACE''|g'' /srv/pod-main-config/keepalived.conf;
|
||||||
" ],
|
" ],
|
||||||
"volumeMounts": [
|
"volumeMounts": [
|
||||||
{
|
{
|
||||||
@ -33,6 +38,10 @@ spec:
|
|||||||
{
|
{
|
||||||
"name": "pod-main-config",
|
"name": "pod-main-config",
|
||||||
"mountPath": "/srv/pod-main-config"
|
"mountPath": "/srv/pod-main-config"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "host-var-lib-kk",
|
||||||
|
"mountPath": "/var/lib/kolla-kubernetes"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -73,3 +82,6 @@ spec:
|
|||||||
- name: host-run
|
- name: host-run
|
||||||
hostPath:
|
hostPath:
|
||||||
path: /run
|
path: /run
|
||||||
|
- name: host-var-lib-kk
|
||||||
|
hostPath:
|
||||||
|
path: /var/lib/kolla-kubernetes
|
||||||
|
Loading…
Reference in New Issue
Block a user