|
7 | 7 | # Assumes bin/common.sh has been sourced
|
8 | 8 |
|
9 | 9 | if [ ! "$(which kubectl)" ]; then
|
10 |
| - log_error "kubectl not found on the current PATH" |
11 |
| - exit 1 |
| 10 | + log_error "kubectl not found on the current PATH" |
| 11 | + exit 1 |
12 | 12 | fi
|
13 | 13 |
|
14 | 14 | KUBE_CLIENT_VER=$(kubectl version --output=json | tr -d '\n' | tr -s " " | sed -E 's/^\{.*"clientVersion": \{([^\}]+)}.*/\1\n/' | sed -E 's/.*"gitVersion": "([^\"]*)".*$/\1/')
|
15 | 15 | KUBE_SERVER_VER=$(kubectl version --output=json | tr -d '\n' | tr -s " " | sed -E 's/^\{.*"serverVersion": \{([^\}]+)}.*/\1\n/' | sed -E 's/.*"gitVersion": "([^\"]*)".*$/\1/')
|
16 | 16 |
|
17 | 17 | if [[ "$KUBE_CLIENT_VER" =~ v([0-9]+)\.([0-9]+)\.([0-9]+) ]]; then
|
18 |
| - KUBE_CLIENT_MAJOR=${BASH_REMATCH[1]} |
19 |
| - KUBE_CLIENT_MINOR=${BASH_REMATCH[2]} |
20 |
| - KUBE_CLIENT_PATCH=${BASH_REMATCH[3]} |
21 |
| - log_debug "Kubernetes CLIENT - Major: [$KUBE_CLIENT_MAJOR] Minor: [$KUBE_CLIENT_MINOR] Patch: [$KUBE_CLIENT_PATCH]" |
| 18 | + KUBE_CLIENT_MAJOR=${BASH_REMATCH[1]} |
| 19 | + KUBE_CLIENT_MINOR=${BASH_REMATCH[2]} |
| 20 | + KUBE_CLIENT_PATCH=${BASH_REMATCH[3]} |
| 21 | + log_debug "Kubernetes CLIENT - Major: [$KUBE_CLIENT_MAJOR] Minor: [$KUBE_CLIENT_MINOR] Patch: [$KUBE_CLIENT_PATCH]" |
22 | 22 | else
|
23 |
| - log_error "Kubernetes Client Version does not match expected pattern."; |
| 23 | + log_error "Kubernetes Client Version does not match expected pattern."; |
24 | 24 | fi;
|
25 | 25 |
|
26 | 26 | if [[ "$KUBE_SERVER_VER" =~ v([0-9]+)\.([0-9]+)\.([0-9]+) ]]; then
|
27 |
| - KUBE_SERVER_MAJOR=${BASH_REMATCH[1]} |
28 |
| - KUBE_SERVER_MINOR=${BASH_REMATCH[2]} |
29 |
| - KUBE_SERVER_PATCH=${BASH_REMATCH[3]} |
30 |
| - log_debug "Kubernetes SERVER - Major: [$KUBE_SERVER_MAJOR] Minor: [$KUBE_SERVER_MINOR] Patch: [$KUBE_SERVER_PATCH]" |
| 27 | + KUBE_SERVER_MAJOR=${BASH_REMATCH[1]} |
| 28 | + KUBE_SERVER_MINOR=${BASH_REMATCH[2]} |
| 29 | + KUBE_SERVER_PATCH=${BASH_REMATCH[3]} |
| 30 | + log_debug "Kubernetes SERVER - Major: [$KUBE_SERVER_MAJOR] Minor: [$KUBE_SERVER_MINOR] Patch: [$KUBE_SERVER_PATCH]" |
31 | 31 | else
|
32 |
| - log_error "Kubernetes SERVER Version does not match expected pattern."; |
| 32 | + log_error "Kubernetes SERVER Version does not match expected pattern."; |
33 | 33 | fi;
|
34 | 34 |
|
35 | 35 | # SAS Viya 4 versions
|
36 | 36 | # supported by SAS Tech Support
|
37 |
| -# Updated: 20MAR25 |
| 37 | +# Updated: 18APR25 |
38 | 38 | # 2023.03 LTS 1.23 1.25 (EOL: 1.23, 1.24)
|
39 | 39 | # 2023.10 LTS 1.25 1.27
|
40 | 40 | # 2024.03 LTS 1.26 1.28
|
41 | 41 | # 2024.09 LTS 1.28 1.30
|
42 |
| -# 2024.12 1.28 1.30 |
43 | 42 | # 2025.01 1.28 1.30
|
44 | 43 | # 2025.02 1.29 1.31
|
45 | 44 | # 2025.03 1.29 1.31
|
46 |
| - |
| 45 | +# 2025.04 1.29 1.31 |
47 | 46 |
|
48 | 47 | # Client version allowed to be one minor version earlier than minimum server version
|
49 | 48 | if [ "$KUBE_CLIENT_MAJOR" -eq "1" ] && [ "$KUBE_CLIENT_MINOR" -gt "22" ]; then
|
50 |
| - : |
| 49 | + : |
51 | 50 | else
|
52 |
| - log_warn "Unsupported kubectl version: [$KUBE_CLIENT_VER]." |
53 |
| - log_warn "This script might not work as expected. Support might not be available until kubectl is upgraded to a supported version." |
| 51 | + log_warn "Unsupported kubectl version: [$KUBE_CLIENT_VER]." |
| 52 | + log_warn "This script might not work as expected. Support might not be available until kubectl is upgraded to a supported version." |
54 | 53 | fi
|
55 | 54 |
|
56 |
| -if [ "$KUBE_SERVER_MAJOR" -eq "1" ] && [ "$KUBE_SERVER_MINOR" -gt "23" ]; then |
57 |
| - : |
| 55 | +if [ "$KUBE_SERVER_MAJOR" -eq "1" ] && [ "$KUBE_SERVER_MINOR" -gt "23" ]; then |
| 56 | + : |
58 | 57 | else
|
59 |
| - log_warn "The detected version of Kubernetes [$KUBE_SERVER_VER] is not supported by any of the currently supported releases of SAS Viya." |
60 |
| - log_warn "This script might not work as expected. Support might not be available until Kubernetes is upgraded to a supported version." |
| 58 | + log_warn "The detected version of Kubernetes [$KUBE_SERVER_VER] is not supported by any of the currently supported releases of SAS Viya." |
| 59 | + log_warn "This script might not work as expected. Support might not be available until Kubernetes is upgraded to a supported version." |
61 | 60 | fi
|
62 | 61 |
|
63 | 62 | export KUBE_CLIENT_VER="$KUBE_CLIENT_VER"
|
|
0 commit comments