mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-04 01:40:07 +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: Rename param name to sandboxID in kubecontainer.Runtime.GetNetNS().
|
||||||
// TODO: Remove GetNetNS after networking is delegated to the container runtime.
|
// TODO: Remove GetNetNS after networking is delegated to the container runtime.
|
||||||
func (m *kubeGenericRuntimeManager) GetNetNS(sandboxID kubecontainer.ContainerID) (string, error) {
|
func (m *kubeGenericRuntimeManager) GetNetNS(sandboxID kubecontainer.ContainerID) (string, error) {
|
||||||
readyState := runtimeApi.PodSandBoxState_READY
|
|
||||||
filter := &runtimeApi.PodSandboxFilter{
|
filter := &runtimeApi.PodSandboxFilter{
|
||||||
State: &readyState,
|
|
||||||
Id: &sandboxID.ID,
|
Id: &sandboxID.ID,
|
||||||
LabelSelector: map[string]string{kubernetesManagedLabel: "true"},
|
LabelSelector: map[string]string{kubernetesManagedLabel: "true"},
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user