mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 04:33:26 +00:00
Allow kuberuntime to get network namespace for not ready sandboxes
Kubelet calls TearDownPod to clean up the network resources for a pod sandbox. TearDownPod relies on GetNetNS to retrieve network namespace, and the current implementation makes this impossible for not-ready sandboxes. This change removes the unnecessary filter to fix this issue.
This commit is contained in:
parent
04437f6403
commit
43368ff7b9
@ -941,9 +941,7 @@ func (m *kubeGenericRuntimeManager) GetPodStatus(uid kubetypes.UID, name, namesp
|
||||
// TODO: Rename param name to sandboxID in kubecontainer.Runtime.GetNetNS().
|
||||
// TODO: Remove GetNetNS after networking is delegated to the container runtime.
|
||||
func (m *kubeGenericRuntimeManager) GetNetNS(sandboxID kubecontainer.ContainerID) (string, error) {
|
||||
readyState := runtimeApi.PodSandBoxState_READY
|
||||
filter := &runtimeApi.PodSandboxFilter{
|
||||
State: &readyState,
|
||||
Id: &sandboxID.ID,
|
||||
LabelSelector: map[string]string{kubernetesManagedLabel: "true"},
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user