Skip to content

Commit

Permalink
Fix ComponentStatus (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
Napsty committed Sep 9, 2022
1 parent 5dd9040 commit 14b4aa5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions check_rancher2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -340,8 +340,8 @@ if [[ -z $clustername ]]; then
#echo $cluster # For Debug
clusteralias=$(echo "$api_out_clusters" | jq -r '.data[] | select(.id == "'${cluster}'")|.name')
declare -a clusterstate=( $(echo "$api_out_clusters" | jq -r '.data[] | select(.id == "'${cluster}'") | .state') )
declare -a component=( $(echo "$api_out_clusters" | jq -r '.data[] | select(.id == "'${cluster}'") | .componentStatuses[].name') )
declare -a healthstatus=( $(echo "$api_out_clusters" | jq -r '.data[] | select(.id == "'${cluster}'") | .componentStatuses[].conditions[].status') )
declare -a component=( $(echo "$api_out_clusters" | jq -r '.data[] | select(.id == "'${cluster}'") | .componentStatuses[]?.name') )
declare -a healthstatus=( $(echo "$api_out_clusters" | jq -r '.data[] | select(.id == "'${cluster}'") | .componentStatuses[]?.conditions[].status') )

if [[ "${clusterstate}" != "active" ]]; then
componenterrors[$e]="cluster ${clusteralias} is in ${clusterstate} state -"
Expand Down

0 comments on commit 14b4aa5

Please sign in to comment.