We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5a4616d commit 776a090Copy full SHA for 776a090
deploy/util/deploy-hostpath.sh
@@ -218,6 +218,9 @@ while [ $(kubectl get pods 2>/dev/null | grep '^csi-hostpath.* Running ' | wc -l
218
done
219
220
# deploy snapshotclass
221
-echo "deploying snapshotclass"
222
-SNAPSHOTCLASS_PATH="${BASE_DIR}/snapshotter/csi-hostpath-snapshotclass.yaml"
223
-kubectl apply -f $SNAPSHOTCLASS_PATH
+echo "deploying snapshotclass based on snapshotter version"
+snapshotter_version="$(rbac_version "${BASE_DIR}/hostpath/csi-hostpath-snapshotter.yaml" csi-snapshotter false)"
+driver_version="$(basename $PWD)"
224
+if [ version_gt $driver_version "1.16" ]; then
225
+ kubectl apply -f "https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/${snapshotter_version}/examples/kubernetes/snapshotclass.yaml"
226
+fi
0 commit comments