mirror of https://github.com/k3s-io/k3s
Merge pull request #72106 from DataDog/lbernail/improve-svc-deletion
kube-proxy/IPVS Improve service deletionpull/564/head
commit
64bf2ac5f2
|
@ -168,6 +168,7 @@ func (m *GracefulTerminationManager) deleteRsFunc(rsToDelete *listItem) (bool, e
|
|||
// For UDP, ActiveConn is always 0
|
||||
// For TCP, InactiveConn are connections not in ESTABLISHED state
|
||||
if rs.ActiveConn+rs.InactiveConn != 0 {
|
||||
klog.Infof("Not deleting, RS %v: %v ActiveConn, %v InactiveConn", rsToDelete.String(), rs.ActiveConn, rs.InactiveConn)
|
||||
return false, nil
|
||||
}
|
||||
klog.Infof("Deleting rs: %s", rsToDelete.String())
|
||||
|
|
|
@ -1643,6 +1643,10 @@ func (proxier *Proxier) cleanLegacyService(activeServices map[string]bool, curre
|
|||
// Applying graceful termination to all real servers
|
||||
for _, rs := range rsList {
|
||||
uniqueRS := GetUniqueRSName(svc, rs)
|
||||
// If RS is already in the graceful termination list, no need to add it again
|
||||
if proxier.gracefuldeleteManager.InTerminationList(uniqueRS) {
|
||||
continue
|
||||
}
|
||||
klog.V(5).Infof("Using graceful delete to delete: %v", uniqueRS)
|
||||
if err := proxier.gracefuldeleteManager.GracefulDeleteRS(svc, rs); err != nil {
|
||||
klog.Errorf("Failed to delete destination: %v, error: %v", uniqueRS, err)
|
||||
|
|
Loading…
Reference in New Issue