Commit 2371a70b authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #45166 from feiskyer/namespace-network

Automatic merge from submit-queue (batch tested with PRs 45013, 45166) CRI: remove PodSandboxStatus.Linux.Namespaces.Network **What this PR does / why we need it**: PodSandboxStatus.Linux.Namespaces.Network is not used, so this PR removes it from CRI. **Which issue this PR fixes** Closes: #44972 **Special notes for your reviewer**: **Release note**: ```release-note Remove PodSandboxStatus.Linux.Namespaces.Network from CRI. ``` /assign @Random-Liu @yujuhong
parents 960ff51d d301f228
......@@ -338,8 +338,6 @@ message PodSandboxNetworkStatus {
// Namespace contains paths to the namespaces.
message Namespace {
// Path to the network namespace.
string network = 1;
// Namespace options for Linux namespaces.
NamespaceOption options = 2;
}
......
......@@ -322,7 +322,6 @@ func (ds *dockerService) PodSandboxStatus(podSandboxID string) (*runtimeapi.PodS
return nil, err
}
network := &runtimeapi.PodSandboxNetworkStatus{Ip: IP}
netNS := getNetworkNamespace(r)
hostNetwork := sharesHostNetwork(r)
// If the sandbox has no containerTypeLabelKey label, treat it as a legacy sandbox.
......@@ -351,7 +350,6 @@ func (ds *dockerService) PodSandboxStatus(podSandboxID string) (*runtimeapi.PodS
Network: network,
Linux: &runtimeapi.LinuxPodSandboxStatus{
Namespaces: &runtimeapi.Namespace{
Network: netNS,
Options: &runtimeapi.NamespaceOption{
HostNetwork: hostNetwork,
HostPid: sharesHostPid(r),
......
......@@ -20,7 +20,6 @@ import (
"errors"
"fmt"
"net"
"os"
"testing"
"time"
......@@ -100,7 +99,6 @@ func TestSandboxStatus(t *testing.T) {
// TODO: The following variables depend on the internal
// implementation of FakeDockerClient, and should be fixed.
fakeIP := "2.3.4.5"
fakeNS := fmt.Sprintf("/proc/%d/ns/net", os.Getpid())
state := runtimeapi.PodSandboxState_SANDBOX_READY
ct := int64(0)
......@@ -110,7 +108,7 @@ func TestSandboxStatus(t *testing.T) {
CreatedAt: ct,
Metadata: config.Metadata,
Network: &runtimeapi.PodSandboxNetworkStatus{Ip: fakeIP},
Linux: &runtimeapi.LinuxPodSandboxStatus{Namespaces: &runtimeapi.Namespace{Network: fakeNS, Options: &runtimeapi.NamespaceOption{HostNetwork: hostNetwork}}},
Linux: &runtimeapi.LinuxPodSandboxStatus{Namespaces: &runtimeapi.Namespace{Options: &runtimeapi.NamespaceOption{HostNetwork: hostNetwork}}},
Labels: labels,
Annotations: annotations,
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment