@@ -21,12 +21,12 @@ import (
21
21
"fmt"
22
22
"time"
23
23
24
- crdv1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta1 "
24
+ crdv1beta2 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta2 "
25
25
crdv1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumesnapshot/v1"
26
26
clientset "github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned"
27
- groupsnapshotinformers "github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumegroupsnapshot/v1beta1 "
27
+ groupsnapshotinformers "github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumegroupsnapshot/v1beta2 "
28
28
snapshotinformers "github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumesnapshot/v1"
29
- groupsnapshotlisters "github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1beta1 "
29
+ groupsnapshotlisters "github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1beta2 "
30
30
snapshotlisters "github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumesnapshot/v1"
31
31
"github.com/kubernetes-csi/external-snapshotter/v8/pkg/metrics"
32
32
"github.com/kubernetes-csi/external-snapshotter/v8/pkg/utils"
@@ -658,7 +658,7 @@ func (ctrl *csiSnapshotCommonController) enqueueGroupSnapshotWork(obj interface{
658
658
if unknown , ok := obj .(cache.DeletedFinalStateUnknown ); ok && unknown .Obj != nil {
659
659
obj = unknown .Obj
660
660
}
661
- if groupSnapshot , ok := obj .(* crdv1beta1 .VolumeGroupSnapshot ); ok {
661
+ if groupSnapshot , ok := obj .(* crdv1beta2 .VolumeGroupSnapshot ); ok {
662
662
objName , err := cache .DeletionHandlingMetaNamespaceKeyFunc (groupSnapshot )
663
663
if err != nil {
664
664
klog .Errorf ("failed to get key from object: %v, %v" , err , groupSnapshot )
@@ -675,7 +675,7 @@ func (ctrl *csiSnapshotCommonController) enqueueGroupSnapshotContentWork(obj int
675
675
if unknown , ok := obj .(cache.DeletedFinalStateUnknown ); ok && unknown .Obj != nil {
676
676
obj = unknown .Obj
677
677
}
678
- if content , ok := obj .(* crdv1beta1 .VolumeGroupSnapshotContent ); ok {
678
+ if content , ok := obj .(* crdv1beta2 .VolumeGroupSnapshotContent ); ok {
679
679
objName , err := cache .DeletionHandlingMetaNamespaceKeyFunc (content )
680
680
if err != nil {
681
681
klog .Errorf ("failed to get key from object: %v, %v" , err , content )
@@ -769,7 +769,7 @@ func (ctrl *csiSnapshotCommonController) syncGroupSnapshotByKey(ctx context.Cont
769
769
klog .V (2 ).Infof ("deletion of group snapshot %q was already processed" , key )
770
770
return nil
771
771
}
772
- groupSnapshot , ok := vgsObj .(* crdv1beta1 .VolumeGroupSnapshot )
772
+ groupSnapshot , ok := vgsObj .(* crdv1beta2 .VolumeGroupSnapshot )
773
773
if ! ok {
774
774
klog .Errorf ("expected vgs, got %+v" , vgsObj )
775
775
return nil
@@ -785,9 +785,9 @@ func (ctrl *csiSnapshotCommonController) syncGroupSnapshotByKey(ctx context.Cont
785
785
// If it is not set, gets it from default VolumeGroupSnapshotClass and sets it.
786
786
// On error, it must return the original group snapshot, not nil, because the caller
787
787
// syncGroupSnapshotByKey needs to check group snapshot's timestamp.
788
- func (ctrl * csiSnapshotCommonController ) checkAndUpdateGroupSnapshotClass (groupSnapshot * crdv1beta1 .VolumeGroupSnapshot ) (* crdv1beta1 .VolumeGroupSnapshot , error ) {
788
+ func (ctrl * csiSnapshotCommonController ) checkAndUpdateGroupSnapshotClass (groupSnapshot * crdv1beta2 .VolumeGroupSnapshot ) (* crdv1beta2 .VolumeGroupSnapshot , error ) {
789
789
className := groupSnapshot .Spec .VolumeGroupSnapshotClassName
790
- var class * crdv1beta1 .VolumeGroupSnapshotClass
790
+ var class * crdv1beta2 .VolumeGroupSnapshotClass
791
791
var err error
792
792
newGroupSnapshot := groupSnapshot
793
793
if className != nil {
@@ -849,7 +849,7 @@ func (ctrl *csiSnapshotCommonController) syncGroupSnapshotContentByKey(key strin
849
849
klog .V (2 ).Infof ("deletion of group snapshot content %q was already processed" , key )
850
850
return nil
851
851
}
852
- content , ok := contentObj .(* crdv1beta1 .VolumeGroupSnapshotContent )
852
+ content , ok := contentObj .(* crdv1beta2 .VolumeGroupSnapshotContent )
853
853
if ! ok {
854
854
klog .Errorf ("expected group snapshot content, got %+v" , content )
855
855
return nil
@@ -860,7 +860,7 @@ func (ctrl *csiSnapshotCommonController) syncGroupSnapshotContentByKey(key strin
860
860
861
861
// updateGroupSnapshotContent runs in worker thread and handles "groupsnapshotcontent added",
862
862
// "groupsnapshotcontent updated" and "periodic sync" events.
863
- func (ctrl * csiSnapshotCommonController ) updateGroupSnapshotContent (content * crdv1beta1 .VolumeGroupSnapshotContent ) error {
863
+ func (ctrl * csiSnapshotCommonController ) updateGroupSnapshotContent (content * crdv1beta2 .VolumeGroupSnapshotContent ) error {
864
864
// Store the new group snapshot content version in the cache and do not process
865
865
// it if this is an old version.
866
866
new , err := ctrl .storeGroupSnapshotContentUpdate (content )
@@ -885,7 +885,7 @@ func (ctrl *csiSnapshotCommonController) updateGroupSnapshotContent(content *crd
885
885
}
886
886
887
887
// deleteGroupSnapshotContent runs in worker thread and handles "groupsnapshotcontent deleted" event.
888
- func (ctrl * csiSnapshotCommonController ) deleteGroupSnapshotContent (content * crdv1beta1 .VolumeGroupSnapshotContent ) {
888
+ func (ctrl * csiSnapshotCommonController ) deleteGroupSnapshotContent (content * crdv1beta2 .VolumeGroupSnapshotContent ) {
889
889
_ = ctrl .groupSnapshotContentStore .Delete (content )
890
890
klog .V (4 ).Infof ("group snapshot content %q deleted" , content .Name )
891
891
0 commit comments