diff --git a/ceph-provisioners/templates/bin/_helm-tests.sh.tpl b/ceph-provisioners/templates/bin/_helm-tests.sh.tpl index f0ade3e59..f3d296148 100644 --- a/ceph-provisioners/templates/bin/_helm-tests.sh.tpl +++ b/ceph-provisioners/templates/bin/_helm-tests.sh.tpl @@ -64,11 +64,16 @@ spec: EOF # waiting for pvc to get create - sleep 30 - if ! kubectl get pvc -n $pvc_namespace $pvc_name|grep Bound; then - echo "Storageclass is available but can't create PersistentVolumeClaim." - exit 1 - fi + end=$(($(date +%s) + 120)) + while ! kubectl get pvc -n $pvc_namespace $pvc_name|grep Bound; do + if [ "$(date +%s)" -gt $end ]; then + kubectl get pvc -n $pvc_namespace $pvc_name + kubectl get pv + echo "Storageclass is available but can't create PersistentVolumeClaim." + exit 1 + fi + sleep 10 + done tee <