diff --git a/.github/scripts/kubernetes.sh b/.github/scripts/kubernetes.sh index 6cd2151..f6ba024 100755 --- a/.github/scripts/kubernetes.sh +++ b/.github/scripts/kubernetes.sh @@ -50,6 +50,11 @@ if [[ "${KUBE_XY//./}" -ge 126 ]] && [[ "${SEALOS_XYZ//./}" -le 413 ]] && [[ -z echo https://kubernetes.io/blog/2022/11/18/upcoming-changes-in-kubernetes-1-26/#cri-api-removal exit fi +# Check support for kube-v1.22+ with sealos v5+ +if [[ "${KUBE_XY//./}" -lt 122 ]] && [[ "${SEALOS_XYZ%%.*}" -le 5 ]]; then + echo "INFO::skip $KUBE(kube<1.22) when $SEALOS(sealos>=5)" + exit +fi # image-cri-shim sealctl if [[ -n "$sealosPatch" ]]; then @@ -84,6 +89,7 @@ cri-o) 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) IMAGE_KUBE=kubernetes-$CRI_TYPE