Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
d301f228
Commit
d301f228
authored
May 01, 2017
by
Pengfei Ni
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CRI: remove PodSandboxStatus.Linux.Namespaces.Network
Closes: #44972
parent
29f37fde
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
1 addition
and
7 deletions
+1
-7
api.pb.go
pkg/kubelet/api/v1alpha1/runtime/api.pb.go
+0
-0
api.proto
pkg/kubelet/api/v1alpha1/runtime/api.proto
+0
-2
docker_sandbox.go
pkg/kubelet/dockershim/docker_sandbox.go
+0
-2
docker_sandbox_test.go
pkg/kubelet/dockershim/docker_sandbox_test.go
+1
-3
No files found.
pkg/kubelet/api/v1alpha1/runtime/api.pb.go
View file @
d301f228
This diff is collapsed.
Click to expand it.
pkg/kubelet/api/v1alpha1/runtime/api.proto
View file @
d301f228
...
@@ -338,8 +338,6 @@ message PodSandboxNetworkStatus {
...
@@ -338,8 +338,6 @@ message PodSandboxNetworkStatus {
// Namespace contains paths to the namespaces.
// Namespace contains paths to the namespaces.
message
Namespace
{
message
Namespace
{
// Path to the network namespace.
string
network
=
1
;
// Namespace options for Linux namespaces.
// Namespace options for Linux namespaces.
NamespaceOption
options
=
2
;
NamespaceOption
options
=
2
;
}
}
...
...
pkg/kubelet/dockershim/docker_sandbox.go
View file @
d301f228
...
@@ -322,7 +322,6 @@ func (ds *dockerService) PodSandboxStatus(podSandboxID string) (*runtimeapi.PodS
...
@@ -322,7 +322,6 @@ func (ds *dockerService) PodSandboxStatus(podSandboxID string) (*runtimeapi.PodS
return
nil
,
err
return
nil
,
err
}
}
network
:=
&
runtimeapi
.
PodSandboxNetworkStatus
{
Ip
:
IP
}
network
:=
&
runtimeapi
.
PodSandboxNetworkStatus
{
Ip
:
IP
}
netNS
:=
getNetworkNamespace
(
r
)
hostNetwork
:=
sharesHostNetwork
(
r
)
hostNetwork
:=
sharesHostNetwork
(
r
)
// If the sandbox has no containerTypeLabelKey label, treat it as a legacy sandbox.
// 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
...
@@ -351,7 +350,6 @@ func (ds *dockerService) PodSandboxStatus(podSandboxID string) (*runtimeapi.PodS
Network
:
network
,
Network
:
network
,
Linux
:
&
runtimeapi
.
LinuxPodSandboxStatus
{
Linux
:
&
runtimeapi
.
LinuxPodSandboxStatus
{
Namespaces
:
&
runtimeapi
.
Namespace
{
Namespaces
:
&
runtimeapi
.
Namespace
{
Network
:
netNS
,
Options
:
&
runtimeapi
.
NamespaceOption
{
Options
:
&
runtimeapi
.
NamespaceOption
{
HostNetwork
:
hostNetwork
,
HostNetwork
:
hostNetwork
,
HostPid
:
sharesHostPid
(
r
),
HostPid
:
sharesHostPid
(
r
),
...
...
pkg/kubelet/dockershim/docker_sandbox_test.go
View file @
d301f228
...
@@ -20,7 +20,6 @@ import (
...
@@ -20,7 +20,6 @@ import (
"errors"
"errors"
"fmt"
"fmt"
"net"
"net"
"os"
"testing"
"testing"
"time"
"time"
...
@@ -100,7 +99,6 @@ func TestSandboxStatus(t *testing.T) {
...
@@ -100,7 +99,6 @@ func TestSandboxStatus(t *testing.T) {
// TODO: The following variables depend on the internal
// TODO: The following variables depend on the internal
// implementation of FakeDockerClient, and should be fixed.
// implementation of FakeDockerClient, and should be fixed.
fakeIP
:=
"2.3.4.5"
fakeIP
:=
"2.3.4.5"
fakeNS
:=
fmt
.
Sprintf
(
"/proc/%d/ns/net"
,
os
.
Getpid
())
state
:=
runtimeapi
.
PodSandboxState_SANDBOX_READY
state
:=
runtimeapi
.
PodSandboxState_SANDBOX_READY
ct
:=
int64
(
0
)
ct
:=
int64
(
0
)
...
@@ -110,7 +108,7 @@ func TestSandboxStatus(t *testing.T) {
...
@@ -110,7 +108,7 @@ func TestSandboxStatus(t *testing.T) {
CreatedAt
:
ct
,
CreatedAt
:
ct
,
Metadata
:
config
.
Metadata
,
Metadata
:
config
.
Metadata
,
Network
:
&
runtimeapi
.
PodSandboxNetworkStatus
{
Ip
:
fakeIP
},
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
,
Labels
:
labels
,
Annotations
:
annotations
,
Annotations
:
annotations
,
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment