mirror of
https://github.com/k3s-io/k3s.git
synced 2024-06-07 19:41:36 +00:00
Ensure that br_netfilter module is loaded
This commit is contained in:
parent
ce93f17e28
commit
3f2a951564
@ -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
|
||||||
|
@ -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
|
||||||
|
@ -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 (
|
|||||||
)
|
)
|
||||||
|
|
||||||
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)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user