Skip to content

Commit 7bb4d65

Browse files
committed
Create snapshotclass based on snapshotter sidecar version
Signed-off-by: Grant Griffiths <[email protected]>
1 parent 03f4262 commit 7bb4d65

File tree

5 files changed

+3
-24
lines changed

5 files changed

+3
-24
lines changed

deploy/kubernetes-1.14/snapshotter/csi-hostpath-snapshotclass.yaml

-5
This file was deleted.

deploy/kubernetes-1.15/snapshotter/csi-hostpath-snapshotclass.yaml

-5
This file was deleted.

deploy/kubernetes-1.16/snapshotter/csi-hostpath-snapshotclass.yaml

-5
This file was deleted.

deploy/kubernetes-1.17/snapshotter/csi-hostpath-snapshotclass.yaml

-6
This file was deleted.

deploy/util/deploy-hostpath.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,6 @@ while [ $(kubectl get pods 2>/dev/null | grep '^csi-hostpath.* Running ' | wc -l
218218
done
219219
220220
# deploy snapshotclass
221-
echo "deploying snapshotclass"
222-
SNAPSHOTCLASS_PATH="${BASE_DIR}/snapshotter/csi-hostpath-snapshotclass.yaml"
223-
kubectl apply -f $SNAPSHOTCLASS_PATH
221+
echo "deploying snapshotclass based on snapshotter version"
222+
snapshotter_version="$(rbac_version "${BASE_DIR}/hostpath/csi-hostpath-snapshotter.yaml" csi-snapshotter false)"
223+
kubectl apply -f "https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/${snapshotter_version}/examples/kubernetes/snapshotclass.yaml"

0 commit comments

Comments
 (0)