mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 18:43:34 +00:00
ci: fix shell check failures
Signed-off-by: riya-singhal31 <rsinghal@redhat.com>
This commit is contained in:
committed by
mergify[bot]
parent
f12cd9c986
commit
44612fe34c
@ -27,21 +27,21 @@ function install_snapshot_controller() {
|
||||
namespace="kube-system"
|
||||
fi
|
||||
|
||||
create_or_delete_resource "create" ${namespace}
|
||||
create_or_delete_resource "create" "${namespace}"
|
||||
|
||||
pod_ready=$(kubectl get pods -l app=snapshot-controller -n ${namespace} -o jsonpath='{.items[0].status.containerStatuses[0].ready}')
|
||||
pod_ready=$(kubectl get pods -l app=snapshot-controller -n "${namespace}" -o jsonpath='{.items[0].status.containerStatuses[0].ready}')
|
||||
INC=0
|
||||
until [[ "${pod_ready}" == "true" || $INC -gt 20 ]]; do
|
||||
sleep 10
|
||||
((++INC))
|
||||
pod_ready=$(kubectl get pods -l app=snapshot-controller -n ${namespace} -o jsonpath='{.items[0].status.containerStatuses[0].ready}')
|
||||
pod_ready=$(kubectl get pods -l app=snapshot-controller -n "${namespace}" -o jsonpath='{.items[0].status.containerStatuses[0].ready}')
|
||||
echo "snapshotter pod status: ${pod_ready}"
|
||||
done
|
||||
|
||||
if [ "${pod_ready}" != "true" ]; then
|
||||
echo "snapshotter controller creation failed"
|
||||
kubectl get pods -l app=snapshot-controller -n ${namespace}
|
||||
kubectl describe po -l app=snapshot-controller -n ${namespace}
|
||||
kubectl get pods -l app=snapshot-controller -n "${namespace}"
|
||||
kubectl describe po -l app=snapshot-controller -n "${namespace}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@ -53,7 +53,7 @@ function cleanup_snapshot_controller() {
|
||||
if [ -z "${namespace}" ]; then
|
||||
namespace="kube-system"
|
||||
fi
|
||||
create_or_delete_resource "delete" ${namespace}
|
||||
create_or_delete_resource "delete" "${namespace}"
|
||||
}
|
||||
|
||||
function create_or_delete_resource() {
|
||||
|
Reference in New Issue
Block a user