Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mount /etc under a different path for weave-kube #2708

Merged
merged 1 commit into from Jan 4, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 10 additions & 8 deletions prog/weave-kube/launch.sh
Expand Up @@ -6,6 +6,7 @@ set -e
IPALLOC_RANGE=${IPALLOC_RANGE:-10.32.0.0/12}
HTTP_ADDR=${WEAVE_HTTP_ADDR:-127.0.0.1:6784}
STATUS_ADDR=${WEAVE_STATUS_ADDR:-0.0.0.0:6782}
HOST_ROOT=${HOST_ROOT:-/host}

# Check if the IP range overlaps anything existing on the host
/usr/bin/weaveutil netcheck $IPALLOC_RANGE weave
Expand Down Expand Up @@ -102,15 +103,16 @@ done

# Install CNI plugin binary to typical CNI bin location
# with fall-back to CNI directory used by kube-up on GCI OS
if mkdir -p /opt/cni/bin ; then
export WEAVE_CNI_PLUGIN_DIR=/opt/cni/bin
elif mkdir -p /host_home/kubernetes/bin ; then
export WEAVE_CNI_PLUGIN_DIR=/host_home/kubernetes/bin
else
echo "Failed to install the Weave CNI plugin" >&2
exit 1
if ! mkdir -p $HOST_ROOT/opt/cni/bin ; then
if mkdir -p $HOST_ROOT/home/kubernetes/bin ; then
export WEAVE_CNI_PLUGIN_DIR=$HOST_ROOT/home/kubernetes/bin
else
echo "Failed to install the Weave CNI plugin" >&2
exit 1
fi
fi
mkdir -p /etc/cni/net.d
mkdir -p $HOST_ROOT/etc/cni/net.d
export HOST_ROOT
/home/weave/weave --local setup-cni

# Expose the weave network so host processes can communicate with pods
Expand Down
6 changes: 3 additions & 3 deletions prog/weave-kube/weave-daemonset.yaml
Expand Up @@ -39,11 +39,11 @@ spec:
- name: weavedb
mountPath: /weavedb
- name: cni-bin
mountPath: /opt
mountPath: /host/opt
- name: cni-bin2
mountPath: /host_home
mountPath: /host/home
- name: cni-conf
mountPath: /etc
mountPath: /host/etc
resources:
requests:
cpu: 10m
Expand Down