Fix “dev-env” Makefile target to work with kubectl 1.28+

This commit is contained in:
Marcelo Cyreno 2023-08-24 12:38:34 -03:00 committed by Marcelo Cyreno
parent 8d0b00dd26
commit 228d3ee553

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 -oyaml 2>/dev/null | grep "minor:" | awk '{print $2}' | tr -d '"') || true
if [[ ${KUBE_CLIENT_VERSION} -lt 24 ]]; then
echo "Please update kubectl to 1.24.2 or higher"
exit 1