Skip to content

Commit dd5bf59

Browse files
committed
Make CRD creation sequential
Signed-off-by: Grant Griffiths <[email protected]>
1 parent 6ea9b03 commit dd5bf59

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

deploy/kubernetes-1.17/deploy-hostpath.sh

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,19 +106,22 @@ update_image () {
106106

107107
# VolumeSnapshot CRDs are installed by cluster addon manager, which may
108108
# not be available at this point. Run this as a background process.
109-
function wait-for-apiserver-and-update-volumesnapshot {
109+
function create-crds-and-wait-for-apiserver {
110110
# Wait until volumesnapshot CRDs are in place.
111+
kubectl apply -f ${BASE_DIR}/snapshotter/crd/snapshot.storage.k8s.io_volumesnapshotclasses.yaml
111112
until kubectl get volumesnapshotclasses.snapshot.storage.k8s.io
112113
do
113114
sleep 10
114115
done
115116

116-
until kubectl get volumesnapshotcontents.snapshot.storage.k8s.io
117+
kubectl apply -f ${BASE_DIR}/snapshotter/crd/snapshot.storage.k8s.io_volumesnapshots.yaml
118+
until kubectl get volumesnapshots.snapshot.storage.k8s.io
117119
do
118120
sleep 10
119121
done
120122

121-
until kubectl get volumesnapshots.snapshot.storage.k8s.io
123+
kubectl apply -f ${BASE_DIR}/snapshotter/crd/snapshot.storage.k8s.io_volumesnapshotcontents.yaml
124+
until kubectl get volumesnapshotcontents.snapshot.storage.k8s.io
122125
do
123126
sleep 10
124127
done
@@ -135,7 +138,7 @@ kubectl apply -f ${BASE_DIR}/snapshotter/crd
135138

136139
# wait until CRDs are ready
137140
echo "waiting for CRDs to be ready"
138-
wait-for-apiserver-and-update-volumesnapshot
141+
create-crds-and-wait-for-apiserver
139142

140143
# rbac rules
141144
echo "applying RBAC rules"

0 commit comments

Comments
 (0)