Refactor snapshot error to utils.go
This commit is contained in:
17
client/apis/utils.go
Normal file
17
client/apis/utils.go
Normal file
@@ -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"`
|
||||
}
|
@@ -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"`
|
||||
}
|
||||
|
@@ -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 {
|
||||
|
@@ -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"`
|
||||
}
|
||||
|
@@ -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 {
|
||||
|
@@ -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:
|
||||
|
@@ -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:
|
||||
|
@@ -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:
|
||||
|
17
vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/apis/utils.go
generated
vendored
Normal file
17
vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/apis/utils.go
generated
vendored
Normal file
@@ -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"`
|
||||
}
|
@@ -15,6 +15,6 @@ limitations under the License.
|
||||
*/
|
||||
|
||||
// +k8s:deepcopy-gen=package
|
||||
// +groupName=snapshot.storage.k8s.io
|
||||
// +groupName=groupsnapshot.storage.k8s.io
|
||||
|
||||
package v1alpha1
|
||||
|
@@ -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
|
||||
|
@@ -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"`
|
||||
}
|
||||
|
@@ -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 {
|
||||
|
@@ -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"`
|
||||
}
|
||||
|
@@ -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 {
|
||||
|
@@ -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
|
||||
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)
|
||||
|
@@ -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
|
||||
|
@@ -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,
|
||||
}
|
||||
|
||||
|
@@ -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,
|
||||
}
|
||||
|
||||
|
@@ -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) {
|
||||
|
@@ -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
|
||||
}
|
||||
|
@@ -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) {
|
||||
|
@@ -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) {
|
||||
|
@@ -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,
|
||||
|
@@ -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
|
||||
}
|
||||
|
@@ -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(),
|
||||
}
|
||||
|
@@ -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(),
|
||||
}
|
||||
|
@@ -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)
|
||||
}
|
||||
|
||||
|
@@ -53,6 +53,14 @@ 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=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
|
||||
@@ -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)
|
||||
|
@@ -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{},
|
||||
|
@@ -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{},
|
||||
|
@@ -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{},
|
||||
|
1
vendor/modules.txt
vendored
1
vendor/modules.txt
vendored
@@ -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
|
||||
|
Reference in New Issue
Block a user