Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support multiple kind versions; add kind 0.19.0 #383

Merged
merged 1 commit into from
May 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions ci/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
set -eu

HELM_VERSION=v3.11.2
KIND_VERSION=v0.18.0
KUBECTL_VERSION=v1.24.7
KIND_VERSION=v0.19.0
KUBECTL_VERSION=v1.24.13

# Download and install command line tools
pushd /tmp
Expand Down
40 changes: 27 additions & 13 deletions scripts/kind-start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,19 @@
# controller on it. This enables services running on the cluster to be
# exposed by creating Ingress instances.

# kind version that matches below tags
KIND_EXPECTED_VERSION=v0.18.0
set -eu

SCRIPTDIR=$(cd $(dirname "$0") && pwd)
ROOTDIR="$SCRIPTDIR/.."

# Valid node tags for kind 0.19.0
# 1.27: kindest/node:v1.27.1@sha256:b7d12ed662b873bd8510879c1846e87c7e676a79fefc93e17b2a52989d3ff42b
# 1.26: kindest/node:v1.26.4@sha256:f4c0d87be03d6bea69f5e5dc0adb678bb498a190ee5c38422bf751541cebe92e
# 1.25: kindest/node:v1.25.9@sha256:c08d6c52820aa42e533b70bce0c2901183326d86dcdcbedecc9343681db45161
# 1.24: kindest/node:v1.24.13@sha256:cea86276e698af043af20143f4bf0509e730ec34ed3b7fa790cc0bea091bc5dd
# 1.23: kindest/node:v1.23.17@sha256:f77f8cf0b30430ca4128cc7cfafece0c274a118cd0cdb251049664ace0dee4ff
# 1.22: kindest/node:v1.22.17@sha256:9af784f45a584f6b28bce2af84c494d947a05bd709151466489008f80a9ce9d5
# 1.21: kindest/node:v1.21.14@sha256:220cfafdf6e3915fbce50e13d1655425558cb98872c53f802605aa2fb2d569cf

# Valid node tags for kind 0.18.0
# 1.26: kindest/node:v1.26.3@sha256:61b92f38dff6ccc29969e7aa154d34e38b89443af1a2c14e6cfbd2df6419c66f
Expand All @@ -40,19 +51,22 @@ KIND_EXPECTED_VERSION=v0.18.0
# 1.20: kindest/node:v1.20.15@sha256:a32bf55309294120616886b5338f95dd98a2f7231519c7dedcec32ba29699394
# 1.19: kindest/node:v1.19.16@sha256:476cb3269232888437b61deca013832fee41f9f074f9bed79f57e4280f7c48b7

KIND_NODE_TAG=${KIND_NODE_TAG:="v1.24.12@sha256:1e12918b8bc3d4253bc08f640a231bb0d3b2c5a9b28aa3f2ca1aee93e1e8db16"}

set -eu

SCRIPTDIR=$(cd $(dirname "$0") && pwd)
ROOTDIR="$SCRIPTDIR/.."

# Validate kind version is as expected
# Based on the kind version found in the path, select the correct Kubernetes 1.24 node tag
KIND_ACTUAL_VERSION=$(kind version | awk '/ /{print $2}')
if [ "$KIND_ACTUAL_VERSION" != "$KIND_EXPECTED_VERSION" ]; then
echo "Kind version mismatch: expected $KIND_EXPECTED_VERSION but found $KIND_ACTUAL_VERSION"
case $KIND_ACTUAL_VERSION in
v0.19.0)
KIND_NODE_TAG=${KIND_NODE_TAG:="v1.24.13@sha256:cea86276e698af043af20143f4bf0509e730ec34ed3b7fa790cc0bea091bc5dd"}
;;
v0.18.0)
KIND_NODE_TAG=${KIND_NODE_TAG:="v1.24.12@sha256:1e12918b8bc3d4253bc08f640a231bb0d3b2c5a9b28aa3f2ca1aee93e1e8db16"}
;;
v0.17.0)
KIND_NODE_TAG=${KIND_NODE_TAG:="v1.24.7@sha256:577c630ce8e509131eab1aea12c022190978dd2f745aac5eb1fe65c0807eb315"}
;;
*)
echo "Unexpected kind version: $KIND_ACTUAL_VERSION"
exit 1
fi
esac

# create docker network "kind" so that rootless podman can connect registry
docker network create kind >/dev/null || true
Expand Down