mirror of
https://github.com/cloudnativelabs/kube-router.git
synced 2025-10-04 22:41:03 +02:00
fix wrong use of advertiseVIPs where withdrawVIPs is required (#436)
This commit is contained in:
parent
b0733cb581
commit
6d86656f5e
@ -93,6 +93,7 @@ func (nrc *NetworkRoutingController) OnServiceUpdate(obj interface{}) {
|
||||
return
|
||||
}
|
||||
|
||||
// update export policies so that new VIP's gets addedd to clusteripprefixsit and vip gets advertised to peers
|
||||
err = nrc.addExportPolicies()
|
||||
if err != nil {
|
||||
glog.Errorf("Error adding BGP export policies: %s", err.Error())
|
||||
@ -126,8 +127,14 @@ func (nrc *NetworkRoutingController) OnServiceDelete(obj interface{}) {
|
||||
return
|
||||
}
|
||||
|
||||
// update export policies so that deleted VIP's gets removed from clusteripprefixsit
|
||||
err = nrc.addExportPolicies()
|
||||
if err != nil {
|
||||
glog.Errorf("Error adding BGP export policies: %s", err.Error())
|
||||
}
|
||||
|
||||
if len(toAdvertise) > 0 {
|
||||
nrc.withdrawVIPs(toWithdraw)
|
||||
nrc.withdrawVIPs(toAdvertise)
|
||||
}
|
||||
|
||||
if len(toWithdraw) > 0 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user