shutdown fix

This commit is contained in:
ston1th 2021-09-26 21:31:05 +02:00
commit 279fba0c57
4 changed files with 39 additions and 11 deletions

View file

@ -129,12 +129,7 @@ func NewLBController(cfg *config.Config, srv *api.Server, log logr.Logger) (call
}
},
Cleanup: func(ctx context.Context, cc cluster.CallbackContext) {
db := db.New(cc)
ips, err := db.GetIPs()
if err != nil {
return
}
deleteIPs(cc, n, ips)
deleteIPs(cc, n, n.GetIPs())
},
}
return