ceph-csi/examples/cephfs/logs.sh
Madhu Rajanna 3c50cb124b Fix static check for .sh files
Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
2019-02-07 12:19:14 +00:00

16 lines
387 B
Bash
Executable File

#!/bin/bash
CONTAINER_NAME=csi-cephfsplugin
POD_NAME=$(kubectl get pods -l app=$CONTAINER_NAME -o=name | head -n 1)
function get_pod_status() {
echo -n "$(kubectl get "$POD_NAME" -o jsonpath="{.status.phase}")"
}
while [[ "$(get_pod_status)" != "Running" ]]; do
sleep 1
echo "Waiting for $POD_NAME (status $(get_pod_status))"
done
kubectl logs -f "$POD_NAME" -c "$CONTAINER_NAME"