File tree Expand file tree Collapse file tree 2 files changed +19
-3
lines changed Expand file tree Collapse file tree 2 files changed +19
-3
lines changed Original file line number Diff line number Diff line change @@ -386,7 +386,7 @@ kind-clean: $(KIND) #EXHELP Delete the kind cluster.
386386 $(KIND ) delete cluster --name $(KIND_CLUSTER_NAME )
387387
388388.PHONY : kind-verify-versions
389- kind-verify-versions :
389+ kind-verify-versions : $( KIND )
390390 env K8S_VERSION=v$(K8S_VERSION ) KIND=$(KIND ) GOBIN=$(GOBIN ) hack/tools/validate_kindest_node.sh
391391
392392
Original file line number Diff line number Diff line change 44# Extract the version of kind, by removing the "${GOBIN}/kind-" prefix
55KIND=${KIND# ${GOBIN} / kind-}
66
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]+' )
7+ GOMODCACHE=$( go env GOMODCACHE)
8+
9+ REGEX=' v[0-9]+\.[0-9]+'
10+
11+ # Get the version of the image from the local kind build
12+ if [ -d " ${GOMODCACHE} " ]; then
13+ KIND_VER=$( grep -Eo " ${REGEX} " ${GOMODCACHE} /sigs.k8s.io/kind@${KIND} /pkg/apis/config/defaults/image.go)
14+ fi
15+
16+ # Get the version of the image from github
17+ if [ -z " ${KIND_VER} " ]; then
18+ KIND_VER=$( curl -L -s https://github.com/kubernetes-sigs/kind/raw/refs/tags/${KIND} /pkg/apis/config/defaults/image.go | grep -Eo " ${REGEX} " )
19+ fi
20+
21+ if [ -z " ${KIND_VER} " ]; then
22+ echo " Unable to determine kindest/node version"
23+ exit 1
24+ fi
925
1026# Compare the versions
1127if [ " ${KIND_VER} " != " ${K8S_VERSION} " ]; then
You can’t perform that action at this time.
0 commit comments