diff --git a/deploy/kubernetes-1.17/deploy-hostpath.sh b/deploy/kubernetes-1.17/deploy-hostpath.sh index 2bbedc2ae..2afc4868d 100755 --- a/deploy/kubernetes-1.17/deploy-hostpath.sh +++ b/deploy/kubernetes-1.17/deploy-hostpath.sh @@ -106,19 +106,22 @@ update_image () { # VolumeSnapshot CRDs are installed by cluster addon manager, which may # not be available at this point. Run this as a background process. -function wait-for-apiserver-and-update-volumesnapshot { +function create-crds-and-wait-for-apiserver { # Wait until volumesnapshot CRDs are in place. + kubectl apply -f ${BASE_DIR}/snapshotter/crd/snapshot.storage.k8s.io_volumesnapshotclasses.yaml until kubectl get volumesnapshotclasses.snapshot.storage.k8s.io do sleep 10 done - until kubectl get volumesnapshotcontents.snapshot.storage.k8s.io + kubectl apply -f ${BASE_DIR}/snapshotter/crd/snapshot.storage.k8s.io_volumesnapshots.yaml + until kubectl get volumesnapshots.snapshot.storage.k8s.io do sleep 10 done - until kubectl get volumesnapshots.snapshot.storage.k8s.io + kubectl apply -f ${BASE_DIR}/snapshotter/crd/snapshot.storage.k8s.io_volumesnapshotcontents.yaml + until kubectl get volumesnapshotcontents.snapshot.storage.k8s.io do sleep 10 done @@ -135,7 +138,7 @@ kubectl apply -f ${BASE_DIR}/snapshotter/crd # wait until CRDs are ready echo "waiting for CRDs to be ready" -wait-for-apiserver-and-update-volumesnapshot +create-crds-and-wait-for-apiserver # rbac rules echo "applying RBAC rules"