Skip to content

Commit

Permalink
Merge pull request #3480 from wangyysde/fix_issue_3476
Browse files Browse the repository at this point in the history
fix bug3476
  • Loading branch information
volcano-sh-bot authored May 24, 2024
2 parents f41ae8a + e49e23b commit 70a483b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion hack/lib/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ function check-prerequisites {
echo -e "\033[31mERROR\033[0m: kubectl not installed"
exit 1
else
echo -n "Found kubectl, version: " && kubectl version --short --client
echo -n "Found kubectl, version: " && kubectl version --client
fi
}

Expand Down
8 changes: 2 additions & 6 deletions hack/run-e2e-kind.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,13 @@ export CLUSTER_CONTEXT="--name ${CLUSTER_NAME}"

export KIND_OPT=${KIND_OPT:="--config ${VK_ROOT}/hack/e2e-kind-config.yaml"}

function get-k8s-server-version {
echo $(kubectl version --short=true | grep Server | sed "s/.*: v//" | tr "." " ")
}

function install-volcano {
install-helm

# judge crd version
serverVersion=($(get-k8s-server-version))
major=${serverVersion[0]}
minor=${serverVersion[1]}
major=$(kubectl version --output yaml | awk '/serverVersion/,0' |grep -E 'major:' | awk '{print $2}' | tr "\"" " ")
minor=$(kubectl version --output yaml | awk '/serverVersion/,0' |grep -E 'minor:' | awk '{print $2}' | tr "\"" " ")
crd_version="v1"
# if k8s version less than v1.18, crd version use v1beta
if [ "$major" -le "1" ]; then
Expand Down

0 comments on commit 70a483b

Please sign in to comment.