From be9e2ce93f36d3333fb43f6be5dafdb0a5c93fe8 Mon Sep 17 00:00:00 2001 From: vankichi Date: Fri, 29 Nov 2024 18:01:24 +0900 Subject: [PATCH] :green_heart: Use QEMU on e2e with minikube Signed-off-by: vankichi --- .github/actions/setup-e2e/action.yaml | 14 ++++++++++++++ Makefile | 2 ++ Makefile.d/minikube.mk | 2 +- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/actions/setup-e2e/action.yaml b/.github/actions/setup-e2e/action.yaml index 6cf17458096..dbe558d6ab4 100644 --- a/.github/actions/setup-e2e/action.yaml +++ b/.github/actions/setup-e2e/action.yaml @@ -89,6 +89,20 @@ runs: if: ${{ inputs.require_minikube == 'true' }} shell: bash run: | + # TODO: consider use apt install for ci + # Add Docker's official GPG key: + sudo apt-get update + sudo apt-get install ca-certificates curl + sudo install -m 0755 -d /etc/apt/keyrings + sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc + sudo chmod a+r /etc/apt/keyrings/docker.asc + # Add the repository to Apt sources: + echo \ + "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \ + $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \ + sudo tee /etc/apt/sources.list.d/docker.list > /dev/null + sudo apt-get update + sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin make minikube/install make minikube/start - name: Check Kubernetes cluster diff --git a/Makefile b/Makefile index de1572c19e8..a7374025272 100644 --- a/Makefile +++ b/Makefile @@ -373,6 +373,8 @@ E2E_REMOVE_FROM ?= 0 TEST_RESULT_DIR ?= /tmp +MINIKUBE_DRIVER = none + include Makefile.d/functions.mk .PHONY: maintainer diff --git a/Makefile.d/minikube.mk b/Makefile.d/minikube.mk index e668e026305..f557c2c7d12 100644 --- a/Makefile.d/minikube.mk +++ b/Makefile.d/minikube.mk @@ -25,7 +25,7 @@ $(BINDIR)/minikube: # Only use this for development related to Volume Snapshots. Usually k3d is faster. .PHONY: minikube/start minikube/start: - minikube start --force + minikube start --force --driver=$(MINIKUBE_DRIVER) minikube addons enable volumesnapshots minikube addons enable csi-hostpath-driver minikube addons disable storage-provisioner