Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[chore]Update comment re:K8s version support matrix #599

Merged
merged 2 commits into from
Dec 20, 2023
Merged

Conversation

gsmith-sas
Copy link
Member

No description provided.

@gsmith-sas gsmith-sas requested a review from cumcke December 19, 2023 16:57
Copy link
Contributor

sh-checker report

To get the full details, please check in the job output.

shellcheck errors

'shellcheck -e SC1004' returned error 1 finding the following syntactical issues:

----------

In bin/kube-include.sh line 9:
if [ ! $(which kubectl) ]; then
       ^--------------^ SC2046 (warning): Quote this to prevent word splitting.

For more information:
  https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt...
----------

You can address the above issues in one of three ways:
1. Manually correct the issue in the offending shell script;
2. Disable specific issues by adding the comment:
  # shellcheck disable=NNNN
above the line that contains the issue, where NNNN is the error code;
3. Add '-e NNNN' to the SHELLCHECK_OPTS setting in your .yml action file.



shfmt errors

'shfmt -s' returned error 1 finding the following formatting issues:

----------
--- bin/kube-include.sh.orig
+++ bin/kube-include.sh
@@ -7,8 +7,8 @@
 # Assumes bin/common.sh has been sourced
 
 if [ ! $(which kubectl) ]; then
-  log_error "kubectl not found on the current PATH"
-  exit 1
+	log_error "kubectl not found on the current PATH"
+	exit 1
 fi
 
 KUBE_CLIENT_VER=$(kubectl version --short | grep 'Client Version' | awk '{print $3}' 2>/dev/null)
@@ -16,10 +16,10 @@
 
 # Client version allowed to be one minor version earlier than minimum server version
 if [[ $KUBE_CLIENT_VER =~ v1.2[0-9] ]]; then
-  :
-else 
-  log_warn "Unsupported kubectl version: [$KUBE_CLIENT_VER]."
-  log_warn "This script might not work as expected. Support might not be available until kubectl is upgraded to a supported version."
+	:
+else
+	log_warn "Unsupported kubectl version: [$KUBE_CLIENT_VER]."
+	log_warn "This script might not work as expected. Support might not be available until kubectl is upgraded to a supported version."
 fi
 
 # SAS Viya 4 versions
@@ -33,10 +33,10 @@
 # 2023.11     1.25 1.27
 # 2023.12     1.25 1.27
 if [[ $KUBE_SERVER_VER =~ v1.2[1-9] ]]; then
-  :
-else 
-  log_warn "The detected version of Kubernetes [$KUBE_SERVER_VER] is not supported by any of the currently supported releases of SAS Viya."
-  log_warn "This script might not work as expected. Support might not be available until Kubernetes is upgraded to a supported version."
+	:
+else
+	log_warn "The detected version of Kubernetes [$KUBE_SERVER_VER] is not supported by any of the currently supported releases of SAS Viya."
+	log_warn "This script might not work as expected. Support might not be available until Kubernetes is upgraded to a supported version."
 fi
 
 export KUBE_CLIENT_VER="$KUBE_CLIENT_VER"
----------

You can reformat the above files to meet shfmt's requirements by typing:

  shfmt -s -w filename


Copy link
Contributor

sh-checker report

To get the full details, please check in the job output.

shellcheck errors
'shellcheck -e SC1004' found no issues.

shfmt errors

'shfmt -s' returned error 1 finding the following formatting issues:

----------
--- bin/kube-include.sh.orig
+++ bin/kube-include.sh
@@ -7,8 +7,8 @@
 # Assumes bin/common.sh has been sourced
 
 if [ ! "$(which kubectl)" ]; then
-  log_error "kubectl not found on the current PATH"
-  exit 1
+	log_error "kubectl not found on the current PATH"
+	exit 1
 fi
 
 KUBE_CLIENT_VER=$(kubectl version --short | grep 'Client Version' | awk '{print $3}' 2>/dev/null)
@@ -16,10 +16,10 @@
 
 # Client version allowed to be one minor version earlier than minimum server version
 if [[ $KUBE_CLIENT_VER =~ v1.2[0-9] ]]; then
-  :
-else 
-  log_warn "Unsupported kubectl version: [$KUBE_CLIENT_VER]."
-  log_warn "This script might not work as expected. Support might not be available until kubectl is upgraded to a supported version."
+	:
+else
+	log_warn "Unsupported kubectl version: [$KUBE_CLIENT_VER]."
+	log_warn "This script might not work as expected. Support might not be available until kubectl is upgraded to a supported version."
 fi
 
 # SAS Viya 4 versions
@@ -33,10 +33,10 @@
 # 2023.11     1.25 1.27
 # 2023.12     1.25 1.27
 if [[ $KUBE_SERVER_VER =~ v1.2[1-9] ]]; then
-  :
-else 
-  log_warn "The detected version of Kubernetes [$KUBE_SERVER_VER] is not supported by any of the currently supported releases of SAS Viya."
-  log_warn "This script might not work as expected. Support might not be available until Kubernetes is upgraded to a supported version."
+	:
+else
+	log_warn "The detected version of Kubernetes [$KUBE_SERVER_VER] is not supported by any of the currently supported releases of SAS Viya."
+	log_warn "This script might not work as expected. Support might not be available until Kubernetes is upgraded to a supported version."
 fi
 
 export KUBE_CLIENT_VER="$KUBE_CLIENT_VER"
----------

You can reformat the above files to meet shfmt's requirements by typing:

  shfmt -s -w filename


@gsmith-sas gsmith-sas requested a review from ceelias December 20, 2023 14:34
@gsmith-sas gsmith-sas merged commit 4cecb8b into main Dec 20, 2023
1 check failed
@gsmith-sas gsmith-sas deleted the sos2401b branch December 20, 2023 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants