Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use actions to install kwokctl #596

Merged
merged 1 commit into from
Jun 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.5.2

- name: Run e2e test
run: ./test/test.sh

Expand Down
14 changes: 4 additions & 10 deletions test/helper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand All @@ -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 - <<EOF
Expand Down
Loading