Skip to content

Commit 63f6a60

Browse files
committed
change to jq match (alphanum, not hex)
1 parent 5ec222a commit 63f6a60

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/cplane/kube_dashboard.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,12 +173,13 @@ function verify_kube_dashboard {
173173
fi
174174

175175
# If the dashboard is running correctly then it will report back the pods list
176-
dashboard_state=$(kubectl get pods -n ${NAMESPACE} -o json 2>/dev/null | jq -r '.items[] | select(.metadata.name | match("kubernetes-dashboard-[0-9a-f]{10}-[0-9a-f]")) | .status.phase')
176+
dashboard_state=$(kubectl get pods -n ${NAMESPACE} -o json 2>/dev/null | jq -r '.items[] | select(.metadata.name | match("kubernetes-dashboard-[0-9a-z]{10}-[0-9a-z]{5}")) | .status.phase')
177177

178178
elapsed=$((elapsed + interval))
179179
if [ "${dashboard_state}" == "Running" ]; then
180180
break
181181
elif [ ${elapsed} -lt ${timeout} ]; then
182+
echo "⏳ Current State: '${dashboard_state}', sleep and retry"
182183
sleep ${interval}
183184
fi
184185
done

0 commit comments

Comments
 (0)