Skip to content

Commit

Permalink
update for sealos-v5
Browse files Browse the repository at this point in the history
  • Loading branch information
muicoder committed Jan 2, 2024
1 parent 1f252a6 commit 6597527
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion .github/scripts/kubernetes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,28 @@ sudo cp -au "$MOUNT_CRI"/cri/lsof opt/
sudo cp -au "$MOUNT_CRI"/cri/{registry,libseccomp.tar.gz} cri/
case $CRI_TYPE in
containerd)
if [[ "${SEALOS_XYZ%%.*}" -ge 5 ]] && ! [[ "${KUBE_XY//./}" -ge 124 ]]; then
echo "INFO::skip $KUBE(kube<1.24) when $SEALOS(sealos>=5)"
exit
fi
IMAGE_KUBE=kubernetes
sudo cp -au "$MOUNT_CRI"/cri/cri-containerd.tar.gz cri/
;;
cri-o)
if [[ "${SEALOS_XYZ%%.*}" -ge 5 ]] && ! [[ "${KUBE_XY//./}" -ge 126 ]]; then
echo "INFO::skip $KUBE(kube<1.26) when $SEALOS(sealos>=5)"
exit
fi
IMAGE_KUBE=kubernetes-${CRI_TYPE//-/}
sudo cp -au "$MOUNT_CRIO"/cri/cri-o.tar.gz cri/
sudo cp -au "$MOUNT_CRIO"/cri/{install.crio,crio.files} cri/
sudo tar -xzf "$MOUNT_CRI"/cri/cri-containerd.tar.gz usr/bin/runc --strip-components=2 -C bin/
;;
docker)
if [[ "${SEALOS_XYZ%%.*}" -ge 5 ]] && ! [[ "${KUBE_XY//./}" -ge 126 ]]; then
echo "INFO::skip $KUBE(kube<1.26) when $SEALOS(sealos>=5)"
exit
fi
IMAGE_KUBE=kubernetes-$CRI_TYPE
if [[ "${KUBE_XY//./}" -ge 126 ]]; then
sudo cp -au "$MOUNT_CRI"/cri/cri-dockerd.tgz cri/
Expand Down Expand Up @@ -193,7 +206,7 @@ if [[ amd64 == "$ARCH" ]]; then
sudo systemctl unmask "${CRI_TYPE//-/}" || true
sudo mkdir -p /sys/fs/cgroup/systemd
sudo mount -t cgroup -o none,name=systemd cgroup /sys/fs/cgroup/systemd || true
if ! sudo sealos run "$IMAGE_BUILD" labring/flannel:0.22.2 --single; then
if ! sudo sealos run "$IMAGE_BUILD" labring/flannel:0.24.0; then
if grep k3s <<<"$KUBE"; then
export SEALOS_RUN="skipped::k3s"
else
Expand Down

0 comments on commit 6597527

Please sign in to comment.