From 6b78393dc48a1ac36caa682746d3b0c07b171b6a Mon Sep 17 00:00:00 2001 From: xunpan Date: Mon, 30 Nov 2020 07:20:04 -0500 Subject: [PATCH] make create-clusters.sh work based on kind document and update KIND_TAG to the latest version --- docs/environments/kind.md | 13 +++++++++++++ scripts/create-clusters.sh | 2 +- scripts/pre-commit.sh | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/docs/environments/kind.md b/docs/environments/kind.md index 3e926ff2d1..13fe3bc57d 100644 --- a/docs/environments/kind.md +++ b/docs/environments/kind.md @@ -43,6 +43,19 @@ script if you'd like to change the default: NUM_CLUSTERS= ./scripts/create-clusters.sh ``` +The `KIND_TAG` is `v1.19.4@sha256:796d09e217d93bed01ecf8502633e48fd806fe42f9d02fdd468b81cd4e3bd40b` by default. +Image `kindest/node:v1.19.4@sha256:796d09e217d93bed01ecf8502633e48fd806fe42f9d02fdd468b81cd4e3bd40b` is used as +node docker image for booting the cluster. + +You can use `KIND_IMAGE` or `KIND_TAG` to specify the image as you want. +```bash +KIND_TAG=v1.18.8 ./scripts/create-clusters.sh +``` + +```bash +KIND_IMAGE=kindest/node:v1.18.8 ./scripts/create-clusters.sh +``` + ## Delete Clusters Run the following command to delete `2` `kind` clusters: diff --git a/scripts/create-clusters.sh b/scripts/create-clusters.sh index 014ddc2cfb..30a825fcf6 100755 --- a/scripts/create-clusters.sh +++ b/scripts/create-clusters.sh @@ -25,7 +25,7 @@ set -o pipefail source "${BASH_SOURCE%/*}/util.sh" NUM_CLUSTERS="${NUM_CLUSTERS:-2}" KIND_IMAGE="${KIND_IMAGE:-}" -KIND_TAG="${KIND_TAG:-}" +KIND_TAG="${KIND_TAG:-v1.19.4@sha256:796d09e217d93bed01ecf8502633e48fd806fe42f9d02fdd468b81cd4e3bd40b}" OS="$(uname)" function create-clusters() { diff --git a/scripts/pre-commit.sh b/scripts/pre-commit.sh index 899b4dd26e..0632c56701 100755 --- a/scripts/pre-commit.sh +++ b/scripts/pre-commit.sh @@ -136,7 +136,7 @@ run-unit-tests echo "Downloading e2e test dependencies" ./scripts/download-e2e-binaries.sh -KIND_TAG="v1.19.1@sha256:98cf5288864662e37115e362b23e4369c8c4a408f99cbc06e58ac30ddc721600" ./scripts/create-clusters.sh +KIND_TAG="v1.19.4@sha256:796d09e217d93bed01ecf8502633e48fd806fe42f9d02fdd468b81cd4e3bd40b" ./scripts/create-clusters.sh declare -a join_cluster_list=() if [[ -z "${JOIN_CLUSTERS}" ]]; then