diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 58461b138..9fd4dc182 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -76,6 +76,13 @@ jobs: with: # https://github.com/actions/checkout#fetch-all-history-for-all-tags-and-branches fetch-depth: 0 + + - name: Set up kwokctl + uses: kubernetes-sigs/kwok@main + with: + command: kwokctl + kwok-version: v0.4.0 + - name: Run e2e test run: ./test/test.sh diff --git a/test/helper.sh b/test/helper.sh index 24895e70e..579002bff 100755 --- a/test/helper.sh +++ b/test/helper.sh @@ -109,15 +109,6 @@ function host_docker_internal() { TMPDIR="${TMPDIR:-/tmp/}" -# Install kwokctl tools -function install_kwokctl() { - if cmd_exist kwokctl; then - return 0 - fi - wget "https://github.com/kubernetes-sigs/kwok/releases/download/v0.4.0/kwokctl-$(go env GOOS)-$(go env GOARCH)" -O "/usr/local/bin/kwokctl" && - chmod +x "/usr/local/bin/kwokctl" -} - # create a control plane cluster and install the Clusterpedia function create_control_plane() { local name="${1}" @@ -139,7 +130,10 @@ function create_data_plane() { local kubeconfig local ip - install_kwokctl + if ! cmd_exist kwokctl; then + echo "Please install kwokctl first, see https://kwok.sigs.k8s.io/docs/user/installation/" + return 1 + fi ip="$(host_docker_internal)" kwokctl create cluster --name "${name}" --wait 120s --kubeconfig "" --config - <