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
42f61795
Commit
42f61795
authored
Nov 01, 2016
by
Dr. Stefan Schimanski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dockershim: only set sysctl in infra container
parent
cc84673e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
7 deletions
+1
-7
docker_container.go
pkg/kubelet/dockershim/docker_container.go
+1
-7
No files found.
pkg/kubelet/dockershim/docker_container.go
View file @
42f61795
...
@@ -125,13 +125,6 @@ func (ds *dockerService) CreateContainer(podSandboxID string, config *runtimeApi
...
@@ -125,13 +125,6 @@ func (ds *dockerService) CreateContainer(podSandboxID string, config *runtimeApi
Privileged
:
config
.
GetPrivileged
(),
Privileged
:
config
.
GetPrivileged
(),
}
}
// Set sysctls if requested
sysctls
,
err
:=
getSysctlsFromAnnotations
(
config
.
Annotations
)
if
err
!=
nil
{
return
""
,
fmt
.
Errorf
(
"failed to get sysctls from annotations %v for container %q: %v"
,
config
.
Annotations
,
config
.
Metadata
.
GetName
(),
err
)
}
hc
.
Sysctls
=
sysctls
// Apply options derived from the sandbox config.
// Apply options derived from the sandbox config.
if
lc
:=
sandboxConfig
.
GetLinux
();
lc
!=
nil
{
if
lc
:=
sandboxConfig
.
GetLinux
();
lc
!=
nil
{
// Apply Cgroup options.
// Apply Cgroup options.
...
@@ -176,6 +169,7 @@ func (ds *dockerService) CreateContainer(podSandboxID string, config *runtimeApi
...
@@ -176,6 +169,7 @@ func (ds *dockerService) CreateContainer(podSandboxID string, config *runtimeApi
// Note: ShmSize is handled in kube_docker_client.go
// Note: ShmSize is handled in kube_docker_client.go
}
}
var
err
error
hc
.
SecurityOpt
,
err
=
getContainerSecurityOpts
(
config
.
Metadata
.
GetName
(),
sandboxConfig
,
ds
.
seccompProfileRoot
)
hc
.
SecurityOpt
,
err
=
getContainerSecurityOpts
(
config
.
Metadata
.
GetName
(),
sandboxConfig
,
ds
.
seccompProfileRoot
)
if
err
!=
nil
{
if
err
!=
nil
{
return
""
,
fmt
.
Errorf
(
"failed to generate container security options for container %q: %v"
,
config
.
Metadata
.
GetName
(),
err
)
return
""
,
fmt
.
Errorf
(
"failed to generate container security options for container %q: %v"
,
config
.
Metadata
.
GetName
(),
err
)
...
...
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