Fix: Modified the function to get the list of snapshots in countVolumeSnapshots.

Signed-off-by: f10atin9 <f10atin9@kubesphere.io>
This commit is contained in:
f10atin9
2022-03-09 14:07:39 +08:00
parent 902997b207
commit d224df444c

View File

@@ -97,7 +97,7 @@ func (v *volumeSnapshotClassGetter) filter(object runtime.Object, filter query.F
}
func (v *volumeSnapshotClassGetter) countVolumeSnapshots(name string) int {
snapshots, err := v.informers.Snapshot().V1().VolumeSnapshots().Lister().VolumeSnapshots("").List(labels.Everything())
snapshots, err := v.informers.Snapshot().V1().VolumeSnapshots().Lister().List(labels.Everything())
if err != nil {
return 0
}