Skip to content

Commit 519eacf

Browse files
committed
Address review comments
1 parent 7c8516f commit 519eacf

File tree

8 files changed

+31
-31
lines changed

8 files changed

+31
-31
lines changed

client/apis/volumegroupsnapshot/v1alpha1/types.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -107,16 +107,16 @@ type VolumeGroupSnapshotStatus struct {
107107
// is part of this group snapshot.
108108
// The maximum number of allowed snapshots in the group is 100.
109109
// +optional
110-
PVCVolumeSnapshotRefList []PVCVolumeSnapshotPair `json:"pvcVolumeSnapshotRefList,omitempty" protobuf:"bytes,6,opt,name=pvcVolumeSnapshotRefList"`
110+
PVCVolumeSnapshotRefList []PVCVolumeSnapshotPair `json:"pvcVolumeSnapshotRefList,omitempty" protobuf:"bytes,5,opt,name=pvcVolumeSnapshotRefList"`
111111
}
112112

113-
// PVCVolumeSnapshotPair defines a pair of a PVC reference and a Volume Snapshot
113+
// PVCVolumeSnapshotPair defines a pair of a PVC reference and a Volume Snapshot Reference
114114
type PVCVolumeSnapshotPair struct {
115115
// PersistentVolumeClaimRef is a reference to the PVC this pair is referring to
116116
PersistentVolumeClaimRef core_v1.ObjectReference `json:"persistentVolumeClaimRef,omitempty" protobuf:"bytes,1,opt,name=persistentVolumeClaimRef"`
117117

118118
// VolumeSnapshotRef is a reference to the VolumeSnapshot this pair is referring to
119-
VolumeSnapshotRef core_v1.ObjectReference `json:"volumeSnapshotRef,omitempty" protobuf:"bytes,1,opt,name=volumeSnapshotRef"`
119+
VolumeSnapshotRef core_v1.ObjectReference `json:"volumeSnapshotRef,omitempty" protobuf:"bytes,2,opt,name=volumeSnapshotRef"`
120120
}
121121

122122
//+genclient
@@ -346,11 +346,11 @@ type VolumeGroupSnapshotContentStatus struct {
346346
// +optional
347347
Error *snapshotv1.VolumeSnapshotError `json:"error,omitempty" protobuf:"bytes,4,opt,name=error,casttype=VolumeSnapshotError"`
348348

349-
// PVVolumeSnapshotContentRefList is the list of pairs of PV and
350-
// VolumeSnapshotCOntent for this group snapshot
349+
// PVVolumeSnapshotContentList is the list of pairs of PV and
350+
// VolumeSnapshotContent for this group snapshot
351351
// The maximum number of allowed snapshots in the group is 100.
352352
// +optional
353-
PVVolumeSnapshotContentRefList []PVVolumeSnapshotContentPair `json:"pvVolumeSnapshotContentRefList,omitempty" protobuf:"bytes,6,opt,name=pvVolumeSnapshotContentRefList"`
353+
PVVolumeSnapshotContentList []PVVolumeSnapshotContentPair `json:"pvVolumeSnapshotContentList,omitempty" protobuf:"bytes,5,opt,name=pvVolumeSnapshotContentRefList"`
354354
}
355355

356356
// PVVolumeSnapshotContentPair represent a pair of PV names and
@@ -360,7 +360,7 @@ type PVVolumeSnapshotContentPair struct {
360360
PersistentVolumeName string `json:"persistentVolumeName,omitempty" protobuf:"bytes,1,opt,name=persistentVolumeName"`
361361

362362
// VolumeSnapshotContentName is the name of the volume snapshot content resource
363-
VolumeSnapshotContentName string `json:"volumeSnapshotContentName,omitempty" protobuf:"bytes,1,opt,name=volumeSnapshotContentName"`
363+
VolumeSnapshotContentName string `json:"volumeSnapshotContentName,omitempty" protobuf:"bytes,2,opt,name=volumeSnapshotContentName"`
364364
}
365365

366366
// VolumeGroupSnapshotContentSource represents the CSI source of a group snapshot.

client/apis/volumegroupsnapshot/v1alpha1/zz_generated.deepcopy.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/config/crd/groupsnapshot.storage.k8s.io_volumegroupsnapshotcontents.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -227,10 +227,10 @@ spec:
227227
format: date-time
228228
type: string
229229
type: object
230-
pvVolumeSnapshotContentRefList:
231-
description: PVVolumeSnapshotContentRefList is the list of pairs of
232-
PV and VolumeSnapshotCOntent for this group snapshot The maximum
233-
number of allowed snapshots in the group is 100.
230+
pvVolumeSnapshotContentList:
231+
description: PVVolumeSnapshotContentList is the list of pairs of PV
232+
and VolumeSnapshotContent for this group snapshot The maximum number
233+
of allowed snapshots in the group is 100.
234234
items:
235235
description: PVVolumeSnapshotContentPair represent a pair of PV
236236
names and VolumeSnapshotContent names

client/config/crd/groupsnapshot.storage.k8s.io_volumegroupsnapshots.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ spec:
189189
allowed snapshots in the group is 100.
190190
items:
191191
description: PVCVolumeSnapshotPair defines a pair of a PVC reference
192-
and a Volume Snapshot
192+
and a Volume Snapshot Reference
193193
properties:
194194
persistentVolumeClaimRef:
195195
description: PersistentVolumeClaimRef is a reference to the

pkg/common-controller/groupsnapshot_controller_helper.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -565,8 +565,8 @@ func (ctrl *csiSnapshotCommonController) updateGroupSnapshotStatus(groupSnapshot
565565
}
566566

567567
var pvcVolumeSnapshotRefList []crdv1alpha1.PVCVolumeSnapshotPair
568-
if groupSnapshotContent.Status != nil && len(groupSnapshotContent.Status.PVVolumeSnapshotContentRefList) != 0 {
569-
for _, contentRef := range groupSnapshotContent.Status.PVVolumeSnapshotContentRefList {
568+
if groupSnapshotContent.Status != nil && len(groupSnapshotContent.Status.PVVolumeSnapshotContentList) != 0 {
569+
for _, contentRef := range groupSnapshotContent.Status.PVVolumeSnapshotContentList {
570570
groupSnapshotContent, err := ctrl.contentLister.Get(contentRef.VolumeSnapshotContentName)
571571
if err != nil {
572572
return nil, fmt.Errorf("failed to get group snapshot content %s from group snapshot content store: %v", contentRef.VolumeSnapshotContentName, err)

pkg/sidecar-controller/groupsnapshot_helper.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,8 @@ func (ctrl *csiSnapshotSideCarController) deleteCSIGroupSnapshotOperation(groupS
240240
}
241241

242242
var snapshotIDs []string
243-
if groupSnapshotContent.Status != nil && len(groupSnapshotContent.Status.PVVolumeSnapshotContentRefList) != 0 {
244-
for _, contentRef := range groupSnapshotContent.Status.PVVolumeSnapshotContentRefList {
243+
if groupSnapshotContent.Status != nil && len(groupSnapshotContent.Status.PVVolumeSnapshotContentList) != 0 {
244+
for _, contentRef := range groupSnapshotContent.Status.PVVolumeSnapshotContentList {
245245
snapshotContent, err := ctrl.contentLister.Get(contentRef.VolumeSnapshotContentName)
246246
if err != nil {
247247
return fmt.Errorf("failed to get snapshot content %s from snapshot content store: %v", contentRef.VolumeSnapshotContentName, err)
@@ -283,7 +283,7 @@ func (ctrl *csiSnapshotSideCarController) clearGroupSnapshotContentStatus(
283283
groupSnapshotContent.Status.ReadyToUse = nil
284284
groupSnapshotContent.Status.CreationTime = nil
285285
groupSnapshotContent.Status.Error = nil
286-
groupSnapshotContent.Status.PVVolumeSnapshotContentRefList = nil
286+
groupSnapshotContent.Status.PVVolumeSnapshotContentList = nil
287287
}
288288
newContent, err := ctrl.clientset.GroupsnapshotV1alpha1().VolumeGroupSnapshotContents().UpdateStatus(context.TODO(), groupSnapshotContent, metav1.UpdateOptions{})
289289
if err != nil {
@@ -650,7 +650,7 @@ func (ctrl *csiSnapshotSideCarController) updateGroupSnapshotContentStatus(
650650
CreationTime: &createdAt,
651651
}
652652
for _, name := range snapshotContentNames {
653-
newStatus.PVVolumeSnapshotContentRefList = append(newStatus.PVVolumeSnapshotContentRefList, crdv1alpha1.PVVolumeSnapshotContentPair{
653+
newStatus.PVVolumeSnapshotContentList = append(newStatus.PVVolumeSnapshotContentList, crdv1alpha1.PVVolumeSnapshotContentPair{
654654
VolumeSnapshotContentName: name,
655655
})
656656
}
@@ -672,9 +672,9 @@ func (ctrl *csiSnapshotSideCarController) updateGroupSnapshotContentStatus(
672672
newStatus.CreationTime = &createdAt
673673
updated = true
674674
}
675-
if len(newStatus.PVVolumeSnapshotContentRefList) == 0 {
675+
if len(newStatus.PVVolumeSnapshotContentList) == 0 {
676676
for _, name := range snapshotContentNames {
677-
newStatus.PVVolumeSnapshotContentRefList = append(newStatus.PVVolumeSnapshotContentRefList, crdv1alpha1.PVVolumeSnapshotContentPair{
677+
newStatus.PVVolumeSnapshotContentList = append(newStatus.PVVolumeSnapshotContentList, crdv1alpha1.PVVolumeSnapshotContentPair{
678678
VolumeSnapshotContentName: name,
679679
})
680680
}

vendor/github.com/kubernetes-csi/external-snapshotter/client/v7/apis/volumegroupsnapshot/v1alpha1/types.go

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/kubernetes-csi/external-snapshotter/client/v7/apis/volumegroupsnapshot/v1alpha1/zz_generated.deepcopy.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)