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
57a6319f
Commit
57a6319f
authored
Jul 14, 2020
by
Brian Downs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add protect-kernel-defaults to kubelet
Signed-off-by:
Brian Downs
<
brian.downs@gmail.com
>
parent
66a8c2ad
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
agent.go
pkg/cli/agent/agent.go
+1
-0
agent.go
pkg/cli/cmds/agent.go
+7
-0
No files found.
pkg/cli/agent/agent.go
View file @
57a6319f
...
@@ -56,6 +56,7 @@ func Run(ctx *cli.Context) error {
...
@@ -56,6 +56,7 @@ func Run(ctx *cli.Context) error {
cfg
:=
cmds
.
AgentConfig
cfg
:=
cmds
.
AgentConfig
cfg
.
Debug
=
ctx
.
Bool
(
"debug"
)
cfg
.
Debug
=
ctx
.
Bool
(
"debug"
)
cfg
.
DataDir
=
dataDir
cfg
.
DataDir
=
dataDir
cfg
.
ProtectKernelDefaults
=
true
contextCtx
:=
signals
.
SetupSignalHandler
(
context
.
Background
())
contextCtx
:=
signals
.
SetupSignalHandler
(
context
.
Background
())
...
...
pkg/cli/cmds/agent.go
View file @
57a6319f
...
@@ -36,6 +36,7 @@ type Agent struct {
...
@@ -36,6 +36,7 @@ type Agent struct {
Labels
[]
string
Labels
[]
string
Taints
[]
string
Taints
[]
string
PrivateRegistry
string
PrivateRegistry
string
ProtectKernelDefaults
bool
AgentShared
AgentShared
}
}
...
@@ -136,6 +137,11 @@ var (
...
@@ -136,6 +137,11 @@ var (
Hidden
:
true
,
Hidden
:
true
,
Destination
:
&
AgentConfig
.
DisableSELinux
,
Destination
:
&
AgentConfig
.
DisableSELinux
,
}
}
ProtectKernelDefaultsFlag
=
cli
.
BoolFlag
{
Name
:
"protect-kernel-defaults"
,
Usage
:
"(agent/node) "
,
Destination
:
&
AgentConfig
.
ProtectKernelDefaults
,
}
)
)
func
NewAgentCommand
(
action
func
(
ctx
*
cli
.
Context
)
error
)
*
cli
.
Command
{
func
NewAgentCommand
(
action
func
(
ctx
*
cli
.
Context
)
error
)
*
cli
.
Command
{
...
@@ -192,6 +198,7 @@ func NewAgentCommand(action func(ctx *cli.Context) error) *cli.Command {
...
@@ -192,6 +198,7 @@ func NewAgentCommand(action func(ctx *cli.Context) error) *cli.Command {
&
FlannelConfFlag
,
&
FlannelConfFlag
,
&
ExtraKubeletArgs
,
&
ExtraKubeletArgs
,
&
ExtraKubeProxyArgs
,
&
ExtraKubeProxyArgs
,
&
ProtectKernelDefaultsFlag
,
&
cli
.
BoolFlag
{
&
cli
.
BoolFlag
{
Name
:
"rootless"
,
Name
:
"rootless"
,
Usage
:
"(experimental) Run rootless"
,
Usage
:
"(experimental) Run rootless"
,
...
...
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