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
3f2a9515
Commit
3f2a9515
authored
Jan 25, 2019
by
Darren Shepherd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ensure that br_netfilter module is loaded
parent
ce93f17e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
0 deletions
+4
-0
README.md
README.md
+1
-0
k3s.service
k3s.service
+1
-0
setup.go
pkg/agent/syssetup/setup.go
+2
-0
No files found.
README.md
View file @
3f2a9515
...
@@ -199,6 +199,7 @@ Documentation=https://k3s.io
...
@@ -199,6 +199,7 @@ Documentation=https://k3s.io
After
=
network.target
After
=
network.target
[Service]
[Service]
ExecStartPre
=
-/sbin/modprobe br_netfilter
ExecStartPre
=
-/sbin/modprobe overlay
ExecStartPre
=
-/sbin/modprobe overlay
ExecStart
=
/usr/local/bin/k3s server
ExecStart
=
/usr/local/bin/k3s server
KillMode
=
process
KillMode
=
process
...
...
k3s.service
View file @
3f2a9515
...
@@ -4,6 +4,7 @@ Documentation=https://k3s.io
...
@@ -4,6 +4,7 @@ Documentation=https://k3s.io
After=network.target
After=network.target
[Service]
[Service]
ExecStartPre=-/sbin/modprobe br_netfilter
ExecStartPre=-/sbin/modprobe overlay
ExecStartPre=-/sbin/modprobe overlay
ExecStart=/usr/local/bin/k3s server
ExecStart=/usr/local/bin/k3s server
KillMode=process
KillMode=process
...
...
pkg/agent/syssetup/setup.go
View file @
3f2a9515
...
@@ -2,6 +2,7 @@ package syssetup
...
@@ -2,6 +2,7 @@ package syssetup
import
(
import
(
"io/ioutil"
"io/ioutil"
"os/exec"
"github.com/sirupsen/logrus"
"github.com/sirupsen/logrus"
)
)
...
@@ -11,6 +12,7 @@ var (
...
@@ -11,6 +12,7 @@ var (
)
)
func
Configure
()
error
{
func
Configure
()
error
{
exec
.
Command
(
"modprobe"
,
"br_netfilter"
)
.
Run
()
if
err
:=
ioutil
.
WriteFile
(
callIPTablesFile
,
[]
byte
(
"1"
),
0640
);
err
!=
nil
{
if
err
:=
ioutil
.
WriteFile
(
callIPTablesFile
,
[]
byte
(
"1"
),
0640
);
err
!=
nil
{
logrus
.
Warnf
(
"failed to write value 1 at %s: %v"
,
callIPTablesFile
,
err
)
logrus
.
Warnf
(
"failed to write value 1 at %s: %v"
,
callIPTablesFile
,
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