From 42151b59aa8856839ce8e0d452029c57d24e26c3 Mon Sep 17 00:00:00 2001 From: Raunak Pradip Shah Date: Wed, 8 Nov 2023 11:51:59 +0530 Subject: [PATCH] change VolumeGroupSnapshotContentName to VolumeGroupSnapshotHandle in snapshot content status --- client/apis/volumesnapshot/v1/types.go | 6 +++--- client/apis/volumesnapshot/v1/zz_generated.deepcopy.go | 4 ++-- .../snapshot.storage.k8s.io_volumesnapshotcontents.yaml | 8 ++++---- pkg/sidecar-controller/groupsnapshot_helper.go | 2 +- .../client/v6/apis/volumesnapshot/v1/types.go | 6 +++--- .../v6/apis/volumesnapshot/v1/zz_generated.deepcopy.go | 4 ++-- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/client/apis/volumesnapshot/v1/types.go b/client/apis/volumesnapshot/v1/types.go index 60809461..fdb867cd 100644 --- a/client/apis/volumesnapshot/v1/types.go +++ b/client/apis/volumesnapshot/v1/types.go @@ -421,10 +421,10 @@ type VolumeSnapshotContentStatus struct { // +optional Error *VolumeSnapshotError `json:"error,omitempty" protobuf:"bytes,5,opt,name=error,casttype=VolumeSnapshotError"` - // VolumeGroupSnapshotContentName is the name of the VolumeGroupSnapshotContent of - // which this VolumeSnapshotContent is a part of. + // VolumeGroupSnapshotHandle is the CSI "group_snapshot_id" of a group snapshot + // on the underlying storage system. // +optional - VolumeGroupSnapshotContentName *string `json:"volumeGroupSnapshotContentName,omitempty" protobuf:"bytes,6,opt,name=volumeGroupSnapshotContentName"` + VolumeGroupSnapshotHandle *string `json:"volumeGroupSnapshotHandle,omitempty" protobuf:"bytes,6,opt,name=volumeGroupSnapshotHandle"` } // DeletionPolicy describes a policy for end-of-life maintenance of volume snapshot contents diff --git a/client/apis/volumesnapshot/v1/zz_generated.deepcopy.go b/client/apis/volumesnapshot/v1/zz_generated.deepcopy.go index 46030926..f1b7f908 100644 --- a/client/apis/volumesnapshot/v1/zz_generated.deepcopy.go +++ b/client/apis/volumesnapshot/v1/zz_generated.deepcopy.go @@ -271,8 +271,8 @@ func (in *VolumeSnapshotContentStatus) DeepCopyInto(out *VolumeSnapshotContentSt *out = new(VolumeSnapshotError) (*in).DeepCopyInto(*out) } - if in.VolumeGroupSnapshotContentName != nil { - in, out := &in.VolumeGroupSnapshotContentName, &out.VolumeGroupSnapshotContentName + if in.VolumeGroupSnapshotHandle != nil { + in, out := &in.VolumeGroupSnapshotHandle, &out.VolumeGroupSnapshotHandle *out = new(string) **out = **in } diff --git a/client/config/crd/snapshot.storage.k8s.io_volumesnapshotcontents.yaml b/client/config/crd/snapshot.storage.k8s.io_volumesnapshotcontents.yaml index aaeb5f4a..a4ce562f 100644 --- a/client/config/crd/snapshot.storage.k8s.io_volumesnapshotcontents.yaml +++ b/client/config/crd/snapshot.storage.k8s.io_volumesnapshotcontents.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - api-approved.kubernetes.io: "https://github.com/kubernetes-csi/external-snapshotter/pull/814" + api-approved.kubernetes.io: "https://github.com/kubernetes-csi/external-snapshotter/pull/955" controller-gen.kubebuilder.io/version: v0.12.0 creationTimestamp: null name: volumesnapshotcontents.snapshot.storage.k8s.io @@ -242,9 +242,9 @@ spec: that dynamic snapshot creation has either failed or it is still in progress. type: string - volumeGroupSnapshotContentName: - description: VolumeGroupSnapshotContentName is the name of the VolumeGroupSnapshotContent - of which this VolumeSnapshotContent is a part of. + volumeGroupSnapshotHandle: + description: VolumeGroupSnapshotHandle is the CSI "group_snapshot_id" + of a group snapshot on the underlying storage system. type: string type: object required: diff --git a/pkg/sidecar-controller/groupsnapshot_helper.go b/pkg/sidecar-controller/groupsnapshot_helper.go index f438425a..0be2880e 100644 --- a/pkg/sidecar-controller/groupsnapshot_helper.go +++ b/pkg/sidecar-controller/groupsnapshot_helper.go @@ -453,7 +453,7 @@ func (ctrl *csiSnapshotSideCarController) createGroupSnapshotWrapper(groupSnapsh SourceVolumeMode: nil, }, Status: &crdv1.VolumeSnapshotContentStatus{ - VolumeGroupSnapshotContentName: &groupSnapshotContent.Name, + VolumeGroupSnapshotHandle: &groupSnapshotContent.Name, }, } diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/apis/volumesnapshot/v1/types.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/apis/volumesnapshot/v1/types.go index 60809461..fdb867cd 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/apis/volumesnapshot/v1/types.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/apis/volumesnapshot/v1/types.go @@ -421,10 +421,10 @@ type VolumeSnapshotContentStatus struct { // +optional Error *VolumeSnapshotError `json:"error,omitempty" protobuf:"bytes,5,opt,name=error,casttype=VolumeSnapshotError"` - // VolumeGroupSnapshotContentName is the name of the VolumeGroupSnapshotContent of - // which this VolumeSnapshotContent is a part of. + // VolumeGroupSnapshotHandle is the CSI "group_snapshot_id" of a group snapshot + // on the underlying storage system. // +optional - VolumeGroupSnapshotContentName *string `json:"volumeGroupSnapshotContentName,omitempty" protobuf:"bytes,6,opt,name=volumeGroupSnapshotContentName"` + VolumeGroupSnapshotHandle *string `json:"volumeGroupSnapshotHandle,omitempty" protobuf:"bytes,6,opt,name=volumeGroupSnapshotHandle"` } // DeletionPolicy describes a policy for end-of-life maintenance of volume snapshot contents diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/apis/volumesnapshot/v1/zz_generated.deepcopy.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/apis/volumesnapshot/v1/zz_generated.deepcopy.go index 46030926..f1b7f908 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/apis/volumesnapshot/v1/zz_generated.deepcopy.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/apis/volumesnapshot/v1/zz_generated.deepcopy.go @@ -271,8 +271,8 @@ func (in *VolumeSnapshotContentStatus) DeepCopyInto(out *VolumeSnapshotContentSt *out = new(VolumeSnapshotError) (*in).DeepCopyInto(*out) } - if in.VolumeGroupSnapshotContentName != nil { - in, out := &in.VolumeGroupSnapshotContentName, &out.VolumeGroupSnapshotContentName + if in.VolumeGroupSnapshotHandle != nil { + in, out := &in.VolumeGroupSnapshotHandle, &out.VolumeGroupSnapshotHandle *out = new(string) **out = **in }