@@ -91,24 +91,6 @@ configvar CSI_PROW_GO_VERSION_SANITY "${CSI_PROW_GO_VERSION_BUILD}" "Go version
9191configvar CSI_PROW_GO_VERSION_KIND " ${CSI_PROW_GO_VERSION_BUILD} " " Go version for building 'kind'" # depends on CSI_PROW_KIND_VERSION below
9292configvar CSI_PROW_GO_VERSION_GINKGO " ${CSI_PROW_GO_VERSION_BUILD} " " Go version for building ginkgo" # depends on CSI_PROW_GINKGO_VERSION below
9393
94- # kind version to use. If the pre-installed version is different,
95- # the desired version is downloaded from https://github.com/kubernetes-sigs/kind/releases
96- # (if available), otherwise it is built from source.
97- configvar CSI_PROW_KIND_VERSION " v0.9.0" " kind"
98-
99- # kind images to use. Must match the kind version.
100- # The release notes of each kind release list the supported images.
101- configvar CSI_PROW_KIND_IMAGES " kindest/node:v1.19.1@sha256:98cf5288864662e37115e362b23e4369c8c4a408f99cbc06e58ac30ddc721600
102- kindest/node:v1.18.8@sha256:f4bcc97a0ad6e7abaf3f643d890add7efe6ee4ab90baeb374b4f41a4c95567eb
103- kindest/node:v1.17.11@sha256:5240a7a2c34bf241afb54ac05669f8a46661912eab05705d660971eeb12f6555
104- kindest/node:v1.16.15@sha256:a89c771f7de234e6547d43695c7ab047809ffc71a0c3b65aa54eda051c45ed20
105- kindest/node:v1.15.12@sha256:d9b939055c1e852fe3d86955ee24976cab46cba518abcb8b13ba70917e6547a6
106- kindest/node:v1.14.10@sha256:ce4355398a704fca68006f8a29f37aafb49f8fc2f64ede3ccd0d9198da910146
107- kindest/node:v1.13.12@sha256:1c1a48c2bfcbae4d5f4fa4310b5ed10756facad0b7a2ca93c7a4b5bae5db29f5" " kind images"
108-
109- # Use kind node-image --type=bazel by default, but allow to disable that.
110- configvar CSI_PROW_USE_BAZEL true " use Bazel during 'kind node-image' invocation"
111-
11294# ginkgo test runner version to use. If the pre-installed version is
11395# different, the desired version is built from source.
11496configvar CSI_PROW_GINKGO_VERSION v1.7.0 " Ginkgo"
@@ -145,6 +127,38 @@ configvar CSI_PROW_KUBERNETES_VERSION 1.17.0 "Kubernetes"
145127# when a Prow job just defines the Kubernetes version.
146128csi_prow_kubernetes_version_suffix=" $( echo " ${CSI_PROW_KUBERNETES_VERSION} " | tr . _ | tr ' [:lower:]' ' [:upper:]' | sed -e ' s/^RELEASE-//' -e ' s/\([0-9]*\)_\([0-9]*\).*/\1_\2/' ) "
147129
130+ # Only the latest KinD is (eventually) guaranteed to work with the
131+ # latest Kubernetes. For example, KinD 0.10.0 failed with Kubernetes
132+ # 1.21.0-beta1. Therefore the default version of KinD is "main"
133+ # for that, otherwise the latest stable release for which we then
134+ # list the officially supported images below.
135+ kind_version_default () {
136+ case " ${CSI_PROW_KUBERNETES_VERSION} " in
137+ latest|master)
138+ echo main;;
139+ * )
140+ echo v0.10.0;;
141+ esac
142+ }
143+
144+ # kind version to use. If the pre-installed version is different,
145+ # the desired version is downloaded from https://github.com/kubernetes-sigs/kind/releases
146+ # (if available), otherwise it is built from source.
147+ configvar CSI_PROW_KIND_VERSION " $( kind_version_default) " " kind"
148+
149+ # kind images to use. Must match the kind version.
150+ # The release notes of each kind release list the supported images.
151+ configvar CSI_PROW_KIND_IMAGES " kindest/node:v1.20.2@sha256:8f7ea6e7642c0da54f04a7ee10431549c0257315b3a634f6ef2fecaaedb19bab
152+ kindest/node:v1.19.7@sha256:a70639454e97a4b733f9d9b67e12c01f6b0297449d5b9cbbef87473458e26dca
153+ kindest/node:v1.18.15@sha256:5c1b980c4d0e0e8e7eb9f36f7df525d079a96169c8a8f20d8bd108c0d0889cc4
154+ kindest/node:v1.17.17@sha256:7b6369d27eee99c7a85c48ffd60e11412dc3f373658bc59b7f4d530b7056823e
155+ kindest/node:v1.16.15@sha256:c10a63a5bda231c0a379bf91aebf8ad3c79146daca59db816fb963f731852a99
156+ kindest/node:v1.15.12@sha256:67181f94f0b3072fb56509107b380e38c55e23bf60e6f052fbd8052d26052fb5
157+ kindest/node:v1.14.10@sha256:3fbed72bcac108055e46e7b4091eb6858ad628ec51bf693c21f5ec34578f6180" " kind images"
158+
159+ # Use kind node-image --type=bazel by default, but allow to disable that.
160+ configvar CSI_PROW_USE_BAZEL true " use Bazel during 'kind node-image' invocation"
161+
148162# Work directory. It has to allow running executables, therefore /tmp
149163# is avoided. Cleaning up after the script is intentionally left to
150164# the caller.
@@ -403,7 +417,7 @@ install_kind () {
403417 chmod u+x " ${CSI_PROW_WORK} /bin/kind"
404418 else
405419 git_checkout https://github.com/kubernetes-sigs/kind " ${GOPATH} /src/sigs.k8s.io/kind" " ${CSI_PROW_KIND_VERSION} " --depth=1 &&
406- (cd " ${GOPATH} /src/sigs.k8s.io/kind" && make install INSTALL_DIR=" ${CSI_PROW_WORK} /bin" )
420+ (cd " ${GOPATH} /src/sigs.k8s.io/kind" && run_with_go " $CSI_PROW_GO_VERSION_KIND " make install INSTALL_DIR=" ${CSI_PROW_WORK} /bin" )
407421 fi
408422}
409423
@@ -569,7 +583,8 @@ start_cluster () {
569583
570584 go_version=" $( go_version_for_kubernetes " ${CSI_PROW_WORK} /src/kubernetes" " $version " ) " || die " cannot proceed without knowing Go version for Kubernetes"
571585 # Changing into the Kubernetes source code directory is a workaround for https://github.com/kubernetes-sigs/kind/issues/1910
572- (cd " ${CSI_PROW_WORK} /src/kubernetes" && run_with_go " $go_version " kind build node-image --image csiprow/node:latest --type=" $type " --kube-root " ${CSI_PROW_WORK} /src/kubernetes" ) || die " 'kind build node-image' failed"
586+ # shellcheck disable=SC2046
587+ (cd " ${CSI_PROW_WORK} /src/kubernetes" && run_with_go " $go_version " kind build node-image --image csiprow/node:latest $( if [ " $CSI_PROW_KIND_VERSION " != " main" ]; then echo --type=" $type " ; fi) --kube-root " ${CSI_PROW_WORK} /src/kubernetes" ) || die " 'kind build node-image' failed"
573588 csi_prow_kind_have_kubernetes=true
574589 fi
575590 image=" csiprow/node:latest"
0 commit comments