Skip to content

Commit

Permalink
fixed minor_version calucation of kubectl
Browse files Browse the repository at this point in the history
fixed minor_version calculation of kubectl 

Fixes: #4072

Signed-off-by: ASHUTOS RATH <[email protected]>
  • Loading branch information
ashutosrath authored and LiilyZhang committed Jul 19, 2024
1 parent 5ed9120 commit 1d653b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion agent-install/agent-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1564,7 +1564,7 @@ function get_kubernetes_version() {
major_version=$($KUBECTL version -o json | jq '.serverVersion.major' | sed s/\"//g)
minor_version=$($KUBECTL version -o json | jq '.serverVersion.minor' | sed s/\"//g)
if [ "${minor_version:0-1}" == "+" ]; then
minor_version=${minor_version::-1}
minor_version=${minor_version::$((${#minor_version} - 1))}
fi

full_version="$major_version.$minor_version"
Expand Down

0 comments on commit 1d653b8

Please sign in to comment.