Skip to content

Commit

Permalink
Add offline cache for kubelet
Browse files Browse the repository at this point in the history
Pull in an updated version of kubelet which has a local cache which
lets it start pods when offline.
  • Loading branch information
c1728p9 committed May 26, 2020
1 parent 6d7d02f commit b6989dc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions files/edge-core/scripts/edge-core-factory-reset
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ rm -f /var/log/syslog*

rm -rf ${SNAP_DATA}/userdata/edge_gw_identity
snap stop pelion-edge.kubelet || true
rm -rf ${SNAP_COMMON}/var/lib/kubelet

# Stop and remove all existing docker containers and images
docker stop $(docker ps -a -q) || true
Expand Down
1 change: 1 addition & 0 deletions files/kubelet/scripts/launch-kubelet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ fi

exec ${SNAP}/wigwag/system/bin/kubelet \
--root-dir=${SNAP_COMMON}/var/lib/kubelet \
--offline-cache-path=${SNAP_COMMON}/var/lib/kubelet/store \
--fail-swap-on=false \
--image-pull-progress-deadline=2m \
--hostname-override=${DEVICE_ID} \
Expand Down
4 changes: 2 additions & 2 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ parts:
kubelet:
plugin: go
source: [email protected]:armPelionEdge/argus.git
source-commit: e79ebdac2263e481bb739770d683877f12522c2d
source-commit: f3dab5a4f903c2dd165be7d530d4853ad1e9e8cc
go-importpath: k8s.io/kubernetes
override-pull: |
# The go plugin also tries to run go get to fetch project dependencies. We just want to use the vendored depdnencies.
Expand All @@ -575,7 +575,7 @@ parts:
cd go/src/k8s.io
git clone [email protected]:armPelionEdge/argus.git kubernetes
cd kubernetes
git checkout e79ebdac2263e481bb739770d683877f12522c2d
git checkout f3dab5a4f903c2dd165be7d530d4853ad1e9e8cc
override-build: |
export GOPATH=${SNAPCRAFT_PART_SRC}/go
cd ${GOPATH}/src/k8s.io/kubernetes/hack/make-rules
Expand Down

0 comments on commit b6989dc

Please sign in to comment.