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
5a81fdbd
Commit
5a81fdbd
authored
Jul 20, 2020
by
Brian Downs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update cis flag implementation to propogate the rest of the way through to kubelet
Signed-off-by:
Brian Downs
<
brian.downs@gmail.com
>
parent
6d59b814
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
7 additions
and
1 deletion
+7
-1
config.go
pkg/agent/config/config.go
+1
-0
agent.go
pkg/cli/agent/agent.go
+0
-1
server.go
pkg/cli/cmds/server.go
+1
-0
agent.go
pkg/daemons/agent/agent.go
+4
-0
types.go
pkg/daemons/config/types.go
+1
-0
No files found.
pkg/agent/config/config.go
View file @
5a81fdbd
...
...
@@ -485,6 +485,7 @@ func get(envInfo *cmds.Agent, proxy proxy.Proxy) (*config.Node, error) {
nodeConfig
.
AgentConfig
.
Rootless
=
envInfo
.
Rootless
nodeConfig
.
AgentConfig
.
PodManifests
=
filepath
.
Join
(
envInfo
.
DataDir
,
DefaultPodManifestPath
)
nodeConfig
.
DisableSELinux
=
envInfo
.
DisableSELinux
nodeConfig
.
AgentConfig
.
ProtectKernelDefaults
=
envInfo
.
ProtectKernelDefaults
return
nodeConfig
,
nil
}
...
...
pkg/cli/agent/agent.go
View file @
5a81fdbd
...
...
@@ -56,7 +56,6 @@ func Run(ctx *cli.Context) error {
cfg
:=
cmds
.
AgentConfig
cfg
.
Debug
=
ctx
.
Bool
(
"debug"
)
cfg
.
DataDir
=
dataDir
cfg
.
ProtectKernelDefaults
=
true
contextCtx
:=
signals
.
SetupSignalHandler
(
context
.
Background
())
...
...
pkg/cli/cmds/server.go
View file @
5a81fdbd
...
...
@@ -247,6 +247,7 @@ func NewServerCommand(action func(*cli.Context) error) *cli.Command {
&
FlannelConfFlag
,
&
ExtraKubeletArgs
,
&
ExtraKubeProxyArgs
,
&
ProtectKernelDefaultsFlag
,
&
cli
.
BoolFlag
{
Name
:
"rootless"
,
Usage
:
"(experimental) Run rootless"
,
...
...
pkg/daemons/agent/agent.go
View file @
5a81fdbd
...
...
@@ -155,6 +155,10 @@ func startKubelet(cfg *config.Agent) error {
argsMap
[
"enforce-node-allocatable"
]
=
""
}
if
cfg
.
ProtectKernelDefaults
{
argsMap
[
"protect-kernel-defaults"
]
=
"true"
}
args
:=
config
.
GetArgsList
(
argsMap
,
cfg
.
ExtraKubeletArgs
)
logrus
.
Infof
(
"Running kubelet %s"
,
config
.
ArgString
(
args
))
...
...
pkg/daemons/config/types.go
View file @
5a81fdbd
...
...
@@ -83,6 +83,7 @@ type Agent struct {
DisableNPC
bool
DisableKubeProxy
bool
Rootless
bool
ProtectKernelDefaults
bool
}
type
Control
struct
{
...
...
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