From eafab799b51d07bd376869abf64d73e462feb08b Mon Sep 17 00:00:00 2001 From: Priyashetty17 Date: Tue, 6 Jan 2026 15:15:43 -0500 Subject: [PATCH] fallback k8s version to latest --- .github/scripts/platform-qa-get-k8s-version.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/scripts/platform-qa-get-k8s-version.sh b/.github/scripts/platform-qa-get-k8s-version.sh index 8da0a1418..065ff3666 100755 --- a/.github/scripts/platform-qa-get-k8s-version.sh +++ b/.github/scripts/platform-qa-get-k8s-version.sh @@ -22,6 +22,9 @@ K8S_VERSIONS=$(curl -sf "$DATA_URL" \ | sort -V) MIN_K8S=$(echo "$K8S_VERSIONS" | grep -E "^${MIN_K8S_RAW%.*}" | head -n1) MAX_K8S=$(echo "$K8S_VERSIONS" | grep -E "^${MAX_K8S_RAW%.*}" | tail -n1) +if [ -z "$MAX_K8S" ]; then + MAX_K8S=$(echo "$K8S_VERSIONS" | tail -n1) +fi K8S_VERSION=$(echo "$K8S_VERSIONS" | sort -V | awk -v min="$MIN_K8S" -v max="$MAX_K8S" '$0 >= min && $0 <= max' | tail -n1) if [ -z "$K8S_VERSION" ]; then