diff --git a/dell-csi-helm-installer/verify.sh b/dell-csi-helm-installer/verify.sh index d4ac3ce7..f2fab867 100755 --- a/dell-csi-helm-installer/verify.sh +++ b/dell-csi-helm-installer/verify.sh @@ -191,6 +191,18 @@ function verify_k8s_versions() { local MIN=${1} local MAX=${2} local V="${kMajorVersion}.${kMinorVersion}" + + # check non supported version (k8s alpha/beta) + if [ -n "${kNonGAVersion}" ]; then + echo "Installing on an unreleased version of Kubernetes : "${kNonGAVersion}". Acknowledge and proceed with installation? (y/n)" + read -n 1 -p "Press 'y' to continue or any other key to exit: " CONT + decho + if [ "${CONT}" != "Y" -a "${CONT}" != "y" ]; then + decho "quitting at user request" + exit 2 + fi + fi + # check minimum log arrow log smart_step "Verifying minimum Kubernetes version" "small" @@ -571,6 +583,7 @@ MASTER_NODES=$(run_command kubectl get nodes -o wide | awk ' /master/{ print $6; # Get the kubernetes major and minor version numbers. kMajorVersion=$(run_command kubectl version | grep 'Server Version' | sed -E 's/.*v([0-9]+)\.[0-9]+\.[0-9]+.*/\1/') kMinorVersion=$(run_command kubectl version | grep 'Server Version' | sed -E 's/.*v[0-9]+\.([0-9]+)\.[0-9]+.*/\1/') +kNonGAVersion=$(run_command kubectl version | grep 'Server Version' | sed -n 's/.*\(-[alpha|beta][^ ]*\).*/\1/p') while getopts ":h-:" optchar; do case "${optchar}" in