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
13b23c51
Commit
13b23c51
authored
Sep 14, 2016
by
Yu-Ju Hong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dockershim: fix docker filter, Hostname, and the apiversion
parent
fc466743
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
5 deletions
+7
-5
docker_container.go
pkg/kubelet/dockershim/docker_container.go
+0
-1
docker_service.go
pkg/kubelet/dockershim/docker_service.go
+4
-1
helpers.go
pkg/kubelet/dockershim/helpers.go
+3
-3
No files found.
pkg/kubelet/dockershim/docker_container.go
View file @
13b23c51
...
@@ -103,7 +103,6 @@ func (ds *dockerService) CreateContainer(podSandboxID string, config *runtimeApi
...
@@ -103,7 +103,6 @@ func (ds *dockerService) CreateContainer(podSandboxID string, config *runtimeApi
Name
:
makeContainerName
(
sandboxConfig
,
config
),
Name
:
makeContainerName
(
sandboxConfig
,
config
),
Config
:
&
dockercontainer
.
Config
{
Config
:
&
dockercontainer
.
Config
{
// TODO: set User.
// TODO: set User.
Hostname
:
sandboxConfig
.
GetHostname
(),
Entrypoint
:
dockerstrslice
.
StrSlice
(
config
.
GetCommand
()),
Entrypoint
:
dockerstrslice
.
StrSlice
(
config
.
GetCommand
()),
Cmd
:
dockerstrslice
.
StrSlice
(
config
.
GetArgs
()),
Cmd
:
dockerstrslice
.
StrSlice
(
config
.
GetArgs
()),
Env
:
generateEnvList
(
config
.
GetEnvs
()),
Env
:
generateEnvList
(
config
.
GetEnvs
()),
...
...
pkg/kubelet/dockershim/docker_service.go
View file @
13b23c51
...
@@ -80,10 +80,13 @@ func (ds *dockerService) Version(apiVersion string) (*runtimeApi.VersionResponse
...
@@ -80,10 +80,13 @@ func (ds *dockerService) Version(apiVersion string) (*runtimeApi.VersionResponse
}
}
runtimeAPIVersion
:=
kubeAPIVersion
runtimeAPIVersion
:=
kubeAPIVersion
name
:=
dockerRuntimeName
name
:=
dockerRuntimeName
// Docker API version (e.g., 1.23) is not semver compatible. Add a ".0"
// suffix to remedy this.
apiVersion
:=
fmt
.
Sprintf
(
"%s.0"
,
v
.
APIVersion
)
return
&
runtimeApi
.
VersionResponse
{
return
&
runtimeApi
.
VersionResponse
{
Version
:
&
runtimeAPIVersion
,
Version
:
&
runtimeAPIVersion
,
RuntimeName
:
&
name
,
RuntimeName
:
&
name
,
RuntimeVersion
:
&
v
.
Version
,
RuntimeVersion
:
&
v
.
Version
,
RuntimeApiVersion
:
&
v
.
API
Version
,
RuntimeApiVersion
:
&
api
Version
,
},
nil
},
nil
}
}
pkg/kubelet/dockershim/helpers.go
View file @
13b23c51
...
@@ -161,15 +161,15 @@ func getNetworkNamespace(c *dockertypes.ContainerJSON) string {
...
@@ -161,15 +161,15 @@ func getNetworkNamespace(c *dockertypes.ContainerJSON) string {
// dockerFilter wraps around dockerfilters.Args and provides methods to modify
// dockerFilter wraps around dockerfilters.Args and provides methods to modify
// the filter easily.
// the filter easily.
type
dockerFilter
struct
{
type
dockerFilter
struct
{
f
*
dockerfilters
.
Args
args
*
dockerfilters
.
Args
}
}
func
newDockerFilter
(
args
*
dockerfilters
.
Args
)
*
dockerFilter
{
func
newDockerFilter
(
args
*
dockerfilters
.
Args
)
*
dockerFilter
{
return
&
dockerFilter
{
f
:
args
}
return
&
dockerFilter
{
args
:
args
}
}
}
func
(
f
*
dockerFilter
)
Add
(
key
,
value
string
)
{
func
(
f
*
dockerFilter
)
Add
(
key
,
value
string
)
{
f
.
Add
(
key
,
value
)
f
.
args
.
Add
(
key
,
value
)
}
}
func
(
f
*
dockerFilter
)
AddLabel
(
key
,
value
string
)
{
func
(
f
*
dockerFilter
)
AddLabel
(
key
,
value
string
)
{
...
...
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