Files
stream-applications/scripts/count-runners-idle.sh
GitHub Actions Bot 251e1fb998 Release 4.0.0-M2
2023-05-25 11:30:19 +00:00

7 lines
250 B
Bash
Executable File

#!/bin/bash
if [ "$1" = "" ]; then
echo "RunnerDeployment name required"
exit 1
fi
DEPLOYMENT_NAME="$1"
kubectl get runners -l runner-deployment-name="$DEPLOYMENT_NAME" --output=json | jq '.items | map(.status) | .[] | .phase' | grep -c -F "Idle"