fix: Remove unsupported '--short' flag from kubectl version command

The '--short' flag was causing an error ("unknown flag: --short") when checking the kubectl client version.
Tested on Client Version: v1.28.0
This commit is contained in:
Marcelo Cyreno 2023-08-24 12:38:34 -03:00 committed by Marcelo Cyreno
parent cee39f68ef
commit e19da463b8

View file

@ -52,7 +52,7 @@ if [[ ${HELM_VERSION} -lt 3.10.0 ]]; then
exit 1
fi
KUBE_CLIENT_VERSION=$(kubectl version --client --short 2>/dev/null | grep Client | awk '{print $3}' | cut -d. -f2) || true
KUBE_CLIENT_VERSION=$(kubectl version --client 2>/dev/null | grep Client | awk '{print $3}' | cut -d. -f2) || true
if [[ ${KUBE_CLIENT_VERSION} -lt 24 ]]; then
echo "Please update kubectl to 1.24.2 or higher"
exit 1