mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-30 08:50:20 +00:00
3c50cb124b
Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
16 lines
395 B
Bash
Executable File
16 lines
395 B
Bash
Executable File
#!/bin/bash
|
|
|
|
CONTAINER_NAME=csi-rbdplugin
|
|
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 exec -it "${POD_NAME#*/}" -c "$CONTAINER_NAME" bash
|