mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-26 21:17:23 +00:00
[kube-proxy/ipvs] Do not try to delete RS already in termination list
This commit is contained in:
parent
ffbfc53053
commit
8bafc9771e
@ -1643,6 +1643,10 @@ func (proxier *Proxier) cleanLegacyService(activeServices map[string]bool, curre
|
|||||||
// Applying graceful termination to all real servers
|
// Applying graceful termination to all real servers
|
||||||
for _, rs := range rsList {
|
for _, rs := range rsList {
|
||||||
uniqueRS := GetUniqueRSName(svc, rs)
|
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)
|
klog.V(5).Infof("Using graceful delete to delete: %v", uniqueRS)
|
||||||
if err := proxier.gracefuldeleteManager.GracefulDeleteRS(svc, rs); err != nil {
|
if err := proxier.gracefuldeleteManager.GracefulDeleteRS(svc, rs); err != nil {
|
||||||
klog.Errorf("Failed to delete destination: %v, error: %v", uniqueRS, err)
|
klog.Errorf("Failed to delete destination: %v, error: %v", uniqueRS, err)
|
||||||
|
Loading…
Reference in New Issue
Block a user