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
191ac937
Commit
191ac937
authored
Apr 30, 2019
by
galal-hussein
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add cni plugin to kubelet if docker is used
parent
0726ce75
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
0 deletions
+5
-0
run.go
pkg/agent/run.go
+1
-0
agent.go
pkg/daemons/agent/agent.go
+3
-0
types.go
pkg/daemons/config/types.go
+1
-0
No files found.
pkg/agent/run.go
View file @
191ac937
...
@@ -33,6 +33,7 @@ func run(ctx context.Context, cfg cmds.Agent) error {
...
@@ -33,6 +33,7 @@ func run(ctx context.Context, cfg cmds.Agent) error {
if
nodeConfig
.
Docker
||
nodeConfig
.
ContainerRuntimeEndpoint
!=
""
{
if
nodeConfig
.
Docker
||
nodeConfig
.
ContainerRuntimeEndpoint
!=
""
{
nodeConfig
.
AgentConfig
.
RuntimeSocket
=
nodeConfig
.
ContainerRuntimeEndpoint
nodeConfig
.
AgentConfig
.
RuntimeSocket
=
nodeConfig
.
ContainerRuntimeEndpoint
nodeConfig
.
AgentConfig
.
CNIPlugin
=
true
}
else
{
}
else
{
if
err
:=
containerd
.
Run
(
ctx
,
nodeConfig
);
err
!=
nil
{
if
err
:=
containerd
.
Run
(
ctx
,
nodeConfig
);
err
!=
nil
{
return
err
return
err
...
...
pkg/daemons/agent/agent.go
View file @
191ac937
...
@@ -78,6 +78,9 @@ func kubelet(cfg *config.Agent) {
...
@@ -78,6 +78,9 @@ func kubelet(cfg *config.Agent) {
if
cfg
.
CNIBinDir
!=
""
{
if
cfg
.
CNIBinDir
!=
""
{
argsMap
[
"cni-bin-dir"
]
=
cfg
.
CNIBinDir
argsMap
[
"cni-bin-dir"
]
=
cfg
.
CNIBinDir
}
}
if
cfg
.
CNIPlugin
{
argsMap
[
"network-plugin"
]
=
"cni"
}
if
len
(
cfg
.
ClusterDNS
)
>
0
{
if
len
(
cfg
.
ClusterDNS
)
>
0
{
argsMap
[
"cluster-dns"
]
=
cfg
.
ClusterDNS
.
String
()
argsMap
[
"cluster-dns"
]
=
cfg
.
ClusterDNS
.
String
()
}
}
...
...
pkg/daemons/config/types.go
View file @
191ac937
...
@@ -53,6 +53,7 @@ type Agent struct {
...
@@ -53,6 +53,7 @@ type Agent struct {
CNIConfDir
string
CNIConfDir
string
ExtraKubeletArgs
[]
string
ExtraKubeletArgs
[]
string
ExtraKubeProxyArgs
[]
string
ExtraKubeProxyArgs
[]
string
CNIPlugin
bool
}
}
type
Control
struct
{
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