Skip to content

Commit

Permalink
Merge pull request karmada-io#4296 from jwcesign/sh-fix
Browse files Browse the repository at this point in the history
sh: make cluster version configuration unified
  • Loading branch information
karmada-bot authored Nov 22, 2023
2 parents 4fe9dff + 8924632 commit 186e137
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion hack/cli-testing-environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ KUBECONFIG_PATH=${KUBECONFIG_PATH:-"${HOME}/.kube"}
HOST_CLUSTER_NAME=${HOST_CLUSTER_NAME:-"karmada-host"}
MEMBER_CLUSTER_1_NAME=${MEMBER_CLUSTER_1_NAME:-"member1"}
MEMBER_CLUSTER_2_NAME=${MEMBER_CLUSTER_2_NAME:-"member2"}
CLUSTER_VERSION=${CLUSTER_VERSION:-"kindest/node:v1.27.3"}
CLUSTER_VERSION=${CLUSTER_VERSION:-"${DEFAULT_CLUSTER_VERSION}"}
BUILD_PATH=${BUILD_PATH:-"_output/bin/linux/amd64"}

# prepare the newest crds
Expand Down
5 changes: 4 additions & 1 deletion hack/create-cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,16 @@ set -o errexit
set -o nounset
set -o pipefail

REPO_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
source "${REPO_ROOT}"/hack/util.sh

function usage() {
echo "This script starts a kube cluster by kind."
echo "Usage: hack/create-cluster.sh <CLUSTER_NAME> [KUBECONFIG]"
echo "Example: hack/create-cluster.sh host /root/.kube/karmada.config"
}

CLUSTER_VERSION=${CLUSTER_VERSION:-"kindest/node:v1.27.3"}
CLUSTER_VERSION=${CLUSTER_VERSION:-"${DEFAULT_CLUSTER_VERSION}"}

if [[ $# -lt 1 ]]; then
usage
Expand Down
2 changes: 1 addition & 1 deletion hack/local-up-karmada.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ MEMBER_CLUSTER_2_TMP_CONFIG="${KUBECONFIG_PATH}/${MEMBER_TMP_CONFIG_PREFIX}-${ME
PULL_MODE_CLUSTER_TMP_CONFIG="${KUBECONFIG_PATH}/${MEMBER_TMP_CONFIG_PREFIX}-${PULL_MODE_CLUSTER_NAME}.config"
HOST_IPADDRESS=${1:-}

CLUSTER_VERSION=${CLUSTER_VERSION:-"kindest/node:v1.27.3"}
CLUSTER_VERSION=${CLUSTER_VERSION:-"${DEFAULT_CLUSTER_VERSION}"}
KIND_LOG_FILE=${KIND_LOG_FILE:-"/tmp/karmada"}

#step0: prepare
Expand Down
2 changes: 2 additions & 0 deletions hack/util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ KARMADA_GO_PACKAGE="github.com/karmada-io/karmada"

MIN_Go_VERSION=go1.20.0

DEFAULT_CLUSTER_VERSION="kindest/node:v1.27.3"

KARMADA_TARGET_SOURCE=(
karmada-aggregated-apiserver=cmd/aggregated-apiserver
karmada-controller-manager=cmd/controller-manager
Expand Down

0 comments on commit 186e137

Please sign in to comment.