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
53
53
@echo " (re)installing $( GOBIN) /goreleaser-v1.26.2"
54
54
@cd $(BINGO_DIR ) && GOWORK=off $(GO ) build -mod=mod -modfile=goreleaser.mod -o=$(GOBIN ) /goreleaser-v1.26.2 " github.com/goreleaser/goreleaser"
55
55
56
- KIND := $(GOBIN ) /kind-v0.27 .0
56
+ KIND := $(GOBIN ) /kind-v0.29 .0
57
57
$(KIND ) : $(BINGO_DIR ) /kind.mod
58
58
@# 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"
61
61
62
62
KUSTOMIZE := $(GOBIN ) /kustomize-v5.6.0
63
63
$(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
2
2
3
3
go 1.20
4
4
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=
64
64
sigs.k8s.io/kind v0.26.0/go.mod h1:t7ueEpzPYJvHA8aeLtI52rtFftNgUYUaCwvxjk7phfw=
65
65
sigs.k8s.io/kind v0.27.0 h1:PQ3f0iAWNIj66LYkZ1ivhEg/+Zb6UPMbO+qVei/INZA=
66
66
sigs.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=
67
69
sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo=
68
70
sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8=
69
71
sigs.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"
20
20
21
21
GORELEASER = " ${ GOBIN } /goreleaser-v1.26.2"
22
22
23
- KIND = " ${ GOBIN } /kind-v0.27 .0"
23
+ KIND = " ${ GOBIN } /kind-v0.29 .0"
24
24
25
25
KUSTOMIZE = " ${ GOBIN } /kustomize-v5.6.0"
26
26
Original file line number Diff line number Diff line change 40
40
# Ensure ENVTEST_VERSION follows correct "X.Y.x" format
41
41
ENVTEST_VERSION := $(K8S_VERSION ) .x
42
42
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
-
49
43
# Define dependency versions (use go.mod if we also use Go code from dependency)
50
44
export CERT_MGR_VERSION := v1.17.1
51
45
export WAIT_TIMEOUT := 60s
@@ -320,8 +314,9 @@ kind-deploy: manifests
320
314
321
315
.PHONY : kind-cluster
322
316
kind-cluster : $(KIND ) # EXHELP Standup a kind cluster.
317
+ env K8S_VERSION=v$(K8S_VERSION ) KIND=$(KIND ) GOBIN=$(GOBIN ) hack/tools/validate_kindest_node.sh
323
318
-$(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
325
320
$(KIND ) export kubeconfig --name $(KIND_CLUSTER_NAME )
326
321
327
322
.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