Skip to content

Commit 6adcc28

Browse files
committed
[FLINK-39102][e2e] Fix Kubernetes E2E tests broken by Docker 29 runner update (#27619)
* [FLINK-39102][tests] Upgrade minikube, crictl, and cri-dockerd for Ubuntu 24.04 compatibility * [FLINK-39102][tests] Add CNI plugins to provide required pod networking layer * [FLINK-39102][tests] Run minikube stop with sudo to match minikube start (cherry picked from commit 579d803)
1 parent 526aaeb commit 6adcc28

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

flink-end-to-end-tests/test-scripts/common_kubernetes.sh

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,10 @@ CONTAINER_SCRIPTS=${END_TO_END_DIR}/test-scripts/container-scripts
2424
RETRY_COUNT=3
2525
RETRY_BACKOFF_TIME=5
2626
RESULT_HASH="d41d8cd98f00b204e9800998ecf8427e"
27-
MINIKUBE_VERSION="v1.28.0"
28-
CRICTL_VERSION="v1.24.2"
29-
CRI_DOCKERD_VERSION="0.2.3"
27+
MINIKUBE_VERSION="v1.38.0"
28+
CRICTL_VERSION="v1.35.0"
29+
CRI_DOCKERD_VERSION="0.3.24"
30+
CNI_PLUGINS_VERSION="v1.6.2"
3031

3132
NON_LINUX_ENV_NOTE="****** Please start/stop minikube manually in non-linux environment. ******"
3233

@@ -60,6 +61,12 @@ function setup_kubernetes_for_linux {
6061

6162
# conntrack is required for minikube 1.9 and later
6263
sudo apt-get install conntrack
64+
# CNI plugins are required for minikube with the none driver and Kubernetes v1.24+
65+
local cni_archive="cni-plugins-linux-${arch}-${CNI_PLUGINS_VERSION}.tgz"
66+
retry_download "https://github.com/containernetworking/plugins/releases/download/${CNI_PLUGINS_VERSION}/${cni_archive}"
67+
sudo mkdir -p /opt/cni/bin
68+
sudo tar zxvf ${cni_archive} -C /opt/cni/bin
69+
rm -f ${cni_archive}
6370
# crictl is required for cri-dockerd
6471
local crictl_archive
6572
crictl_archive="crictl-$CRICTL_VERSION-linux-${arch}.tar.gz"
@@ -170,7 +177,7 @@ function stop_kubernetes {
170177
kill $minikube_mount_pid 2> /dev/null
171178
else
172179
echo "Stopping minikube ..."
173-
stop_command="minikube stop"
180+
stop_command="sudo -E minikube stop"
174181
if ! retry_times ${RETRY_COUNT} ${RETRY_BACKOFF_TIME} "${stop_command}"; then
175182
echo "Could not stop minikube. Aborting..."
176183
exit 1

0 commit comments

Comments
 (0)