Skip to content

Commit fe0d3aa

Browse files
author
Per Goncalves da Silva
committed
make sure we're using the latest kind node image
Signed-off-by: Per Goncalves da Silva <pegoncal@redhat.com>
1 parent 3efd226 commit fe0d3aa

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ KUBEBUILDER_ASSETS ?= $(shell $(SETUP_ENVTEST) use -p path $(KUBE_MINOR).x)
102102

103103
# Kind node image tags are in the format x.y.z we pin to version x.y.0 because patch releases and node images
104104
# are not guaranteed to be available when a new version of the kube apis is released
105-
KIND_CLUSTER_IMAGE := kindest/node:v$(KUBE_MINOR).0
105+
export KIND_CLUSTER_IMAGE := kindest/node:v$(KUBE_MINOR).0
106106
export KIND_CLUSTER_NAME ?= kind-olmv0
107107

108108
# Targets #

scripts/kind_with_registry.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
set -o errexit
33
set -x
44

5+
BINGO_ENV_PATH=$(cd "$(dirname "${BASH_SOURCE[0]}")/../.bingo" && pwd)
6+
7+
. "${BINGO_ENV_PATH}/variables.env"
8+
59
# Original source: https://kind.sigs.k8s.io/docs/user/local-registry/
610
KIND_CLUSTER_NAME=${KIND_CLUSTER_NAME:-kind-olmv0}
711
KIND=${KIND:-kind}
@@ -25,7 +29,10 @@ fi
2529
# https://github.com/kubernetes-sigs/kind/issues/2875
2630
# https://github.com/containerd/containerd/blob/main/docs/cri/config.md#registry-configuration
2731
# See: https://github.com/containerd/containerd/blob/main/docs/hosts.md
28-
cat <<EOF | ${KIND} create cluster --name="${KIND_CLUSTER_NAME}" ${KIND_CREATE_OPTS} --config=-
32+
if [ -n "${KIND_CLUSTER_IMAGE}" ]; then
33+
KIND_IMAGE="--image=${KIND_CLUSTER_IMAGE}"
34+
fi
35+
cat <<EOF | ${KIND} create cluster --name="${KIND_CLUSTER_NAME}" "${KIND_IMAGE}" ${KIND_CREATE_OPTS} --config=-
2936
kind: Cluster
3037
apiVersion: kind.x-k8s.io/v1alpha4
3138
containerdConfigPatches:

0 commit comments

Comments
 (0)