mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 22:46:12 +00:00
Merge pull request #34669 from yujuhong/get_netns
Automatic merge from submit-queue 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:
commit
a0624835ac
@ -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