Skip to content

Commit

Permalink
Merge pull request #73 from elezar/bump-kind-test-to-1.28.6
Browse files Browse the repository at this point in the history
Update Kind to 1.29.1
  • Loading branch information
elezar authored Feb 14, 2024
2 parents 255f9c7 + e7d9271 commit ba45c06
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 7 deletions.
18 changes: 16 additions & 2 deletions demo/clusters/kind/scripts/build-kind-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ if [ "${EXISTING_IMAGE_ID}" != "" ]; then
exit 0
fi

PREBUILT_IMAGE="$( ( docker manifest inspect ${KIND_IMAGE} > /dev/null && echo "available" ) || ( echo "not-available" ) )"
if [ "${PREBUILT_IMAGE}" = "available" ] && [ "${KIND_IMAGE_BASE}" = "" ]; then
exit 0
fi

# Create a temorary directory to hold all the artifacts we need for building the image
TMP_DIR="$(mktemp -d)"
cleanup() {
Expand All @@ -43,5 +48,14 @@ KIND_K8S_DIR="${TMP_DIR}/kubernetes-${KIND_K8S_TAG}"
# Checkout the version of kubernetes we want to build our kind image from
git clone --depth 1 --branch ${KIND_K8S_TAG} ${KIND_K8S_REPO} ${KIND_K8S_DIR}

# Build the kind base image
kind build node-image --base-image "${KIND_IMAGE_BASE}" --image "${KIND_IMAGE}" "${KIND_K8S_DIR}"
# Build the kind node image.
# The default base image will be used unless it is specified using the
# KIND_BASE_IMAGE environment variable.
# This could be needed if new container runtime features are required.
# Examples are:
# gcr.io/k8s-staging-kind/base:v20240213-749005b2
# docker.io/kindest/base:v20240202-8f1494ea
kind build node-image \
${KIND_IMAGE_BASE:+--base-image "${KIND_IMAGE_BASE}"} \
--image "${KIND_IMAGE}" \
"${KIND_K8S_DIR}"
9 changes: 4 additions & 5 deletions demo/clusters/kind/scripts/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,15 @@ DRIVER_IMAGE_VERSION=$(from_versions_mk "VERSION")

# The kubernetes tag to build the kind cluster from
# From https://github.com/kubernetes/kubernetes/tags
: ${KIND_K8S_TAG:="v1.27.1"}
# See also https://hub.docker.com/r/kindest/node/tags
: ${KIND_K8S_TAG:="v1.29.1"}

# The name of the kind cluster to create
: ${KIND_CLUSTER_NAME:="${DRIVER_NAME}-cluster"}

# The path to kind's cluster configuration file
: ${KIND_CLUSTER_CONFIG_PATH:="${SCRIPTS_DIR}/kind-cluster-config.yaml"}

# The derived name of the kind image to build
: ${KIND_IMAGE_BASE_TAG:="v20230515-01914134-containerd_v1.7.1"}
: ${KIND_IMAGE_BASE:="gcr.io/k8s-staging-kind/base:${KIND_IMAGE_BASE_TAG}"}
: ${KIND_IMAGE:="kindest/node:${KIND_K8S_TAG}-${KIND_IMAGE_BASE_TAG}"}
# The kind image to use. This image will be built if it is not available.
: ${KIND_IMAGE:="kindest/node:${KIND_K8S_TAG}"}

0 comments on commit ba45c06

Please sign in to comment.