infctl-cli/scripts/check_crunchy_operator.sh

9 lines
326 B
Bash
Raw Normal View History

#!/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