@@ -325,7 +325,7 @@ configvar CSI_PROW_E2E_MOCK "$(if [ "${CSI_PROW_DRIVER_CANARY}" = "canary" ] &&
325325
326326# Regex for non-alpha, feature-tagged tests that should be run.
327327#
328- configvar CSI_PROW_E2E_FOCUS_LATEST ' \[Feature:VolumeSnapshotDataSource\]' " non-alpha, feature-tagged tests for latest Kubernetes version"
328+ configvar CSI_PROW_E2E_FOCUS_LATEST ' \[Feature:VolumeSnapshotDataSource\]|VolumeGroupSnapshottable ' " non-alpha, feature-tagged tests for latest Kubernetes version"
329329configvar CSI_PROW_E2E_FOCUS " $( get_versioned_variable CSI_PROW_E2E_FOCUS " ${csi_prow_kubernetes_version_suffix} " ) " " non-alpha, feature-tagged tests"
330330
331331# Serial vs. parallel is always determined by these regular expressions.
@@ -381,6 +381,7 @@ default_csi_snapshotter_version () {
381381 echo " v4.0.0"
382382 fi
383383}
384+ export CSI_SNAPSHOTTER_HACK_VERSION=" master"
384385configvar CSI_SNAPSHOTTER_VERSION " $( default_csi_snapshotter_version) " " external-snapshotter version tag"
385386
386387# Enable installing VolumeGroupSnapshot CRDs (off by default, can be set to true in prow jobs)
@@ -777,7 +778,7 @@ install_csi_driver () {
777778# Installs all necessary snapshotter CRDs
778779install_snapshot_crds () {
779780 # Wait until volumesnapshot CRDs are in place.
780- CRD_BASE_DIR=" https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/${CSI_SNAPSHOTTER_VERSION } /client/config/crd"
781+ CRD_BASE_DIR=" https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/${CSI_SNAPSHOTTER_HACK_VERSION } /client/config/crd"
781782 if [[ ${REPO_DIR} == * " external-snapshotter" * ]]; then
782783 CRD_BASE_DIR=" ${REPO_DIR} /client/config/crd"
783784 fi
@@ -797,21 +798,10 @@ install_snapshot_crds() {
797798 cnt=$(( cnt + 1 ))
798799 sleep 2
799800 done
800- }
801-
802- # Installs VolumeGroupSnapshot CRDs (VolumeGroupSnapshot, VolumeGroupSnapshotContent, VolumeGroupSnapshotClass)
803- install_volumegroupsnapshot_crds () {
804- local crd_base_dir=" https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/${CSI_SNAPSHOTTER_VERSION} /client/config/crd"
805-
806- # If we are running inside the external-snapshotter repo, use local files instead of GitHub
807- if [[ ${REPO_DIR} == * " external-snapshotter" * ]]; then
808- crd_base_dir=" ${REPO_DIR} /client/config/crd"
809- fi
810-
811801 echo " Installing VolumeGroupSnapshot CRDs from ${crd_base_dir} "
812- kubectl apply -f " ${crd_base_dir } /groupsnapshot.storage.k8s.io_volumegroupsnapshotclasses.yaml" --validate=false
813- kubectl apply -f " ${crd_base_dir } /groupsnapshot.storage.k8s.io_volumegroupsnapshotcontents.yaml" --validate=false
814- kubectl apply -f " ${crd_base_dir } /groupsnapshot.storage.k8s.io_volumegroupsnapshots.yaml" --validate=false
802+ kubectl apply -f " ${CRD_BASE_DIR } /groupsnapshot.storage.k8s.io_volumegroupsnapshotclasses.yaml" --validate=false
803+ kubectl apply -f " ${CRD_BASE_DIR } /groupsnapshot.storage.k8s.io_volumegroupsnapshotcontents.yaml" --validate=false
804+ kubectl apply -f " ${CRD_BASE_DIR } /groupsnapshot.storage.k8s.io_volumegroupsnapshots.yaml" --validate=false
815805
816806 local cnt=0
817807 until kubectl get volumegroupsnapshotclasses.groupsnapshot.storage.k8s.io \
@@ -827,12 +817,12 @@ install_volumegroupsnapshot_crds() {
827817 done
828818
829819 echo " VolumeGroupSnapshot CRDs installed and ready"
830- }
831820
821+ }
832822
833823# Install snapshot controller and associated RBAC, retrying until the pod is running.
834824install_snapshot_controller () {
835- CONTROLLER_DIR=" https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/${CSI_SNAPSHOTTER_VERSION } "
825+ CONTROLLER_DIR=" https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/${CSI_SNAPSHOTTER_HACK_VERSION } "
836826 if [[ ${REPO_DIR} == * " external-snapshotter" * ]]; then
837827 CONTROLLER_DIR=" ${REPO_DIR} "
838828 fi
@@ -895,6 +885,12 @@ install_snapshot_controller() {
895885 line=" $( echo " $nocomments " | sed -e " s;$image ;${name} :${NEW_TAG} ;" ) "
896886 echo " using $line " >&2
897887 fi
888+ # inject feature gate after leader election arg
889+ if echo " $nocomments " | grep -q ' ^[[:space:]]*- "--leader-election=true"' ; then
890+ echo " $line "
891+ echo " - \" --feature-gates=CSIVolumeGroupSnapshot=true\" "
892+ continue
893+ fi
898894 echo " $line "
899895 done)"
900896 if ! echo " $modified " | kubectl apply -f -; then
@@ -910,13 +906,14 @@ install_snapshot_controller() {
910906 # shellcheck disable=SC2001
911907 modified=" $( echo " $yaml " | sed -e " s;image: .*/\([^/:]*\):.*;image: ${CSI_PROW_DRIVER_CANARY_REGISTRY} /\1:canary;" ) "
912908 diff <(echo " $yaml " ) <(echo " $modified " )
909+
913910 if ! echo " $modified " | kubectl apply -f -; then
914911 echo " modified version of $SNAPSHOT_CONTROLLER_YAML :"
915912 echo " $modified "
916913 exit 1
917914 fi
918915 else
919- if [ " ${CSI_PROW_ENABLE_GROUP_SNAPSHOT} " = " true " ] ; then
916+ if ${CSI_PROW_ENABLE_GROUP_SNAPSHOT} ; then
920917 echo " Deploying snapshot-controller with CSIVolumeGroupSnapshot feature gate enabled"
921918 curl -s " $SNAPSHOT_CONTROLLER_YAML " | \
922919 awk '/--leader-election=true/ {print; print " - \" --feature-gates=CSIVolumeGroupSnapshot=true\" " ; next}1' | \
@@ -1432,12 +1429,6 @@ main () {
14321429 install_snapshot_crds
14331430 install_snapshot_controller
14341431
1435- # TODO: Remove the condition after the vgs GA
1436- if ${CSI_PROW_ENABLE_GROUP_SNAPSHOT} ; then
1437- install_volumegroupsnapshot_crds
1438- fi
1439-
1440-
14411432 # Installing the driver might be disabled.
14421433 if ${CSI_PROW_DRIVER_INSTALL} " $images " ; then
14431434 collect_cluster_info
0 commit comments