From 69b054d1edf9b4cffbef5196d34ef89e527b5dc7 Mon Sep 17 00:00:00 2001 From: Raunak Pradip Shah Date: Wed, 1 Mar 2023 11:29:13 +0530 Subject: [PATCH] Refactor snapshot error to utils.go --- client/apis/utils.go | 17 ++++++++++ .../volumegroupsnapshot/v1alpha1/types.go | 20 +++-------- .../v1alpha1/zz_generated.deepcopy.go | 30 ++-------------- client/apis/volumesnapshot/v1/types.go | 20 +++-------- .../v1/zz_generated.deepcopy.go | 30 ++-------------- ...age.k8s.io_volumegroupsnapshotclasses.yaml | 1 + ...ge.k8s.io_volumegroupsnapshotcontents.yaml | 1 + ...t.storage.k8s.io_volumegroupsnapshots.yaml | 1 + .../client/v6/apis/utils.go | 17 ++++++++++ .../apis/volumegroupsnapshot/v1alpha1/doc.go | 2 +- .../volumegroupsnapshot/v1alpha1/register.go | 2 +- .../volumegroupsnapshot/v1alpha1/types.go | 20 +++-------- .../v1alpha1/zz_generated.deepcopy.go | 30 ++-------------- .../client/v6/apis/volumesnapshot/v1/types.go | 20 +++-------- .../v1/zz_generated.deepcopy.go | 30 ++-------------- .../v6/clientset/versioned/clientset.go | 18 +++++----- .../versioned/fake/clientset_generated.go | 10 +++--- .../v6/clientset/versioned/fake/register.go | 4 +-- .../v6/clientset/versioned/scheme/register.go | 4 +-- .../v1alpha1/fake/fake_volumegroupsnapshot.go | 6 ++-- .../fake/fake_volumegroupsnapshot_client.go | 10 +++--- .../fake/fake_volumegroupsnapshotclass.go | 6 ++-- .../fake/fake_volumegroupsnapshotcontent.go | 6 ++-- .../v1alpha1/volumegroupsnapshot.go | 2 +- .../v1alpha1/volumegroupsnapshot_client.go | 34 +++++++++---------- .../v1alpha1/volumegroupsnapshotclass.go | 2 +- .../v1alpha1/volumegroupsnapshotcontent.go | 2 +- .../v6/informers/externalversions/factory.go | 4 +-- .../v6/informers/externalversions/generic.go | 18 +++++----- .../v1alpha1/volumegroupsnapshot.go | 4 +-- .../v1alpha1/volumegroupsnapshotclass.go | 4 +-- .../v1alpha1/volumegroupsnapshotcontent.go | 4 +-- vendor/modules.txt | 1 + 33 files changed, 137 insertions(+), 243 deletions(-) create mode 100644 client/apis/utils.go create mode 100644 vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/apis/utils.go diff --git a/client/apis/utils.go b/client/apis/utils.go new file mode 100644 index 00000000..7bb6fa47 --- /dev/null +++ b/client/apis/utils.go @@ -0,0 +1,17 @@ +package apis + +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + +// VolumeSnapshotError describes an error encountered during snapshot creation. +type VolumeSnapshotError struct { + // time is the timestamp when the error was encountered. + // +optional + Time *metav1.Time `json:"time,omitempty" protobuf:"bytes,1,opt,name=time"` + + // message is a string detailing the encountered error during snapshot + // creation if specified. + // NOTE: message may be logged, and it should not contain sensitive + // information. + // +optional + Message *string `json:"message,omitempty" protobuf:"bytes,2,opt,name=message"` +} diff --git a/client/apis/volumegroupsnapshot/v1alpha1/types.go b/client/apis/volumegroupsnapshot/v1alpha1/types.go index 0dff1d97..91975709 100644 --- a/client/apis/volumegroupsnapshot/v1alpha1/types.go +++ b/client/apis/volumegroupsnapshot/v1alpha1/types.go @@ -19,6 +19,8 @@ package v1alpha1 import ( core_v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + "github.com/kubernetes-csi/external-snapshotter/client/v6/apis" ) // VolumeGroupSnapshotSpec defines the desired state of VolumeGroupSnapshot @@ -74,7 +76,7 @@ type VolumeGroupSnapshotStatus struct { // The snapshot controller will keep retrying when an error occurs during the // group snapshot creation. Upon success, this error field will be cleared. // +optional - Error *VolumeGroupSnapshotError `json:"error,omitempty" protobuf:"bytes,4,opt,name=error,casttype=VolumeGroupSnapshotError"` + Error *apis.VolumeSnapshotError `json:"error,omitempty" protobuf:"bytes,4,opt,name=error,casttype=VolumeSnapshotError"` // VolumeSnapshotRefList is the list of volume snapshot references for this // group snapshot. @@ -269,7 +271,7 @@ type VolumeGroupSnapshotContentStatus struct { // Error is the last observed error during group snapshot creation, if any. // Upon success after retry, this error field will be cleared. // +optional - Error *VolumeGroupSnapshotError `json:"error,omitempty" protobuf:"bytes,4,opt,name=error,casttype=VolumeGroupSnapshotError"` + Error *apis.VolumeSnapshotError `json:"error,omitempty" protobuf:"bytes,4,opt,name=error,casttype=VolumeSnapshotError"` // VolumeSnapshotContentRefList is the list of volume snapshot content references // for this group snapshot. @@ -295,17 +297,3 @@ type VolumeGroupSnapshotContentSource struct { // +optional VolumeGroupSnapshotHandle *string `json:"volumeGroupSnapshotHandle,omitempty" protobuf:"bytes,2,opt,name=volumeGroupSnapshotHandle"` } - -// VolumeGroupSnapshotError describes an error encountered during group snapshot creation. -type VolumeGroupSnapshotError struct { - // Time is the timestamp when the error was encountered. - // +optional - Time *metav1.Time `json:"time,omitempty" protobuf:"bytes,1,opt,name=time"` - - // Message is a string detailing the encountered error during snapshot - // creation if specified. - // NOTE: message may be logged, and it should not contain sensitive - // information. - // +optional - Message *string `json:"message,omitempty" protobuf:"bytes,2,opt,name=message"` -} diff --git a/client/apis/volumegroupsnapshot/v1alpha1/zz_generated.deepcopy.go b/client/apis/volumegroupsnapshot/v1alpha1/zz_generated.deepcopy.go index 58f4958e..37f87fb4 100644 --- a/client/apis/volumegroupsnapshot/v1alpha1/zz_generated.deepcopy.go +++ b/client/apis/volumegroupsnapshot/v1alpha1/zz_generated.deepcopy.go @@ -22,6 +22,7 @@ limitations under the License. package v1alpha1 import ( + apis "github.com/kubernetes-csi/external-snapshotter/client/v6/apis" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" @@ -256,7 +257,7 @@ func (in *VolumeGroupSnapshotContentStatus) DeepCopyInto(out *VolumeGroupSnapsho } if in.Error != nil { in, out := &in.Error, &out.Error - *out = new(VolumeGroupSnapshotError) + *out = new(apis.VolumeSnapshotError) (*in).DeepCopyInto(*out) } if in.VolumeSnapshotContentRefList != nil { @@ -277,31 +278,6 @@ func (in *VolumeGroupSnapshotContentStatus) DeepCopy() *VolumeGroupSnapshotConte return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VolumeGroupSnapshotError) DeepCopyInto(out *VolumeGroupSnapshotError) { - *out = *in - if in.Time != nil { - in, out := &in.Time, &out.Time - *out = (*in).DeepCopy() - } - if in.Message != nil { - in, out := &in.Message, &out.Message - *out = new(string) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeGroupSnapshotError. -func (in *VolumeGroupSnapshotError) DeepCopy() *VolumeGroupSnapshotError { - if in == nil { - return nil - } - out := new(VolumeGroupSnapshotError) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *VolumeGroupSnapshotList) DeepCopyInto(out *VolumeGroupSnapshotList) { *out = *in @@ -380,7 +356,7 @@ func (in *VolumeGroupSnapshotStatus) DeepCopyInto(out *VolumeGroupSnapshotStatus } if in.Error != nil { in, out := &in.Error, &out.Error - *out = new(VolumeGroupSnapshotError) + *out = new(apis.VolumeSnapshotError) (*in).DeepCopyInto(*out) } if in.VolumeSnapshotRefList != nil { diff --git a/client/apis/volumesnapshot/v1/types.go b/client/apis/volumesnapshot/v1/types.go index 60809461..958005f7 100644 --- a/client/apis/volumesnapshot/v1/types.go +++ b/client/apis/volumesnapshot/v1/types.go @@ -21,6 +21,8 @@ import ( core_v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + "github.com/kubernetes-csi/external-snapshotter/client/v6/apis" ) // +genclient @@ -182,7 +184,7 @@ type VolumeSnapshotStatus struct { // The snapshot controller will keep retrying when an error occurs during the // snapshot creation. Upon success, this error field will be cleared. // +optional - Error *VolumeSnapshotError `json:"error,omitempty" protobuf:"bytes,5,opt,name=error,casttype=VolumeSnapshotError"` + Error *apis.VolumeSnapshotError `json:"error,omitempty" protobuf:"bytes,5,opt,name=error,casttype=VolumeSnapshotError"` // VolumeGroupSnapshotName is the name of the VolumeGroupSnapshot of which this // VolumeSnapshot is a part of. @@ -419,7 +421,7 @@ type VolumeSnapshotContentStatus struct { // error is the last observed error during snapshot creation, if any. // Upon success after retry, this error field will be cleared. // +optional - Error *VolumeSnapshotError `json:"error,omitempty" protobuf:"bytes,5,opt,name=error,casttype=VolumeSnapshotError"` + Error *apis.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. @@ -440,17 +442,3 @@ const ( // state on release from its volume snapshot. VolumeSnapshotContentRetain DeletionPolicy = "Retain" ) - -// VolumeSnapshotError describes an error encountered during snapshot creation. -type VolumeSnapshotError struct { - // time is the timestamp when the error was encountered. - // +optional - Time *metav1.Time `json:"time,omitempty" protobuf:"bytes,1,opt,name=time"` - - // message is a string detailing the encountered error during snapshot - // creation if specified. - // NOTE: message may be logged, and it should not contain sensitive - // information. - // +optional - Message *string `json:"message,omitempty" protobuf:"bytes,2,opt,name=message"` -} diff --git a/client/apis/volumesnapshot/v1/zz_generated.deepcopy.go b/client/apis/volumesnapshot/v1/zz_generated.deepcopy.go index 46030926..10b31dc0 100644 --- a/client/apis/volumesnapshot/v1/zz_generated.deepcopy.go +++ b/client/apis/volumesnapshot/v1/zz_generated.deepcopy.go @@ -22,6 +22,7 @@ limitations under the License. package v1 import ( + apis "github.com/kubernetes-csi/external-snapshotter/client/v6/apis" corev1 "k8s.io/api/core/v1" runtime "k8s.io/apimachinery/pkg/runtime" ) @@ -268,7 +269,7 @@ func (in *VolumeSnapshotContentStatus) DeepCopyInto(out *VolumeSnapshotContentSt } if in.Error != nil { in, out := &in.Error, &out.Error - *out = new(VolumeSnapshotError) + *out = new(apis.VolumeSnapshotError) (*in).DeepCopyInto(*out) } if in.VolumeGroupSnapshotContentName != nil { @@ -289,31 +290,6 @@ func (in *VolumeSnapshotContentStatus) DeepCopy() *VolumeSnapshotContentStatus { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VolumeSnapshotError) DeepCopyInto(out *VolumeSnapshotError) { - *out = *in - if in.Time != nil { - in, out := &in.Time, &out.Time - *out = (*in).DeepCopy() - } - if in.Message != nil { - in, out := &in.Message, &out.Message - *out = new(string) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeSnapshotError. -func (in *VolumeSnapshotError) DeepCopy() *VolumeSnapshotError { - if in == nil { - return nil - } - out := new(VolumeSnapshotError) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *VolumeSnapshotList) DeepCopyInto(out *VolumeSnapshotList) { *out = *in @@ -419,7 +395,7 @@ func (in *VolumeSnapshotStatus) DeepCopyInto(out *VolumeSnapshotStatus) { } if in.Error != nil { in, out := &in.Error, &out.Error - *out = new(VolumeSnapshotError) + *out = new(apis.VolumeSnapshotError) (*in).DeepCopyInto(*out) } if in.VolumeGroupSnapshotName != nil { diff --git a/client/config/crd/groupsnapshot.storage.k8s.io_volumegroupsnapshotclasses.yaml b/client/config/crd/groupsnapshot.storage.k8s.io_volumegroupsnapshotclasses.yaml index 0df250d7..16fbd5ee 100644 --- a/client/config/crd/groupsnapshot.storage.k8s.io_volumegroupsnapshotclasses.yaml +++ b/client/config/crd/groupsnapshot.storage.k8s.io_volumegroupsnapshotclasses.yaml @@ -4,6 +4,7 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.11.3 + api-approved.kubernetes.io: "https://github.com/kubernetes-csi/external-snapshotter/pull/814" creationTimestamp: null name: volumegroupsnapshotclasses.groupsnapshot.storage.k8s.io spec: diff --git a/client/config/crd/groupsnapshot.storage.k8s.io_volumegroupsnapshotcontents.yaml b/client/config/crd/groupsnapshot.storage.k8s.io_volumegroupsnapshotcontents.yaml index 9ccf4931..80e0e3d3 100644 --- a/client/config/crd/groupsnapshot.storage.k8s.io_volumegroupsnapshotcontents.yaml +++ b/client/config/crd/groupsnapshot.storage.k8s.io_volumegroupsnapshotcontents.yaml @@ -4,6 +4,7 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.11.3 + api-approved.kubernetes.io: "https://github.com/kubernetes-csi/external-snapshotter/pull/814" creationTimestamp: null name: volumegroupsnapshotcontents.groupsnapshot.storage.k8s.io spec: diff --git a/client/config/crd/groupsnapshot.storage.k8s.io_volumegroupsnapshots.yaml b/client/config/crd/groupsnapshot.storage.k8s.io_volumegroupsnapshots.yaml index e749a66b..bd6d72ac 100644 --- a/client/config/crd/groupsnapshot.storage.k8s.io_volumegroupsnapshots.yaml +++ b/client/config/crd/groupsnapshot.storage.k8s.io_volumegroupsnapshots.yaml @@ -4,6 +4,7 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.11.3 + api-approved.kubernetes.io: "https://github.com/kubernetes-csi/external-snapshotter/pull/814" creationTimestamp: null name: volumegroupsnapshots.groupsnapshot.storage.k8s.io spec: diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/apis/utils.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/apis/utils.go new file mode 100644 index 00000000..7bb6fa47 --- /dev/null +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/apis/utils.go @@ -0,0 +1,17 @@ +package apis + +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + +// VolumeSnapshotError describes an error encountered during snapshot creation. +type VolumeSnapshotError struct { + // time is the timestamp when the error was encountered. + // +optional + Time *metav1.Time `json:"time,omitempty" protobuf:"bytes,1,opt,name=time"` + + // message is a string detailing the encountered error during snapshot + // creation if specified. + // NOTE: message may be logged, and it should not contain sensitive + // information. + // +optional + Message *string `json:"message,omitempty" protobuf:"bytes,2,opt,name=message"` +} diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/apis/volumegroupsnapshot/v1alpha1/doc.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/apis/volumegroupsnapshot/v1alpha1/doc.go index 39e998c9..f3b8d19e 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/apis/volumegroupsnapshot/v1alpha1/doc.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/apis/volumegroupsnapshot/v1alpha1/doc.go @@ -15,6 +15,6 @@ limitations under the License. */ // +k8s:deepcopy-gen=package -// +groupName=snapshot.storage.k8s.io +// +groupName=groupsnapshot.storage.k8s.io package v1alpha1 diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/apis/volumegroupsnapshot/v1alpha1/register.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/apis/volumegroupsnapshot/v1alpha1/register.go index 814e9c93..42b82aae 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/apis/volumegroupsnapshot/v1alpha1/register.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/apis/volumegroupsnapshot/v1alpha1/register.go @@ -20,7 +20,7 @@ import ( ) // GroupName is the group name use in this package. -const GroupName = "snapshot.storage.k8s.io" +const GroupName = "groupsnapshot.storage.k8s.io" var ( // SchemeBuilder is the new scheme builder diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/apis/volumegroupsnapshot/v1alpha1/types.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/apis/volumegroupsnapshot/v1alpha1/types.go index 0dff1d97..91975709 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/apis/volumegroupsnapshot/v1alpha1/types.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/apis/volumegroupsnapshot/v1alpha1/types.go @@ -19,6 +19,8 @@ package v1alpha1 import ( core_v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + "github.com/kubernetes-csi/external-snapshotter/client/v6/apis" ) // VolumeGroupSnapshotSpec defines the desired state of VolumeGroupSnapshot @@ -74,7 +76,7 @@ type VolumeGroupSnapshotStatus struct { // The snapshot controller will keep retrying when an error occurs during the // group snapshot creation. Upon success, this error field will be cleared. // +optional - Error *VolumeGroupSnapshotError `json:"error,omitempty" protobuf:"bytes,4,opt,name=error,casttype=VolumeGroupSnapshotError"` + Error *apis.VolumeSnapshotError `json:"error,omitempty" protobuf:"bytes,4,opt,name=error,casttype=VolumeSnapshotError"` // VolumeSnapshotRefList is the list of volume snapshot references for this // group snapshot. @@ -269,7 +271,7 @@ type VolumeGroupSnapshotContentStatus struct { // Error is the last observed error during group snapshot creation, if any. // Upon success after retry, this error field will be cleared. // +optional - Error *VolumeGroupSnapshotError `json:"error,omitempty" protobuf:"bytes,4,opt,name=error,casttype=VolumeGroupSnapshotError"` + Error *apis.VolumeSnapshotError `json:"error,omitempty" protobuf:"bytes,4,opt,name=error,casttype=VolumeSnapshotError"` // VolumeSnapshotContentRefList is the list of volume snapshot content references // for this group snapshot. @@ -295,17 +297,3 @@ type VolumeGroupSnapshotContentSource struct { // +optional VolumeGroupSnapshotHandle *string `json:"volumeGroupSnapshotHandle,omitempty" protobuf:"bytes,2,opt,name=volumeGroupSnapshotHandle"` } - -// VolumeGroupSnapshotError describes an error encountered during group snapshot creation. -type VolumeGroupSnapshotError struct { - // Time is the timestamp when the error was encountered. - // +optional - Time *metav1.Time `json:"time,omitempty" protobuf:"bytes,1,opt,name=time"` - - // Message is a string detailing the encountered error during snapshot - // creation if specified. - // NOTE: message may be logged, and it should not contain sensitive - // information. - // +optional - Message *string `json:"message,omitempty" protobuf:"bytes,2,opt,name=message"` -} diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/apis/volumegroupsnapshot/v1alpha1/zz_generated.deepcopy.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/apis/volumegroupsnapshot/v1alpha1/zz_generated.deepcopy.go index 58f4958e..37f87fb4 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/apis/volumegroupsnapshot/v1alpha1/zz_generated.deepcopy.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/apis/volumegroupsnapshot/v1alpha1/zz_generated.deepcopy.go @@ -22,6 +22,7 @@ limitations under the License. package v1alpha1 import ( + apis "github.com/kubernetes-csi/external-snapshotter/client/v6/apis" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" @@ -256,7 +257,7 @@ func (in *VolumeGroupSnapshotContentStatus) DeepCopyInto(out *VolumeGroupSnapsho } if in.Error != nil { in, out := &in.Error, &out.Error - *out = new(VolumeGroupSnapshotError) + *out = new(apis.VolumeSnapshotError) (*in).DeepCopyInto(*out) } if in.VolumeSnapshotContentRefList != nil { @@ -277,31 +278,6 @@ func (in *VolumeGroupSnapshotContentStatus) DeepCopy() *VolumeGroupSnapshotConte return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VolumeGroupSnapshotError) DeepCopyInto(out *VolumeGroupSnapshotError) { - *out = *in - if in.Time != nil { - in, out := &in.Time, &out.Time - *out = (*in).DeepCopy() - } - if in.Message != nil { - in, out := &in.Message, &out.Message - *out = new(string) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeGroupSnapshotError. -func (in *VolumeGroupSnapshotError) DeepCopy() *VolumeGroupSnapshotError { - if in == nil { - return nil - } - out := new(VolumeGroupSnapshotError) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *VolumeGroupSnapshotList) DeepCopyInto(out *VolumeGroupSnapshotList) { *out = *in @@ -380,7 +356,7 @@ func (in *VolumeGroupSnapshotStatus) DeepCopyInto(out *VolumeGroupSnapshotStatus } if in.Error != nil { in, out := &in.Error, &out.Error - *out = new(VolumeGroupSnapshotError) + *out = new(apis.VolumeSnapshotError) (*in).DeepCopyInto(*out) } if in.VolumeSnapshotRefList != nil { 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..958005f7 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 @@ -21,6 +21,8 @@ import ( core_v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + "github.com/kubernetes-csi/external-snapshotter/client/v6/apis" ) // +genclient @@ -182,7 +184,7 @@ type VolumeSnapshotStatus struct { // The snapshot controller will keep retrying when an error occurs during the // snapshot creation. Upon success, this error field will be cleared. // +optional - Error *VolumeSnapshotError `json:"error,omitempty" protobuf:"bytes,5,opt,name=error,casttype=VolumeSnapshotError"` + Error *apis.VolumeSnapshotError `json:"error,omitempty" protobuf:"bytes,5,opt,name=error,casttype=VolumeSnapshotError"` // VolumeGroupSnapshotName is the name of the VolumeGroupSnapshot of which this // VolumeSnapshot is a part of. @@ -419,7 +421,7 @@ type VolumeSnapshotContentStatus struct { // error is the last observed error during snapshot creation, if any. // Upon success after retry, this error field will be cleared. // +optional - Error *VolumeSnapshotError `json:"error,omitempty" protobuf:"bytes,5,opt,name=error,casttype=VolumeSnapshotError"` + Error *apis.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. @@ -440,17 +442,3 @@ const ( // state on release from its volume snapshot. VolumeSnapshotContentRetain DeletionPolicy = "Retain" ) - -// VolumeSnapshotError describes an error encountered during snapshot creation. -type VolumeSnapshotError struct { - // time is the timestamp when the error was encountered. - // +optional - Time *metav1.Time `json:"time,omitempty" protobuf:"bytes,1,opt,name=time"` - - // message is a string detailing the encountered error during snapshot - // creation if specified. - // NOTE: message may be logged, and it should not contain sensitive - // information. - // +optional - Message *string `json:"message,omitempty" protobuf:"bytes,2,opt,name=message"` -} 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..10b31dc0 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 @@ -22,6 +22,7 @@ limitations under the License. package v1 import ( + apis "github.com/kubernetes-csi/external-snapshotter/client/v6/apis" corev1 "k8s.io/api/core/v1" runtime "k8s.io/apimachinery/pkg/runtime" ) @@ -268,7 +269,7 @@ func (in *VolumeSnapshotContentStatus) DeepCopyInto(out *VolumeSnapshotContentSt } if in.Error != nil { in, out := &in.Error, &out.Error - *out = new(VolumeSnapshotError) + *out = new(apis.VolumeSnapshotError) (*in).DeepCopyInto(*out) } if in.VolumeGroupSnapshotContentName != nil { @@ -289,31 +290,6 @@ func (in *VolumeSnapshotContentStatus) DeepCopy() *VolumeSnapshotContentStatus { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VolumeSnapshotError) DeepCopyInto(out *VolumeSnapshotError) { - *out = *in - if in.Time != nil { - in, out := &in.Time, &out.Time - *out = (*in).DeepCopy() - } - if in.Message != nil { - in, out := &in.Message, &out.Message - *out = new(string) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeSnapshotError. -func (in *VolumeSnapshotError) DeepCopy() *VolumeSnapshotError { - if in == nil { - return nil - } - out := new(VolumeSnapshotError) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *VolumeSnapshotList) DeepCopyInto(out *VolumeSnapshotList) { *out = *in @@ -419,7 +395,7 @@ func (in *VolumeSnapshotStatus) DeepCopyInto(out *VolumeSnapshotStatus) { } if in.Error != nil { in, out := &in.Error, &out.Error - *out = new(VolumeSnapshotError) + *out = new(apis.VolumeSnapshotError) (*in).DeepCopyInto(*out) } if in.VolumeGroupSnapshotName != nil { diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/clientset/versioned/clientset.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/clientset/versioned/clientset.go index bc6ea8dd..03ca1e0c 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/clientset/versioned/clientset.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/clientset/versioned/clientset.go @@ -22,7 +22,7 @@ import ( "fmt" "net/http" - snapshotv1alpha1 "github.com/kubernetes-csi/external-snapshotter/client/v6/clientset/versioned/typed/volumegroupsnapshot/v1alpha1" + groupsnapshotv1alpha1 "github.com/kubernetes-csi/external-snapshotter/client/v6/clientset/versioned/typed/volumegroupsnapshot/v1alpha1" snapshotv1 "github.com/kubernetes-csi/external-snapshotter/client/v6/clientset/versioned/typed/volumesnapshot/v1" discovery "k8s.io/client-go/discovery" rest "k8s.io/client-go/rest" @@ -31,20 +31,20 @@ import ( type Interface interface { Discovery() discovery.DiscoveryInterface - SnapshotV1alpha1() snapshotv1alpha1.SnapshotV1alpha1Interface + GroupsnapshotV1alpha1() groupsnapshotv1alpha1.GroupsnapshotV1alpha1Interface SnapshotV1() snapshotv1.SnapshotV1Interface } // Clientset contains the clients for groups. type Clientset struct { *discovery.DiscoveryClient - snapshotV1alpha1 *snapshotv1alpha1.SnapshotV1alpha1Client - snapshotV1 *snapshotv1.SnapshotV1Client + groupsnapshotV1alpha1 *groupsnapshotv1alpha1.GroupsnapshotV1alpha1Client + snapshotV1 *snapshotv1.SnapshotV1Client } -// SnapshotV1alpha1 retrieves the SnapshotV1alpha1Client -func (c *Clientset) SnapshotV1alpha1() snapshotv1alpha1.SnapshotV1alpha1Interface { - return c.snapshotV1alpha1 +// GroupsnapshotV1alpha1 retrieves the GroupsnapshotV1alpha1Client +func (c *Clientset) GroupsnapshotV1alpha1() groupsnapshotv1alpha1.GroupsnapshotV1alpha1Interface { + return c.groupsnapshotV1alpha1 } // SnapshotV1 retrieves the SnapshotV1Client @@ -96,7 +96,7 @@ func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset, var cs Clientset var err error - cs.snapshotV1alpha1, err = snapshotv1alpha1.NewForConfigAndClient(&configShallowCopy, httpClient) + cs.groupsnapshotV1alpha1, err = groupsnapshotv1alpha1.NewForConfigAndClient(&configShallowCopy, httpClient) if err != nil { return nil, err } @@ -125,7 +125,7 @@ func NewForConfigOrDie(c *rest.Config) *Clientset { // New creates a new Clientset for the given RESTClient. func New(c rest.Interface) *Clientset { var cs Clientset - cs.snapshotV1alpha1 = snapshotv1alpha1.New(c) + cs.groupsnapshotV1alpha1 = groupsnapshotv1alpha1.New(c) cs.snapshotV1 = snapshotv1.New(c) cs.DiscoveryClient = discovery.NewDiscoveryClient(c) diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/clientset/versioned/fake/clientset_generated.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/clientset/versioned/fake/clientset_generated.go index a819ba9c..2f3ed833 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/clientset/versioned/fake/clientset_generated.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/clientset/versioned/fake/clientset_generated.go @@ -20,8 +20,8 @@ package fake import ( clientset "github.com/kubernetes-csi/external-snapshotter/client/v6/clientset/versioned" - snapshotv1alpha1 "github.com/kubernetes-csi/external-snapshotter/client/v6/clientset/versioned/typed/volumegroupsnapshot/v1alpha1" - fakesnapshotv1alpha1 "github.com/kubernetes-csi/external-snapshotter/client/v6/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/fake" + groupsnapshotv1alpha1 "github.com/kubernetes-csi/external-snapshotter/client/v6/clientset/versioned/typed/volumegroupsnapshot/v1alpha1" + fakegroupsnapshotv1alpha1 "github.com/kubernetes-csi/external-snapshotter/client/v6/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/fake" snapshotv1 "github.com/kubernetes-csi/external-snapshotter/client/v6/clientset/versioned/typed/volumesnapshot/v1" fakesnapshotv1 "github.com/kubernetes-csi/external-snapshotter/client/v6/clientset/versioned/typed/volumesnapshot/v1/fake" "k8s.io/apimachinery/pkg/runtime" @@ -81,9 +81,9 @@ var ( _ testing.FakeClient = &Clientset{} ) -// SnapshotV1alpha1 retrieves the SnapshotV1alpha1Client -func (c *Clientset) SnapshotV1alpha1() snapshotv1alpha1.SnapshotV1alpha1Interface { - return &fakesnapshotv1alpha1.FakeSnapshotV1alpha1{Fake: &c.Fake} +// GroupsnapshotV1alpha1 retrieves the GroupsnapshotV1alpha1Client +func (c *Clientset) GroupsnapshotV1alpha1() groupsnapshotv1alpha1.GroupsnapshotV1alpha1Interface { + return &fakegroupsnapshotv1alpha1.FakeGroupsnapshotV1alpha1{Fake: &c.Fake} } // SnapshotV1 retrieves the SnapshotV1Client diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/clientset/versioned/fake/register.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/clientset/versioned/fake/register.go index 4edfda99..93b1599c 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/clientset/versioned/fake/register.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/clientset/versioned/fake/register.go @@ -19,7 +19,7 @@ limitations under the License. package fake import ( - snapshotv1alpha1 "github.com/kubernetes-csi/external-snapshotter/client/v6/apis/volumegroupsnapshot/v1alpha1" + groupsnapshotv1alpha1 "github.com/kubernetes-csi/external-snapshotter/client/v6/apis/volumegroupsnapshot/v1alpha1" snapshotv1 "github.com/kubernetes-csi/external-snapshotter/client/v6/apis/volumesnapshot/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" @@ -32,7 +32,7 @@ var scheme = runtime.NewScheme() var codecs = serializer.NewCodecFactory(scheme) var localSchemeBuilder = runtime.SchemeBuilder{ - snapshotv1alpha1.AddToScheme, + groupsnapshotv1alpha1.AddToScheme, snapshotv1.AddToScheme, } diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/clientset/versioned/scheme/register.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/clientset/versioned/scheme/register.go index cb7c3bae..d30e61fb 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/clientset/versioned/scheme/register.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/clientset/versioned/scheme/register.go @@ -19,7 +19,7 @@ limitations under the License. package scheme import ( - snapshotv1alpha1 "github.com/kubernetes-csi/external-snapshotter/client/v6/apis/volumegroupsnapshot/v1alpha1" + groupsnapshotv1alpha1 "github.com/kubernetes-csi/external-snapshotter/client/v6/apis/volumegroupsnapshot/v1alpha1" snapshotv1 "github.com/kubernetes-csi/external-snapshotter/client/v6/apis/volumesnapshot/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" @@ -32,7 +32,7 @@ var Scheme = runtime.NewScheme() var Codecs = serializer.NewCodecFactory(Scheme) var ParameterCodec = runtime.NewParameterCodec(Scheme) var localSchemeBuilder = runtime.SchemeBuilder{ - snapshotv1alpha1.AddToScheme, + groupsnapshotv1alpha1.AddToScheme, snapshotv1.AddToScheme, } diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/fake/fake_volumegroupsnapshot.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/fake/fake_volumegroupsnapshot.go index bdbfb8d5..715eceb7 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/fake/fake_volumegroupsnapshot.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/fake/fake_volumegroupsnapshot.go @@ -32,13 +32,13 @@ import ( // FakeVolumeGroupSnapshots implements VolumeGroupSnapshotInterface type FakeVolumeGroupSnapshots struct { - Fake *FakeSnapshotV1alpha1 + Fake *FakeGroupsnapshotV1alpha1 ns string } -var volumegroupsnapshotsResource = schema.GroupVersionResource{Group: "snapshot.storage.k8s.io", Version: "v1alpha1", Resource: "volumegroupsnapshots"} +var volumegroupsnapshotsResource = schema.GroupVersionResource{Group: "groupsnapshot.storage.k8s.io", Version: "v1alpha1", Resource: "volumegroupsnapshots"} -var volumegroupsnapshotsKind = schema.GroupVersionKind{Group: "snapshot.storage.k8s.io", Version: "v1alpha1", Kind: "VolumeGroupSnapshot"} +var volumegroupsnapshotsKind = schema.GroupVersionKind{Group: "groupsnapshot.storage.k8s.io", Version: "v1alpha1", Kind: "VolumeGroupSnapshot"} // Get takes name of the volumeGroupSnapshot, and returns the corresponding volumeGroupSnapshot object, and an error if there is any. func (c *FakeVolumeGroupSnapshots) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.VolumeGroupSnapshot, err error) { diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/fake/fake_volumegroupsnapshot_client.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/fake/fake_volumegroupsnapshot_client.go index 33198d94..97823a37 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/fake/fake_volumegroupsnapshot_client.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/fake/fake_volumegroupsnapshot_client.go @@ -24,25 +24,25 @@ import ( testing "k8s.io/client-go/testing" ) -type FakeSnapshotV1alpha1 struct { +type FakeGroupsnapshotV1alpha1 struct { *testing.Fake } -func (c *FakeSnapshotV1alpha1) VolumeGroupSnapshots(namespace string) v1alpha1.VolumeGroupSnapshotInterface { +func (c *FakeGroupsnapshotV1alpha1) VolumeGroupSnapshots(namespace string) v1alpha1.VolumeGroupSnapshotInterface { return &FakeVolumeGroupSnapshots{c, namespace} } -func (c *FakeSnapshotV1alpha1) VolumeGroupSnapshotClasses() v1alpha1.VolumeGroupSnapshotClassInterface { +func (c *FakeGroupsnapshotV1alpha1) VolumeGroupSnapshotClasses() v1alpha1.VolumeGroupSnapshotClassInterface { return &FakeVolumeGroupSnapshotClasses{c} } -func (c *FakeSnapshotV1alpha1) VolumeGroupSnapshotContents() v1alpha1.VolumeGroupSnapshotContentInterface { +func (c *FakeGroupsnapshotV1alpha1) VolumeGroupSnapshotContents() v1alpha1.VolumeGroupSnapshotContentInterface { return &FakeVolumeGroupSnapshotContents{c} } // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeSnapshotV1alpha1) RESTClient() rest.Interface { +func (c *FakeGroupsnapshotV1alpha1) RESTClient() rest.Interface { var ret *rest.RESTClient return ret } diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/fake/fake_volumegroupsnapshotclass.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/fake/fake_volumegroupsnapshotclass.go index a2b515ee..50be1cbb 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/fake/fake_volumegroupsnapshotclass.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/fake/fake_volumegroupsnapshotclass.go @@ -32,12 +32,12 @@ import ( // FakeVolumeGroupSnapshotClasses implements VolumeGroupSnapshotClassInterface type FakeVolumeGroupSnapshotClasses struct { - Fake *FakeSnapshotV1alpha1 + Fake *FakeGroupsnapshotV1alpha1 } -var volumegroupsnapshotclassesResource = schema.GroupVersionResource{Group: "snapshot.storage.k8s.io", Version: "v1alpha1", Resource: "volumegroupsnapshotclasses"} +var volumegroupsnapshotclassesResource = schema.GroupVersionResource{Group: "groupsnapshot.storage.k8s.io", Version: "v1alpha1", Resource: "volumegroupsnapshotclasses"} -var volumegroupsnapshotclassesKind = schema.GroupVersionKind{Group: "snapshot.storage.k8s.io", Version: "v1alpha1", Kind: "VolumeGroupSnapshotClass"} +var volumegroupsnapshotclassesKind = schema.GroupVersionKind{Group: "groupsnapshot.storage.k8s.io", Version: "v1alpha1", Kind: "VolumeGroupSnapshotClass"} // Get takes name of the volumeGroupSnapshotClass, and returns the corresponding volumeGroupSnapshotClass object, and an error if there is any. func (c *FakeVolumeGroupSnapshotClasses) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.VolumeGroupSnapshotClass, err error) { diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/fake/fake_volumegroupsnapshotcontent.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/fake/fake_volumegroupsnapshotcontent.go index a177d083..b007122a 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/fake/fake_volumegroupsnapshotcontent.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/fake/fake_volumegroupsnapshotcontent.go @@ -32,12 +32,12 @@ import ( // FakeVolumeGroupSnapshotContents implements VolumeGroupSnapshotContentInterface type FakeVolumeGroupSnapshotContents struct { - Fake *FakeSnapshotV1alpha1 + Fake *FakeGroupsnapshotV1alpha1 } -var volumegroupsnapshotcontentsResource = schema.GroupVersionResource{Group: "snapshot.storage.k8s.io", Version: "v1alpha1", Resource: "volumegroupsnapshotcontents"} +var volumegroupsnapshotcontentsResource = schema.GroupVersionResource{Group: "groupsnapshot.storage.k8s.io", Version: "v1alpha1", Resource: "volumegroupsnapshotcontents"} -var volumegroupsnapshotcontentsKind = schema.GroupVersionKind{Group: "snapshot.storage.k8s.io", Version: "v1alpha1", Kind: "VolumeGroupSnapshotContent"} +var volumegroupsnapshotcontentsKind = schema.GroupVersionKind{Group: "groupsnapshot.storage.k8s.io", Version: "v1alpha1", Kind: "VolumeGroupSnapshotContent"} // Get takes name of the volumeGroupSnapshotContent, and returns the corresponding volumeGroupSnapshotContent object, and an error if there is any. func (c *FakeVolumeGroupSnapshotContents) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.VolumeGroupSnapshotContent, err error) { diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/volumegroupsnapshot.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/volumegroupsnapshot.go index c3329018..c9428f01 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/volumegroupsnapshot.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/volumegroupsnapshot.go @@ -57,7 +57,7 @@ type volumeGroupSnapshots struct { } // newVolumeGroupSnapshots returns a VolumeGroupSnapshots -func newVolumeGroupSnapshots(c *SnapshotV1alpha1Client, namespace string) *volumeGroupSnapshots { +func newVolumeGroupSnapshots(c *GroupsnapshotV1alpha1Client, namespace string) *volumeGroupSnapshots { return &volumeGroupSnapshots{ client: c.RESTClient(), ns: namespace, diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/volumegroupsnapshot_client.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/volumegroupsnapshot_client.go index 6292d3e6..310b0272 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/volumegroupsnapshot_client.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/volumegroupsnapshot_client.go @@ -26,34 +26,34 @@ import ( rest "k8s.io/client-go/rest" ) -type SnapshotV1alpha1Interface interface { +type GroupsnapshotV1alpha1Interface interface { RESTClient() rest.Interface VolumeGroupSnapshotsGetter VolumeGroupSnapshotClassesGetter VolumeGroupSnapshotContentsGetter } -// SnapshotV1alpha1Client is used to interact with features provided by the snapshot.storage.k8s.io group. -type SnapshotV1alpha1Client struct { +// GroupsnapshotV1alpha1Client is used to interact with features provided by the groupsnapshot.storage.k8s.io group. +type GroupsnapshotV1alpha1Client struct { restClient rest.Interface } -func (c *SnapshotV1alpha1Client) VolumeGroupSnapshots(namespace string) VolumeGroupSnapshotInterface { +func (c *GroupsnapshotV1alpha1Client) VolumeGroupSnapshots(namespace string) VolumeGroupSnapshotInterface { return newVolumeGroupSnapshots(c, namespace) } -func (c *SnapshotV1alpha1Client) VolumeGroupSnapshotClasses() VolumeGroupSnapshotClassInterface { +func (c *GroupsnapshotV1alpha1Client) VolumeGroupSnapshotClasses() VolumeGroupSnapshotClassInterface { return newVolumeGroupSnapshotClasses(c) } -func (c *SnapshotV1alpha1Client) VolumeGroupSnapshotContents() VolumeGroupSnapshotContentInterface { +func (c *GroupsnapshotV1alpha1Client) VolumeGroupSnapshotContents() VolumeGroupSnapshotContentInterface { return newVolumeGroupSnapshotContents(c) } -// NewForConfig creates a new SnapshotV1alpha1Client for the given config. +// NewForConfig creates a new GroupsnapshotV1alpha1Client for the given config. // NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), // where httpClient was generated with rest.HTTPClientFor(c). -func NewForConfig(c *rest.Config) (*SnapshotV1alpha1Client, error) { +func NewForConfig(c *rest.Config) (*GroupsnapshotV1alpha1Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err @@ -65,9 +65,9 @@ func NewForConfig(c *rest.Config) (*SnapshotV1alpha1Client, error) { return NewForConfigAndClient(&config, httpClient) } -// NewForConfigAndClient creates a new SnapshotV1alpha1Client for the given config and http client. +// NewForConfigAndClient creates a new GroupsnapshotV1alpha1Client for the given config and http client. // Note the http client provided takes precedence over the configured transport values. -func NewForConfigAndClient(c *rest.Config, h *http.Client) (*SnapshotV1alpha1Client, error) { +func NewForConfigAndClient(c *rest.Config, h *http.Client) (*GroupsnapshotV1alpha1Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err @@ -76,12 +76,12 @@ func NewForConfigAndClient(c *rest.Config, h *http.Client) (*SnapshotV1alpha1Cli if err != nil { return nil, err } - return &SnapshotV1alpha1Client{client}, nil + return &GroupsnapshotV1alpha1Client{client}, nil } -// NewForConfigOrDie creates a new SnapshotV1alpha1Client for the given config and +// NewForConfigOrDie creates a new GroupsnapshotV1alpha1Client for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *SnapshotV1alpha1Client { +func NewForConfigOrDie(c *rest.Config) *GroupsnapshotV1alpha1Client { client, err := NewForConfig(c) if err != nil { panic(err) @@ -89,9 +89,9 @@ func NewForConfigOrDie(c *rest.Config) *SnapshotV1alpha1Client { return client } -// New creates a new SnapshotV1alpha1Client for the given RESTClient. -func New(c rest.Interface) *SnapshotV1alpha1Client { - return &SnapshotV1alpha1Client{c} +// New creates a new GroupsnapshotV1alpha1Client for the given RESTClient. +func New(c rest.Interface) *GroupsnapshotV1alpha1Client { + return &GroupsnapshotV1alpha1Client{c} } func setConfigDefaults(config *rest.Config) error { @@ -109,7 +109,7 @@ func setConfigDefaults(config *rest.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *SnapshotV1alpha1Client) RESTClient() rest.Interface { +func (c *GroupsnapshotV1alpha1Client) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/volumegroupsnapshotclass.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/volumegroupsnapshotclass.go index 067358f1..d71be8cc 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/volumegroupsnapshotclass.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/volumegroupsnapshotclass.go @@ -55,7 +55,7 @@ type volumeGroupSnapshotClasses struct { } // newVolumeGroupSnapshotClasses returns a VolumeGroupSnapshotClasses -func newVolumeGroupSnapshotClasses(c *SnapshotV1alpha1Client) *volumeGroupSnapshotClasses { +func newVolumeGroupSnapshotClasses(c *GroupsnapshotV1alpha1Client) *volumeGroupSnapshotClasses { return &volumeGroupSnapshotClasses{ client: c.RESTClient(), } diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/volumegroupsnapshotcontent.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/volumegroupsnapshotcontent.go index f584441a..b2c20254 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/volumegroupsnapshotcontent.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/volumegroupsnapshotcontent.go @@ -56,7 +56,7 @@ type volumeGroupSnapshotContents struct { } // newVolumeGroupSnapshotContents returns a VolumeGroupSnapshotContents -func newVolumeGroupSnapshotContents(c *SnapshotV1alpha1Client) *volumeGroupSnapshotContents { +func newVolumeGroupSnapshotContents(c *GroupsnapshotV1alpha1Client) *volumeGroupSnapshotContents { return &volumeGroupSnapshotContents{ client: c.RESTClient(), } diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/informers/externalversions/factory.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/informers/externalversions/factory.go index c88d0a9a..5dbf764d 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/informers/externalversions/factory.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/informers/externalversions/factory.go @@ -244,11 +244,11 @@ type SharedInformerFactory interface { // client. InformerFor(obj runtime.Object, newFunc internalinterfaces.NewInformerFunc) cache.SharedIndexInformer - GroupSnapshot() volumegroupsnapshot.Interface + Groupsnapshot() volumegroupsnapshot.Interface Snapshot() volumesnapshot.Interface } -func (f *sharedInformerFactory) GroupSnapshot() volumegroupsnapshot.Interface { +func (f *sharedInformerFactory) Groupsnapshot() volumegroupsnapshot.Interface { return volumegroupsnapshot.New(f, f.namespace, f.tweakListOptions) } diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/informers/externalversions/generic.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/informers/externalversions/generic.go index 2bc781ad..642f96c1 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/informers/externalversions/generic.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/informers/externalversions/generic.go @@ -53,7 +53,15 @@ func (f *genericInformer) Lister() cache.GenericLister { // TODO extend this to unknown resources with a client pool func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource) (GenericInformer, error) { switch resource { - // Group=snapshot.storage.k8s.io, Version=v1 + // Group=groupsnapshot.storage.k8s.io, Version=v1alpha1 + case v1alpha1.SchemeGroupVersion.WithResource("volumegroupsnapshots"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Groupsnapshot().V1alpha1().VolumeGroupSnapshots().Informer()}, nil + case v1alpha1.SchemeGroupVersion.WithResource("volumegroupsnapshotclasses"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Groupsnapshot().V1alpha1().VolumeGroupSnapshotClasses().Informer()}, nil + case v1alpha1.SchemeGroupVersion.WithResource("volumegroupsnapshotcontents"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Groupsnapshot().V1alpha1().VolumeGroupSnapshotContents().Informer()}, nil + + // Group=snapshot.storage.k8s.io, Version=v1 case v1.SchemeGroupVersion.WithResource("volumesnapshots"): return &genericInformer{resource: resource.GroupResource(), informer: f.Snapshot().V1().VolumeSnapshots().Informer()}, nil case v1.SchemeGroupVersion.WithResource("volumesnapshotclasses"): @@ -61,14 +69,6 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource case v1.SchemeGroupVersion.WithResource("volumesnapshotcontents"): return &genericInformer{resource: resource.GroupResource(), informer: f.Snapshot().V1().VolumeSnapshotContents().Informer()}, nil - // Group=snapshot.storage.k8s.io, Version=v1alpha1 - case v1alpha1.SchemeGroupVersion.WithResource("volumegroupsnapshots"): - return &genericInformer{resource: resource.GroupResource(), informer: f.GroupSnapshot().V1alpha1().VolumeGroupSnapshots().Informer()}, nil - case v1alpha1.SchemeGroupVersion.WithResource("volumegroupsnapshotclasses"): - return &genericInformer{resource: resource.GroupResource(), informer: f.GroupSnapshot().V1alpha1().VolumeGroupSnapshotClasses().Informer()}, nil - case v1alpha1.SchemeGroupVersion.WithResource("volumegroupsnapshotcontents"): - return &genericInformer{resource: resource.GroupResource(), informer: f.GroupSnapshot().V1alpha1().VolumeGroupSnapshotContents().Informer()}, nil - } return nil, fmt.Errorf("no informer found for %v", resource) diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/informers/externalversions/volumegroupsnapshot/v1alpha1/volumegroupsnapshot.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/informers/externalversions/volumegroupsnapshot/v1alpha1/volumegroupsnapshot.go index f5a185d0..6f5eb5db 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/informers/externalversions/volumegroupsnapshot/v1alpha1/volumegroupsnapshot.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/informers/externalversions/volumegroupsnapshot/v1alpha1/volumegroupsnapshot.go @@ -62,13 +62,13 @@ func NewFilteredVolumeGroupSnapshotInformer(client versioned.Interface, namespac if tweakListOptions != nil { tweakListOptions(&options) } - return client.SnapshotV1alpha1().VolumeGroupSnapshots(namespace).List(context.TODO(), options) + return client.GroupsnapshotV1alpha1().VolumeGroupSnapshots(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.SnapshotV1alpha1().VolumeGroupSnapshots(namespace).Watch(context.TODO(), options) + return client.GroupsnapshotV1alpha1().VolumeGroupSnapshots(namespace).Watch(context.TODO(), options) }, }, &volumegroupsnapshotv1alpha1.VolumeGroupSnapshot{}, diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/informers/externalversions/volumegroupsnapshot/v1alpha1/volumegroupsnapshotclass.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/informers/externalversions/volumegroupsnapshot/v1alpha1/volumegroupsnapshotclass.go index e82e0d63..c39b0b03 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/informers/externalversions/volumegroupsnapshot/v1alpha1/volumegroupsnapshotclass.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/informers/externalversions/volumegroupsnapshot/v1alpha1/volumegroupsnapshotclass.go @@ -61,13 +61,13 @@ func NewFilteredVolumeGroupSnapshotClassInformer(client versioned.Interface, res if tweakListOptions != nil { tweakListOptions(&options) } - return client.SnapshotV1alpha1().VolumeGroupSnapshotClasses().List(context.TODO(), options) + return client.GroupsnapshotV1alpha1().VolumeGroupSnapshotClasses().List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.SnapshotV1alpha1().VolumeGroupSnapshotClasses().Watch(context.TODO(), options) + return client.GroupsnapshotV1alpha1().VolumeGroupSnapshotClasses().Watch(context.TODO(), options) }, }, &volumegroupsnapshotv1alpha1.VolumeGroupSnapshotClass{}, diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/informers/externalversions/volumegroupsnapshot/v1alpha1/volumegroupsnapshotcontent.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/informers/externalversions/volumegroupsnapshot/v1alpha1/volumegroupsnapshotcontent.go index c8f9618f..00ce200a 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/informers/externalversions/volumegroupsnapshot/v1alpha1/volumegroupsnapshotcontent.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/informers/externalversions/volumegroupsnapshot/v1alpha1/volumegroupsnapshotcontent.go @@ -61,13 +61,13 @@ func NewFilteredVolumeGroupSnapshotContentInformer(client versioned.Interface, r if tweakListOptions != nil { tweakListOptions(&options) } - return client.SnapshotV1alpha1().VolumeGroupSnapshotContents().List(context.TODO(), options) + return client.GroupsnapshotV1alpha1().VolumeGroupSnapshotContents().List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.SnapshotV1alpha1().VolumeGroupSnapshotContents().Watch(context.TODO(), options) + return client.GroupsnapshotV1alpha1().VolumeGroupSnapshotContents().Watch(context.TODO(), options) }, }, &volumegroupsnapshotv1alpha1.VolumeGroupSnapshotContent{}, diff --git a/vendor/modules.txt b/vendor/modules.txt index a888329b..ba324de5 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -100,6 +100,7 @@ github.com/kubernetes-csi/csi-test/v4/driver github.com/kubernetes-csi/csi-test/v4/utils # github.com/kubernetes-csi/external-snapshotter/client/v6 v6.1.0 => ./client ## explicit; go 1.19 +github.com/kubernetes-csi/external-snapshotter/client/v6/apis github.com/kubernetes-csi/external-snapshotter/client/v6/apis/volumegroupsnapshot/v1alpha1 github.com/kubernetes-csi/external-snapshotter/client/v6/apis/volumesnapshot/v1 github.com/kubernetes-csi/external-snapshotter/client/v6/clientset/versioned