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
37273693
Commit
37273693
authored
Oct 01, 2016
by
Random-Liu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bug in dockershim to set sandbox id properly.
parent
56be1976
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
0 deletions
+3
-0
convert.go
pkg/kubelet/dockershim/convert.go
+2
-0
docker_container_test.go
pkg/kubelet/dockershim/docker_container_test.go
+1
-0
No files found.
pkg/kubelet/dockershim/convert.go
View file @
37273693
...
@@ -56,8 +56,10 @@ func toRuntimeAPIContainer(c *dockertypes.Container) (*runtimeApi.Container, err
...
@@ -56,8 +56,10 @@ func toRuntimeAPIContainer(c *dockertypes.Container) (*runtimeApi.Container, err
return
nil
,
err
return
nil
,
err
}
}
labels
,
annotations
:=
extractLabels
(
c
.
Labels
)
labels
,
annotations
:=
extractLabels
(
c
.
Labels
)
sandboxID
:=
c
.
Labels
[
sandboxIDLabelKey
]
return
&
runtimeApi
.
Container
{
return
&
runtimeApi
.
Container
{
Id
:
&
c
.
ID
,
Id
:
&
c
.
ID
,
PodSandboxId
:
&
sandboxID
,
Metadata
:
metadata
,
Metadata
:
metadata
,
Image
:
&
runtimeApi
.
ImageSpec
{
Image
:
&
c
.
Image
},
Image
:
&
runtimeApi
.
ImageSpec
{
Image
:
&
c
.
Image
},
ImageRef
:
&
c
.
ImageID
,
ImageRef
:
&
c
.
ImageID
,
...
...
pkg/kubelet/dockershim/docker_container_test.go
View file @
37273693
...
@@ -75,6 +75,7 @@ func TestListContainers(t *testing.T) {
...
@@ -75,6 +75,7 @@ func TestListContainers(t *testing.T) {
expected
=
append
([]
*
runtimeApi
.
Container
{{
expected
=
append
([]
*
runtimeApi
.
Container
{{
Metadata
:
configs
[
i
]
.
Metadata
,
Metadata
:
configs
[
i
]
.
Metadata
,
Id
:
&
id
,
Id
:
&
id
,
PodSandboxId
:
&
sandboxID
,
State
:
&
state
,
State
:
&
state
,
Image
:
configs
[
i
]
.
Image
,
Image
:
configs
[
i
]
.
Image
,
ImageRef
:
&
imageRef
,
ImageRef
:
&
imageRef
,
...
...
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