@@ -325,7 +325,7 @@ configvar CSI_PROW_E2E_MOCK "$(if [ "${CSI_PROW_DRIVER_CANARY}" = "canary" ] &&
325
325
326
326
# Regex for non-alpha, feature-tagged tests that should be run.
327
327
#
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\]|\[Feature:volumegroupsnapshot\] ' " non-alpha, feature-tagged tests for latest Kubernetes version"
329
329
configvar CSI_PROW_E2E_FOCUS " $( get_versioned_variable CSI_PROW_E2E_FOCUS " ${csi_prow_kubernetes_version_suffix} " ) " " non-alpha, feature-tagged tests"
330
330
331
331
# Serial vs. parallel is always determined by these regular expressions.
@@ -381,6 +381,7 @@ default_csi_snapshotter_version () {
381
381
echo " v4.0.0"
382
382
fi
383
383
}
384
+ export CSI_SNAPSHOTTER_HACK_VERSION=" master"
384
385
configvar CSI_SNAPSHOTTER_VERSION " $( default_csi_snapshotter_version) " " external-snapshotter version tag"
385
386
386
387
# Enable installing VolumeGroupSnapshot CRDs (off by default, can be set to true in prow jobs)
@@ -777,7 +778,7 @@ install_csi_driver () {
777
778
# Installs all necessary snapshotter CRDs
778
779
install_snapshot_crds () {
779
780
# 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"
781
782
if [[ ${REPO_DIR} == * " external-snapshotter" * ]]; then
782
783
CRD_BASE_DIR=" ${REPO_DIR} /client/config/crd"
783
784
fi
@@ -797,21 +798,10 @@ install_snapshot_crds() {
797
798
cnt=$(( cnt + 1 ))
798
799
sleep 2
799
800
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
-
811
801
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
815
805
816
806
local cnt=0
817
807
until kubectl get volumegroupsnapshotclasses.groupsnapshot.storage.k8s.io \
@@ -827,12 +817,12 @@ install_volumegroupsnapshot_crds() {
827
817
done
828
818
829
819
echo " VolumeGroupSnapshot CRDs installed and ready"
830
- }
831
820
821
+ }
832
822
833
823
# Install snapshot controller and associated RBAC, retrying until the pod is running.
834
824
install_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 } "
836
826
if [[ ${REPO_DIR} == * " external-snapshotter" * ]]; then
837
827
CONTROLLER_DIR=" ${REPO_DIR} "
838
828
fi
@@ -895,6 +885,12 @@ install_snapshot_controller() {
895
885
line=" $( echo " $nocomments " | sed -e " s;$image ;${name} :${NEW_TAG} ;" ) "
896
886
echo " using $line " >&2
897
887
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
898
894
echo " $line "
899
895
done)"
900
896
if ! echo " $modified " | kubectl apply -f -; then
@@ -910,13 +906,14 @@ install_snapshot_controller() {
910
906
# shellcheck disable=SC2001
911
907
modified=" $( echo " $yaml " | sed -e " s;image: .*/\([^/:]*\):.*;image: ${CSI_PROW_DRIVER_CANARY_REGISTRY} /\1:canary;" ) "
912
908
diff <(echo " $yaml " ) <(echo " $modified " )
909
+
913
910
if ! echo " $modified " | kubectl apply -f -; then
914
911
echo " modified version of $SNAPSHOT_CONTROLLER_YAML :"
915
912
echo " $modified "
916
913
exit 1
917
914
fi
918
915
else
919
- if [ " ${CSI_PROW_ENABLE_GROUP_SNAPSHOT} " = " true " ] ; then
916
+ if ${CSI_PROW_ENABLE_GROUP_SNAPSHOT} ; then
920
917
echo " Deploying snapshot-controller with CSIVolumeGroupSnapshot feature gate enabled"
921
918
curl -s " $SNAPSHOT_CONTROLLER_YAML " | \
922
919
awk '/--leader-election=true/ {print; print " - \" --feature-gates=CSIVolumeGroupSnapshot=true\" " ; next}1' | \
@@ -1432,12 +1429,6 @@ main () {
1432
1429
install_snapshot_crds
1433
1430
install_snapshot_controller
1434
1431
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
-
1441
1432
# Installing the driver might be disabled.
1442
1433
if ${CSI_PROW_DRIVER_INSTALL} " $images " ; then
1443
1434
collect_cluster_info
0 commit comments