Fix: add deepcopy

Signed-off-by: f10atin9 <f10atin9@kubesphere.io>
This commit is contained in:
f10atin9
2022-03-09 11:14:26 +08:00
parent 2e34bdf9a2
commit 902997b207

View File

@@ -56,6 +56,7 @@ func (v *volumeSnapshotClassGetter) List(namespace string, query *query.Query) (
var result []runtime.Object
for _, snapshotClass := range all {
snapshotClass = snapshotClass.DeepCopy()
count := v.countVolumeSnapshots(snapshotClass.Name)
if snapshotClass.Annotations == nil {
snapshotClass.Annotations = make(map[string]string)