From bc9f270e965a656c8ba92ec1cabfa1e786a8b9a7 Mon Sep 17 00:00:00 2001 From: Ramkumar Chinchani <45800463+rchincha@users.noreply.github.com> Date: Mon, 12 Jan 2026 10:14:23 -0800 Subject: [PATCH] ci: fix nightly due to outdated kind (#3676) ci: update kind version Signed-off-by: Ramkumar Chinchani --- .github/workflows/nightly.yaml | 5 ++++- Makefile | 12 ++++++++++-- examples/kind/kind-ci.sh | 15 +++++++++++++-- 3 files changed, 27 insertions(+), 5 deletions(-) diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml index f31e3844..a129990a 100644 --- a/.github/workflows/nightly.yaml +++ b/.github/workflows/nightly.yaml @@ -170,7 +170,7 @@ jobs: kind-setup: name: Prometheus setup - runs-on: oracle-vm-8cpu-32gb-x86-64 + runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - uses: actions/setup-go@v6 @@ -179,6 +179,7 @@ jobs: - name: Install dependencies run: | cd $GITHUB_WORKSPACE + make check-blackbox-prerequisites go mod download sudo apt-get update sudo apt-get install libgpgme-dev libassuan-dev libbtrfs-dev libdevmapper-dev pkg-config rpm uidmap @@ -194,6 +195,8 @@ jobs: registry: ghcr.io username: ${{ github.actor }} password: ${{ github.token }} + - name: Free up disk space + uses: jlumbroso/free-disk-space@main - name: Run tests run: | sudo ./scripts/enable_userns.sh diff --git a/Makefile b/Makefile index 17f4fe86..8f7cd0f8 100644 --- a/Makefile +++ b/Makefile @@ -34,6 +34,8 @@ ZUI_REPO_NAME := zui SWAGGER_VERSION := v1.16.2 STACKER := $(TOOLSDIR)/bin/stacker STACKER_VERSION := v1.1.0-rc3 +KIND := $(TOOLSDIR)/bin/kind +KIND_VERSION := v0.31.0 BATS := $(TOOLSDIR)/bin/bats TESTDATA := $(TOP_LEVEL)/test/data OS ?= $(shell go env GOOS) @@ -518,7 +520,7 @@ $(BATS): rm -rf bats-core .PHONY: check-blackbox-prerequisites -check-blackbox-prerequisites: check-linux check-skopeo $(BATS) $(REGCLIENT) $(ORAS) $(HELM) $(CRICTL) $(NOTATION) $(COSIGN) $(STACKER) +check-blackbox-prerequisites: check-linux check-skopeo $(BATS) $(REGCLIENT) $(ORAS) $(HELM) $(CRICTL) $(NOTATION) $(COSIGN) $(STACKER) $(KIND) which skopeo && skopeo --version; \ which stacker && stacker --version; \ which regctl && regctl version; \ @@ -526,7 +528,8 @@ check-blackbox-prerequisites: check-linux check-skopeo $(BATS) $(REGCLIENT) $(OR which helm && helm version; \ which crictl && crictl version; \ which notation && notation version; \ - which cosign && cosign version; + which cosign && cosign version; \ + which kind && kind version; .PHONY: run-blackbox-tests run-blackbox-tests: $(BATS_TEST_FILE_PATH) check-blackbox-prerequisites binary binary-minimal cli bench @@ -598,6 +601,11 @@ $(COSIGN): curl -fsSL https://github.com/sigstore/cosign/releases/download/v$(COSIGN_VERSION)/cosign-$(OS)-$(ARCH) -o $@; \ chmod +x $@ +$(KIND): check-linux + mkdir -p $(TOOLSDIR)/bin; \ + curl -fsSL curl -Lo ./kind https://kind.sigs.k8s.io/dl/$(KIND_VERSION)/kind-$(OS)-$(ARCH) -o $@; \ + chmod +x $@ + # set ZUI_VERSION to empty string in order to clone zui locally and build default branch .PHONY: ui ui: diff --git a/examples/kind/kind-ci.sh b/examples/kind/kind-ci.sh index 7ccf8a86..f96b13e3 100755 --- a/examples/kind/kind-ci.sh +++ b/examples/kind/kind-ci.sh @@ -1,6 +1,9 @@ #!/bin/sh set -o errexit +ROOT_DIR=$(git rev-parse --show-toplevel) +KIND="${ROOT_DIR}"/hack/tools/bin/kind + # Reference: https://kind.sigs.k8s.io/docs/user/local-registry/ # set no_proxy if applicable @@ -21,12 +24,20 @@ fi CLUSTER_NAME=kind ## Delete the cluster if it already exist -kind get clusters | grep ${CLUSTER_NAME} && kind delete cluster --name ${CLUSTER_NAME} +"${KIND}" get clusters | grep ${CLUSTER_NAME} && "${KIND}" delete cluster --name ${CLUSTER_NAME} # create a cluster with the local registry enabled in containerd -cat <