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

move install-cni.sh to an initContainer #251

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 22 additions & 6 deletions doc/crds/daemonset-install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,30 @@ spec:
tolerations:
- operator: Exists
effect: NoSchedule
initContainers:
- name: install-cin-bin
command: [ "/install-bin.sh" ]
image: ghcr.io/k8snetworkplumbingwg/whereabouts:latest-amd64
env:
- name: WHEREABOUTS_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
resources:
requests:
cpu: "100m"
memory: "50Mi"
limits:
cpu: "100m"
memory: "50Mi"
securityContext:
privileged: true
volumeMounts:
- name: cnibin
mountPath: /host/opt/cni/bin
containers:
- name: whereabouts
command: [ "/bin/sh" ]
args:
- -c
- >
SLEEP=false /install-cni.sh &&
/ip-control-loop -log-level debug
command: [ "/ip-control-loop -log-level debug" ]
image: ghcr.io/k8snetworkplumbingwg/whereabouts:latest-amd64
env:
- name: WHEREABOUTS_NAMESPACE
Expand Down
8 changes: 0 additions & 8 deletions script/install-cni.sh
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,3 @@ fi
cp -f /whereabouts $CNI_BIN_DIR

# ---------------------- end Generate a "kube-config".

# Unless told otherwise, sleep forever.
# This prevents Kubernetes from restarting the pod repeatedly.
should_sleep=${SLEEP:-"true"}
echo "Done configuring CNI. Sleep=$should_sleep"
while [ "$should_sleep" == "true" ]; do
sleep 1000000000000
done