9 lines
326 B
Bash
9 lines
326 B
Bash
|
|
#!/usr/bin/env bash
|
||
|
|
|
||
|
|
output=$(kubectl -n postgres-operator get pods --selector=postgres-operator.crunchydata.com/control-plane=postgres-operator --field-selector=status.phase=Running 2>&1)
|
||
|
|
if echo "$output" | grep -iq 'running'; then
|
||
|
|
echo "At least one pod is running."
|
||
|
|
else
|
||
|
|
echo "No running pods found."
|
||
|
|
exit 1
|
||
|
|
fi
|