File tree Expand file tree Collapse file tree 6 files changed +24
-12
lines changed
Expand file tree Collapse file tree 6 files changed +24
-12
lines changed Original file line number Diff line number Diff line change @@ -53,11 +53,11 @@ $(GORELEASER): $(BINGO_DIR)/goreleaser.mod
5353 @echo " (re)installing $( GOBIN) /goreleaser-v1.26.2"
5454 @cd $(BINGO_DIR ) && GOWORK=off $(GO ) build -mod=mod -modfile=goreleaser.mod -o=$(GOBIN ) /goreleaser-v1.26.2 " github.com/goreleaser/goreleaser"
5555
56- KIND := $(GOBIN ) /kind-v0.27 .0
56+ KIND := $(GOBIN ) /kind-v0.29 .0
5757$(KIND ) : $(BINGO_DIR ) /kind.mod
5858 @# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
59- @echo " (re)installing $( GOBIN) /kind-v0.27 .0"
60- @cd $(BINGO_DIR ) && GOWORK=off $(GO ) build -mod=mod -modfile=kind.mod -o=$(GOBIN ) /kind-v0.27 .0 " sigs.k8s.io/kind"
59+ @echo " (re)installing $( GOBIN) /kind-v0.29 .0"
60+ @cd $(BINGO_DIR ) && GOWORK=off $(GO ) build -mod=mod -modfile=kind.mod -o=$(GOBIN ) /kind-v0.29 .0 " sigs.k8s.io/kind"
6161
6262KUSTOMIZE := $(GOBIN ) /kustomize-v5.6.0
6363$(KUSTOMIZE ) : $(BINGO_DIR ) /kustomize.mod
Original file line number Diff line number Diff line change @@ -2,4 +2,4 @@ module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
22
33go 1.20
44
5- require sigs.k8s.io/kind v0.27 .0
5+ require sigs.k8s.io/kind v0.29 .0
Original file line number Diff line number Diff line change @@ -64,6 +64,8 @@ sigs.k8s.io/kind v0.26.0 h1:8fS6I0Q5WGlmLprSpH0DarlOSdcsv0txnwc93J2BP7M=
6464sigs.k8s.io/kind v0.26.0/go.mod h1:t7ueEpzPYJvHA8aeLtI52rtFftNgUYUaCwvxjk7phfw=
6565sigs.k8s.io/kind v0.27.0 h1:PQ3f0iAWNIj66LYkZ1ivhEg/+Zb6UPMbO+qVei/INZA=
6666sigs.k8s.io/kind v0.27.0/go.mod h1:RZVFmy6qcwlSWwp6xeIUv7kXCPF3i8MXsEXxW/J+gJY=
67+ sigs.k8s.io/kind v0.29.0 h1:3TpCsyh908IkXXpcSnsMjWdwdWjIl7o9IMZImZCWFnI=
68+ sigs.k8s.io/kind v0.29.0/go.mod h1:ldWQisw2NYyM6k64o/tkZng/1qQW7OlzcN5a8geJX3o=
6769sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo=
6870sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8=
6971sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E=
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ GOLANGCI_LINT="${GOBIN}/golangci-lint-v1.64.6"
2020
2121GORELEASER = " ${ GOBIN } /goreleaser-v1.26.2"
2222
23- KIND = " ${ GOBIN } /kind-v0.27 .0"
23+ KIND = " ${ GOBIN } /kind-v0.29 .0"
2424
2525KUSTOMIZE = " ${ GOBIN } /kustomize-v5.6.0"
2626
Original file line number Diff line number Diff line change 4040# Ensure ENVTEST_VERSION follows correct "X.Y.x" format
4141ENVTEST_VERSION := $(K8S_VERSION ) .x
4242
43- # Not guaranteed to have patch releases available and node image tags are full versions (i.e v1.28.0 - no v1.28, v1.29, etc.)
44- # The K8S_VERSION is set by getting the version of the k8s.io/client-go dependency from the go.mod
45- # and sets major version to "1" and the patch version to "0". For example, a client-go version of v0.28.5
46- # will map to a K8S_VERSION of 1.28.0
47- KIND_CLUSTER_IMAGE := kindest/node:v$(K8S_VERSION ) .0
48-
4943# Define dependency versions (use go.mod if we also use Go code from dependency)
5044export CERT_MGR_VERSION := v1.17.1
5145export WAIT_TIMEOUT := 60s
@@ -320,8 +314,9 @@ kind-deploy: manifests
320314
321315.PHONY : kind-cluster
322316kind-cluster : $(KIND ) # EXHELP Standup a kind cluster.
317+ env K8S_VERSION=v$(K8S_VERSION ) KIND=$(KIND ) GOBIN=$(GOBIN ) hack/tools/validate_kindest_node.sh
323318 -$(KIND ) delete cluster --name $(KIND_CLUSTER_NAME )
324- $(KIND ) create cluster --name $(KIND_CLUSTER_NAME ) --image $( KIND_CLUSTER_IMAGE ) -- config ./kind-config.yaml
319+ $(KIND ) create cluster --name $(KIND_CLUSTER_NAME ) --config ./kind-config.yaml
325320 $(KIND ) export kubeconfig --name $(KIND_CLUSTER_NAME )
326321
327322.PHONY : kind-clean
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ # This script verifies that the version of kind used for testing uses a major.minor version of k8s that operator-controller does
3+
4+ # Extract the version of kind, by removing the "${GOBIN}/kind-" prefix
5+ KIND=${KIND# ${GOBIN} / kind-}
6+
7+ # Get the version of the image
8+ KIND_VER=$( curl -L -s https://github.com/kubernetes-sigs/kind/raw/refs/tags/${KIND} /pkg/apis/config/defaults/image.go | grep -Eo ' v[0-9]+\.[0-9]+' )
9+
10+ # Compare the versions
11+ if [ " ${KIND_VER} " != " ${K8S_VERSION} " ]; then
12+ echo " kindest/node:${KIND_VER} version does not match k8s ${K8S_VERSION} "
13+ exit 1
14+ fi
15+ exit 0
You can’t perform that action at this time.
0 commit comments