Skip to content

Commit 62a5f81

Browse files
Merge pull request #286 from inteon/kube_version
Make Kubernetes version used by Kind configurable using K8S_VERSION
2 parents 2d9b8ad + f2b7c49 commit 62a5f81

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

modules/kind/00_mod.mk

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,17 @@ include $(dir $(lastword $(MAKEFILE_LIST)))/00_kind_image_versions.mk
1717
images_amd64 ?=
1818
images_arm64 ?=
1919

20+
# K8S_VERSION can be used to specify a specific
21+
# kubernetes version to use with Kind.
22+
K8S_VERSION ?=
23+
ifeq ($(K8S_VERSION),)
2024
images_amd64 += $(kind_image_latest_amd64)
2125
images_arm64 += $(kind_image_latest_arm64)
26+
else
27+
fatal_if_undefined = $(if $(findstring undefined,$(origin $1)),$(error $1 is not set))
28+
$(call fatal_if_undefined,kind_image_kube_$(K8S_VERSION)_amd64)
29+
$(call fatal_if_undefined,kind_image_kube_$(K8S_VERSION)_arm64)
30+
31+
images_amd64 += $(kind_image_kube_$(K8S_VERSION)_amd64)
32+
images_arm64 += $(kind_image_kube_$(K8S_VERSION)_arm64)
33+
endif

0 commit comments

Comments
 (0)