From e3cf072b2961e83d5be1e4a7db0f7da011b9ce4c Mon Sep 17 00:00:00 2001 From: shreddedbacon Date: Wed, 7 Jan 2026 09:18:11 +1100 Subject: [PATCH] test: use kind v0.27.0 with more cluster tests --- .github/workflows/test-suite.yaml | 26 +++++++++++++++----------- Makefile | 20 ++++++++++++-------- test/utils/utils.go | 2 +- 3 files changed, 28 insertions(+), 20 deletions(-) diff --git a/.github/workflows/test-suite.yaml b/.github/workflows/test-suite.yaml index f0945dd..e8069f2 100644 --- a/.github/workflows/test-suite.yaml +++ b/.github/workflows/test-suite.yaml @@ -5,27 +5,31 @@ on: pull_request jobs: test-suite: runs-on: ubuntu-latest + continue-on-error: ${{ matrix.experimental }} strategy: fail-fast: false - + matrix: + kindest_node_version: [ + "v1.29.14@sha256:8703bd94ee24e51b778d5556ae310c6c0fa67d761fae6379c8e0bb480e6fea29", + "v1.30.10@sha256:4de75d0e82481ea846c0ed1de86328d821c1e6a6a91ac37bf804e5313670e507", + "v1.32.2@sha256:f226345927d7e348497136874b6d207e0b32cc52154ad8323129352923a3142f", + ] + experimental: [false] steps: - name: Checkout uses: actions/checkout@v4 with: fetch-depth: "0" - - name: Configure kind network - run: | - docker network create kind - - name: Create kind cluster uses: helm/kind-action@v1.13.0 with: - version: v0.22.0 - node_image: kindest/node:v1.28.7@sha256:9bc6c451a289cf96ad0bbaf33d416901de6fd632415b076ab05f5fa7e4f65c58 - kubectl_version: v1.28.7 - cluster_name: kind - config: kind-config.yaml + version: v0.27.0 + cluster_name: dbaas-controller + node_image: kindest/node:${{ matrix.kindest_node_version }} + kubectl_version: v1.32.2 + config: test-resources/test-suite.kind-config.yaml - name: Run github/test-e2e - run: make github/test-e2e + run: | + make github/test-e2e KIND_NETWORK=kind diff --git a/Makefile b/Makefile index 84e6ea5..54548ab 100644 --- a/Makefile +++ b/Makefile @@ -14,8 +14,8 @@ endif KIND_CLUSTER ?= dbaas-controller KIND_NETWORK ?= dbaas-controller -KIND_VERSION = v0.25.0 -KUBECTL_VERSION := v1.31.0 +KIND_VERSION = v0.27.0 +KUBECTL_VERSION := v1.32.3 HELM_VERSION := v3.16.1 GOJQ_VERSION = v0.12.16 KUSTOMIZE_VERSION := v5.4.3 @@ -32,7 +32,7 @@ ARCH := $(shell uname | tr '[:upper:]' '[:lower:]') local-dev/kind: ifeq ($(KIND_VERSION), $(shell kind version 2>/dev/null | sed -nE 's/kind (v[0-9.]+).*/\1/p')) $(info linking local kind version $(KIND_VERSION)) - ln -sf $(shell command -v kind) ./local-dev/kind + $(eval KIND = $(realpath $(shell command -v kind))) else ifneq ($(KIND_VERSION), $(shell ./local-dev/kind version 2>/dev/null | sed -nE 's/kind (v[0-9.]+).*/\1/p')) $(info downloading kind version $(KIND_VERSION) for $(ARCH)) @@ -47,10 +47,11 @@ endif local-dev/kustomize: ifeq ($(KUSTOMIZE_VERSION), $(shell kustomize version 2>/dev/null | sed -nE 's/(v[0-9.]+).*/\1/p')) $(info linking local kustomize version $(KUSTOMIZE_VERSION)) - ln -sf $(shell command -v kustomize) ./local-dev/kustomize + $(eval KUSTOMIZE = $(realpath $(shell command -v kustomize))) else ifneq ($(KUSTOMIZE_VERSION), $(shell ./local-dev/kustomize version 2>/dev/null | sed -nE 's/(v[0-9.]+).*/\1/p')) $(info downloading kustomize version $(KUSTOMIZE_VERSION) for $(ARCH)) + mkdir -p local-dev rm local-dev/kustomize || true curl -sSL https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize%2F$(KUSTOMIZE_VERSION)/kustomize_$(KUSTOMIZE_VERSION)_$(ARCH)_amd64.tar.gz | tar -xzC local-dev chmod a+x local-dev/kustomize @@ -61,10 +62,11 @@ endif local-dev/helm: ifeq ($(HELM_VERSION), $(shell helm version --short --client 2>/dev/null | sed -nE 's/(v[0-9.]+).*/\1/p')) $(info linking local helm version $(HELM_VERSION)) - ln -sf $(shell command -v helm) ./local-dev/helm + $(eval HELM = $(realpath $(shell command -v helm))) else ifneq ($(HELM_VERSION), $(shell ./local-dev/helm version --short --client 2>/dev/null | sed -nE 's/(v[0-9.]+).*/\1/p')) $(info downloading helm version $(HELM_VERSION) for $(ARCH)) + mkdir -p local-dev rm local-dev/helm || true curl -sSL https://get.helm.sh/helm-$(HELM_VERSION)-$(ARCH)-amd64.tar.gz | tar -xzC local-dev --strip-components=1 $(ARCH)-amd64/helm chmod a+x local-dev/helm @@ -75,10 +77,11 @@ endif local-dev/jq: ifeq ($(GOJQ_VERSION), $(shell gojq -v 2>/dev/null | sed -nE 's/gojq ([0-9.]+).*/v\1/p')) $(info linking local gojq version $(GOJQ_VERSION)) - ln -sf $(shell command -v gojq) ./local-dev/jq + $(eval JQ = $(realpath $(shell command -v gojq))) else ifneq ($(GOJQ_VERSION), $(shell ./local-dev/jq -v 2>/dev/null | sed -nE 's/gojq ([0-9.]+).*/v\1/p')) $(info downloading gojq version $(GOJQ_VERSION) for $(ARCH)) + mkdir -p local-dev rm local-dev/jq || true ifeq ($(ARCH), darwin) TMPDIR=$$(mktemp -d) \ @@ -96,12 +99,13 @@ endif local-dev/kubectl: ifeq ($(KUBECTL_VERSION), $(shell kubectl version --client 2>/dev/null | grep Client | sed -E 's/Client Version: (v[0-9.]+).*/\1/')) $(info linking local kubectl version $(KUBECTL_VERSION)) - ln -sf $(shell command -v kubectl) ./local-dev/kubectl + $(eval KUBECTL = $(realpath $(shell command -v kubectl))) else ifneq ($(KUBECTL_VERSION), $(shell ./local-dev/kubectl version --client 2>/dev/null | grep Client | sed -E 's/Client Version: (v[0-9.]+).*/\1/')) $(info downloading kubectl version $(KUBECTL_VERSION) for $(ARCH)) + mkdir -p local-dev rm local-dev/kubectl || true - curl -sSLo local-dev/kubectl https://storage.googleapis.com/kubernetes-release/release/$(KUBECTL_VERSION)/bin/$(ARCH)/amd64/kubectl + curl -sSLo local-dev/kubectl https://dl.k8s.io/release/$(KUBECTL_VERSION)/bin/$(ARCH)/amd64/kubectl chmod a+x local-dev/kubectl endif endif diff --git a/test/utils/utils.go b/test/utils/utils.go index 5f44b85..d9ebbd5 100644 --- a/test/utils/utils.go +++ b/test/utils/utils.go @@ -229,7 +229,7 @@ func InstallCertManager() error { // LoadImageToKindCluster loads a local docker image to the kind cluster func LoadImageToKindClusterWithName(name string) error { - cluster := kindPath + cluster := "dbaas-controller" if v, ok := os.LookupEnv("KIND_CLUSTER"); ok { cluster = v }