keep-terminated-pod-volumes flag on kubelet is removed

This commit is contained in:
carlory
2023-11-28 15:09:23 +08:00
parent ed1cc43cf7
commit b47c73ee26
20 changed files with 70 additions and 219 deletions

View File

@@ -174,11 +174,7 @@ func DetermineVolumeAction(pod *v1.Pod, desiredStateOfWorld cache.DesiredStateOf
}
if util.IsPodTerminated(pod, pod.Status) {
nodeName := types.NodeName(pod.Spec.NodeName)
keepTerminatedPodVolume := desiredStateOfWorld.GetKeepTerminatedPodVolumesForNode(nodeName)
// if pod is terminate we let kubelet policy dictate if volume
// should be detached or not
return keepTerminatedPodVolume
return false
}
return defaultAction
}