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
fix: handle missing NAD during pod deletion (#5929)
Allow pod cleanup when NetworkAttachmentDefinition is deleted before pod.
Extract subnet info from pod annotations to release IPs and prevent subnet
finalizer deadlock.
Signed-off-by: DiMalovanyy <dmitrymalovanyy@gmail.com>
klog.Errorf("deleting pod %s/%s net-attach-def %s not found and cannot determine subnet, gc will clean its ip cr", pod.Namespace, pod.Name, attach.Name)
1802
+
continue
1803
+
}
1804
+
1805
+
subnet, err:=c.subnetsLister.Get(subnetName)
1806
+
iferr!=nil {
1807
+
klog.Errorf("failed to get subnet %s, %v", subnetName, err)
1808
+
ifk8serrors.IsNotFound(err) {
1809
+
klog.Errorf("deleting pod %s/%s attach subnet %s already not exist, gc will clean its ip cr", pod.Namespace, pod.Name, subnetName)
1810
+
continue
1811
+
}
1812
+
returnnil, err
1813
+
}
1814
+
1815
+
klog.Infof("pod %s/%s net-attach-def %s not found, using subnet %s for cleanup", pod.Namespace, pod.Name, attach.Name, subnetName)
0 commit comments