You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
wrappedLog:=scanAllLogger.With(zap.String("gc-reason", fmt.Sprintf("The current state of the Pod %s/%s is: %v", podNS, podName, podYaml.Status.Phase)))
@@ -263,7 +266,7 @@ func (s *SpiderGC) executeScanAll(ctx context.Context) {
263
266
}
264
267
}
265
268
266
-
// handle the IP in ippool
269
+
// handle same name pod with different uid in the ippool
267
270
ifstring(podYaml.UID) !=poolIPAllocation.PodUID {
268
271
wrappedLog:=scanAllLogger.With(zap.String("gc-reason", fmt.Sprintf("Pod: %s/%s UID %s is different from IPPool: %s UID %s", podNS, podName, podYaml.UID, pool.Name, poolIPAllocation.PodUID)))
269
272
ifflagStaticIPPod {
@@ -311,6 +314,7 @@ func (s *SpiderGC) executeScanAll(ctx context.Context) {
311
314
flagGCEndpoint=false
312
315
}
313
316
} else {
317
+
// handle same name pod with different uid in the endpoint
wrappedLog:=scanAllLogger.With(zap.String("gc-reason", fmt.Sprintf("Pod:%s/%s UID %s is different from endpoint:%s/%s UID %s", podNS, podName, podYaml.UID, endpoint.Namespace, endpoint.Name, poolIPAllocation.PodUID)))
316
320
ifflagStaticIPPod {
@@ -337,6 +341,7 @@ func (s *SpiderGC) executeScanAll(ctx context.Context) {
337
341
} else {
338
342
wrappedLog.Sugar().Infof("pod %s/%s is not a static Pod with a status of %v, the endpoint %v/%v should be reclaimed", podNS, podName, podYaml.Status.Phase, endpoint.Namespace, endpoint.Name)
0 commit comments