Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Commit

Permalink
Ensure we have the br_netfilter modules loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
bboreham committed Feb 27, 2017
1 parent 7a3e8e6 commit b87463b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions prog/weave-kube/launch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ CONN_LIMIT=${CONN_LIMIT:-30}
# Default for network policy
EXPECT_NPC=${EXPECT_NPC:-1}

# Ensure we have the required modules for NPC
if [ "${EXPECT_NPC}" != "0" ]; then
modprobe --dirname /host br_netfilter
modprobe --dirname /host xt_set
fi

# kube-proxy requires that bridged traffic passes through netfilter
if ! BRIDGE_NF_ENABLED=$(cat /proc/sys/net/bridge/bridge-nf-call-iptables); then
echo "Cannot detect bridge-nf support - network policy and iptables mode kubeproxy may not work reliably" >&2
Expand Down
5 changes: 5 additions & 0 deletions prog/weave-kube/weave-daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ spec:
mountPath: /host/etc
- name: dbus
mountPath: /host/var/lib/dbus
- name: lib-modules
mountPath: /host/lib/modules
resources:
requests:
cpu: 10m
Expand Down Expand Up @@ -73,3 +75,6 @@ spec:
- name: dbus
hostPath:
path: /var/lib/dbus
- name: lib-modules
hostPath:
path: /lib/modules

0 comments on commit b87463b

Please sign in to comment.