Skip to content

Commit

Permalink
Re-enable cilium when upgrading (canonical#625)
Browse files Browse the repository at this point in the history
  • Loading branch information
ktsakalozos authored and ianbibby committed Jan 10, 2020
1 parent 38b975d commit 630329a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion microk8s-resources/actions/enable.cilium.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ else
sudo cp "$SNAP_DATA/tmp/cilium/$CILIUM_DIR/install/kubernetes/cilium.yaml" "$SNAP_DATA/actions/cilium.yaml"
sudo sed -i 's;path: \(/var/run/cilium\);path: '"$SNAP_DATA"'\1;g' "$SNAP_DATA/actions/cilium.yaml"

microk8s.status --wait-ready >/dev/null
${SNAP}/microk8s-status.wrapper --wait-ready >/dev/null
echo "Deploying $SNAP_DATA/actions/cilium.yaml. This may take several minutes."
"$SNAP/kubectl" "--kubeconfig=$SNAP_DATA/credentials/client.config" apply -f "$SNAP_DATA/actions/cilium.yaml"
"$SNAP/kubectl" "--kubeconfig=$SNAP_DATA/credentials/client.config" -n $NAMESPACE rollout status ds/cilium
Expand Down
6 changes: 6 additions & 0 deletions snap/hooks/configure
Original file line number Diff line number Diff line change
Expand Up @@ -302,3 +302,9 @@ then
systemctl restart snap.${SNAP_NAME}.daemon-apiserver
fi

if [ -L "${SNAP_DATA}/bin/cilium" ]
then
echo "Cilium is enabled we need to reconfigure it."
sudo rm -rf $SNAP_DATA/bin/cilium*
${SNAP}/microk8s-enable.wrapper cilium
fi

0 comments on commit 630329a

Please sign in to comment.