File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ usage() {
58
58
exit 2
59
59
}
60
60
61
- VERSION=" v1.3.1 "
61
+ VERSION=" v1.3.2 "
62
62
63
63
TIMEOUT=15
64
64
unset NAME
@@ -660,15 +660,17 @@ mode_statefulsets() {
660
660
jq -r " .items[] | select(.metadata.namespace==\" $ns \" ) | \
661
661
.metadata.name" ) )
662
662
fi
663
- for rs in " ${statefulsets[@]} " ; do
663
+ for sts in " ${statefulsets[@]} " ; do
664
664
declare -A statusArr
665
665
while IFS=" =" read -r key value; do
666
666
statusArr[$key ]=" $value "
667
667
done < <( echo " $data " | \
668
- jq -r " .items[] | select(.metadata.namespace==\" $ns \" and .metadata.name==\" $rs \" ) | \
668
+ jq -r " .items[] | select(.metadata.namespace==\" $ns \" and .metadata.name==\" $sts \" ) | \
669
669
.status | to_entries | map(\" \(.key)=\(.value)\" ) | .[]" )
670
- OUTPUT=" ${OUTPUT} Statefulset $ns /$rs ${statusArr[readyReplicas]} /${statusArr[currentReplicas]} ready\n"
671
- if [ " ${statusArr[readyReplicas]} " != " ${statusArr[currentReplicas]} " ]; then
670
+ if [ " $EXITCODE " == 0 ]; then
671
+ OUTPUT=" Statefulset $ns /$sts ${statusArr[availableReplicas]} /${statusArr[currentReplicas]} ready\n"
672
+ fi
673
+ if [ " ${statusArr[availableReplicas]} " != " ${statusArr[currentReplicas]} " ]; then
672
674
(( count_failed++ ))
673
675
EXITCODE=2
674
676
else
You can’t perform that action at this time.
0 commit comments