Reuse deletionpolicy and error from snapshot.storage.k8s.io
This commit is contained in:
@@ -1,17 +0,0 @@
|
|||||||
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"`
|
|
||||||
}
|
|
@@ -20,7 +20,7 @@ import (
|
|||||||
core_v1 "k8s.io/api/core/v1"
|
core_v1 "k8s.io/api/core/v1"
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
|
||||||
"github.com/kubernetes-csi/external-snapshotter/client/v6/apis"
|
snapshotv1 "github.com/kubernetes-csi/external-snapshotter/client/v6/apis/volumesnapshot/v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
// VolumeGroupSnapshotSpec defines the desired state of VolumeGroupSnapshot
|
// VolumeGroupSnapshotSpec defines the desired state of VolumeGroupSnapshot
|
||||||
@@ -76,7 +76,7 @@ type VolumeGroupSnapshotStatus struct {
|
|||||||
// The snapshot controller will keep retrying when an error occurs during the
|
// The snapshot controller will keep retrying when an error occurs during the
|
||||||
// group snapshot creation. Upon success, this error field will be cleared.
|
// group snapshot creation. Upon success, this error field will be cleared.
|
||||||
// +optional
|
// +optional
|
||||||
Error *apis.VolumeSnapshotError `json:"error,omitempty" protobuf:"bytes,4,opt,name=error,casttype=VolumeSnapshotError"`
|
Error *snapshotv1.VolumeSnapshotError `json:"error,omitempty" protobuf:"bytes,4,opt,name=error,casttype=VolumeSnapshotError"`
|
||||||
|
|
||||||
// VolumeSnapshotRefList is the list of volume snapshot references for this
|
// VolumeSnapshotRefList is the list of volume snapshot references for this
|
||||||
// group snapshot.
|
// group snapshot.
|
||||||
@@ -139,7 +139,7 @@ type VolumeGroupSnapshotClass struct {
|
|||||||
// VolumeGroupSnapshot is deleted.
|
// VolumeGroupSnapshot is deleted.
|
||||||
// Supported values are "Retain" and "Delete".
|
// Supported values are "Retain" and "Delete".
|
||||||
// Required.
|
// Required.
|
||||||
DeletionPolicy *VolumeGroupSnapshotDeletionPolicy `json:"deletionPolicy" protobuf:"bytes,4,opt,name=deletionPolicy"`
|
DeletionPolicy *snapshotv1.DeletionPolicy `json:"deletionPolicy" protobuf:"bytes,4,opt,name=deletionPolicy"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||||
@@ -154,21 +154,6 @@ type VolumeGroupSnapshotClassList struct {
|
|||||||
Items []VolumeGroupSnapshotClass `json:"items" protobuf:"bytes,2,rep,name=items"`
|
Items []VolumeGroupSnapshotClass `json:"items" protobuf:"bytes,2,rep,name=items"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// VolumeGroupSnapshotDeletionPolicy describes a policy for end-of-life maintenance
|
|
||||||
// of VolumeGroupSnapshotContents.
|
|
||||||
// +kubebuilder:validation:Enum=Delete;Retain
|
|
||||||
type VolumeGroupSnapshotDeletionPolicy string
|
|
||||||
|
|
||||||
const (
|
|
||||||
// VolumeGroupSnapshotContentDelete means the group snapshot will be deleted from the
|
|
||||||
// underlying storage system on release from its volume group snapshot.
|
|
||||||
VolumeGroupSnapshotContentDelete VolumeGroupSnapshotDeletionPolicy = "Delete"
|
|
||||||
|
|
||||||
// VolumeGroupSnapshotContentRetain means the group snapshot will be left in its current
|
|
||||||
// state on release from its volume group snapshot.
|
|
||||||
VolumeGroupSnapshotContentRetain VolumeGroupSnapshotDeletionPolicy = "Retain"
|
|
||||||
)
|
|
||||||
|
|
||||||
// +genclient
|
// +genclient
|
||||||
// +genclient:nonNamespaced
|
// +genclient:nonNamespaced
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||||
@@ -221,7 +206,7 @@ type VolumeGroupSnapshotContentSpec struct {
|
|||||||
// For pre-existing snapshots, users MUST specify this field when creating the
|
// For pre-existing snapshots, users MUST specify this field when creating the
|
||||||
// VolumeGroupSnapshotContent object.
|
// VolumeGroupSnapshotContent object.
|
||||||
// Required.
|
// Required.
|
||||||
DeletionPolicy VolumeGroupSnapshotDeletionPolicy `json:"deletionPolicy" protobuf:"bytes,2,opt,name=deletionPolicy"`
|
DeletionPolicy snapshotv1.DeletionPolicy `json:"deletionPolicy" protobuf:"bytes,2,opt,name=deletionPolicy"`
|
||||||
|
|
||||||
// Driver is the name of the CSI driver used to create the physical group snapshot on
|
// Driver is the name of the CSI driver used to create the physical group snapshot on
|
||||||
// the underlying storage system.
|
// the underlying storage system.
|
||||||
@@ -271,7 +256,7 @@ type VolumeGroupSnapshotContentStatus struct {
|
|||||||
// Error is the last observed error during group snapshot creation, if any.
|
// Error is the last observed error during group snapshot creation, if any.
|
||||||
// Upon success after retry, this error field will be cleared.
|
// Upon success after retry, this error field will be cleared.
|
||||||
// +optional
|
// +optional
|
||||||
Error *apis.VolumeSnapshotError `json:"error,omitempty" protobuf:"bytes,4,opt,name=error,casttype=VolumeSnapshotError"`
|
Error *snapshotv1.VolumeSnapshotError `json:"error,omitempty" protobuf:"bytes,4,opt,name=error,casttype=VolumeSnapshotError"`
|
||||||
|
|
||||||
// VolumeSnapshotContentRefList is the list of volume snapshot content references
|
// VolumeSnapshotContentRefList is the list of volume snapshot content references
|
||||||
// for this group snapshot.
|
// for this group snapshot.
|
||||||
|
@@ -22,8 +22,8 @@ limitations under the License.
|
|||||||
package v1alpha1
|
package v1alpha1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
apis "github.com/kubernetes-csi/external-snapshotter/client/v6/apis"
|
v1 "github.com/kubernetes-csi/external-snapshotter/client/v6/apis/volumesnapshot/v1"
|
||||||
v1 "k8s.io/api/core/v1"
|
corev1 "k8s.io/api/core/v1"
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
)
|
)
|
||||||
@@ -70,7 +70,7 @@ func (in *VolumeGroupSnapshotClass) DeepCopyInto(out *VolumeGroupSnapshotClass)
|
|||||||
}
|
}
|
||||||
if in.DeletionPolicy != nil {
|
if in.DeletionPolicy != nil {
|
||||||
in, out := &in.DeletionPolicy, &out.DeletionPolicy
|
in, out := &in.DeletionPolicy, &out.DeletionPolicy
|
||||||
*out = new(VolumeGroupSnapshotDeletionPolicy)
|
*out = new(v1.DeletionPolicy)
|
||||||
**out = **in
|
**out = **in
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
@@ -257,12 +257,12 @@ func (in *VolumeGroupSnapshotContentStatus) DeepCopyInto(out *VolumeGroupSnapsho
|
|||||||
}
|
}
|
||||||
if in.Error != nil {
|
if in.Error != nil {
|
||||||
in, out := &in.Error, &out.Error
|
in, out := &in.Error, &out.Error
|
||||||
*out = new(apis.VolumeSnapshotError)
|
*out = new(v1.VolumeSnapshotError)
|
||||||
(*in).DeepCopyInto(*out)
|
(*in).DeepCopyInto(*out)
|
||||||
}
|
}
|
||||||
if in.VolumeSnapshotContentRefList != nil {
|
if in.VolumeSnapshotContentRefList != nil {
|
||||||
in, out := &in.VolumeSnapshotContentRefList, &out.VolumeSnapshotContentRefList
|
in, out := &in.VolumeSnapshotContentRefList, &out.VolumeSnapshotContentRefList
|
||||||
*out = make([]v1.ObjectReference, len(*in))
|
*out = make([]corev1.ObjectReference, len(*in))
|
||||||
copy(*out, *in)
|
copy(*out, *in)
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
@@ -356,12 +356,12 @@ func (in *VolumeGroupSnapshotStatus) DeepCopyInto(out *VolumeGroupSnapshotStatus
|
|||||||
}
|
}
|
||||||
if in.Error != nil {
|
if in.Error != nil {
|
||||||
in, out := &in.Error, &out.Error
|
in, out := &in.Error, &out.Error
|
||||||
*out = new(apis.VolumeSnapshotError)
|
*out = new(v1.VolumeSnapshotError)
|
||||||
(*in).DeepCopyInto(*out)
|
(*in).DeepCopyInto(*out)
|
||||||
}
|
}
|
||||||
if in.VolumeSnapshotRefList != nil {
|
if in.VolumeSnapshotRefList != nil {
|
||||||
in, out := &in.VolumeSnapshotRefList, &out.VolumeSnapshotRefList
|
in, out := &in.VolumeSnapshotRefList, &out.VolumeSnapshotRefList
|
||||||
*out = make([]v1.ObjectReference, len(*in))
|
*out = make([]corev1.ObjectReference, len(*in))
|
||||||
copy(*out, *in)
|
copy(*out, *in)
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
|
@@ -21,8 +21,6 @@ import (
|
|||||||
core_v1 "k8s.io/api/core/v1"
|
core_v1 "k8s.io/api/core/v1"
|
||||||
"k8s.io/apimachinery/pkg/api/resource"
|
"k8s.io/apimachinery/pkg/api/resource"
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
|
||||||
"github.com/kubernetes-csi/external-snapshotter/client/v6/apis"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// +genclient
|
// +genclient
|
||||||
@@ -184,7 +182,7 @@ type VolumeSnapshotStatus struct {
|
|||||||
// The snapshot controller will keep retrying when an error occurs during the
|
// The snapshot controller will keep retrying when an error occurs during the
|
||||||
// snapshot creation. Upon success, this error field will be cleared.
|
// snapshot creation. Upon success, this error field will be cleared.
|
||||||
// +optional
|
// +optional
|
||||||
Error *apis.VolumeSnapshotError `json:"error,omitempty" protobuf:"bytes,5,opt,name=error,casttype=VolumeSnapshotError"`
|
Error *VolumeSnapshotError `json:"error,omitempty" protobuf:"bytes,5,opt,name=error,casttype=VolumeSnapshotError"`
|
||||||
|
|
||||||
// VolumeGroupSnapshotName is the name of the VolumeGroupSnapshot of which this
|
// VolumeGroupSnapshotName is the name of the VolumeGroupSnapshot of which this
|
||||||
// VolumeSnapshot is a part of.
|
// VolumeSnapshot is a part of.
|
||||||
@@ -421,7 +419,7 @@ type VolumeSnapshotContentStatus struct {
|
|||||||
// error is the last observed error during snapshot creation, if any.
|
// error is the last observed error during snapshot creation, if any.
|
||||||
// Upon success after retry, this error field will be cleared.
|
// Upon success after retry, this error field will be cleared.
|
||||||
// +optional
|
// +optional
|
||||||
Error *apis.VolumeSnapshotError `json:"error,omitempty" protobuf:"bytes,5,opt,name=error,casttype=VolumeSnapshotError"`
|
Error *VolumeSnapshotError `json:"error,omitempty" protobuf:"bytes,5,opt,name=error,casttype=VolumeSnapshotError"`
|
||||||
|
|
||||||
// VolumeGroupSnapshotContentName is the name of the VolumeGroupSnapshotContent of
|
// VolumeGroupSnapshotContentName is the name of the VolumeGroupSnapshotContent of
|
||||||
// which this VolumeSnapshotContent is a part of.
|
// which this VolumeSnapshotContent is a part of.
|
||||||
@@ -442,3 +440,17 @@ const (
|
|||||||
// state on release from its volume snapshot.
|
// state on release from its volume snapshot.
|
||||||
VolumeSnapshotContentRetain DeletionPolicy = "Retain"
|
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,7 +22,6 @@ limitations under the License.
|
|||||||
package v1
|
package v1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
apis "github.com/kubernetes-csi/external-snapshotter/client/v6/apis"
|
|
||||||
corev1 "k8s.io/api/core/v1"
|
corev1 "k8s.io/api/core/v1"
|
||||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
)
|
)
|
||||||
@@ -269,7 +268,7 @@ func (in *VolumeSnapshotContentStatus) DeepCopyInto(out *VolumeSnapshotContentSt
|
|||||||
}
|
}
|
||||||
if in.Error != nil {
|
if in.Error != nil {
|
||||||
in, out := &in.Error, &out.Error
|
in, out := &in.Error, &out.Error
|
||||||
*out = new(apis.VolumeSnapshotError)
|
*out = new(VolumeSnapshotError)
|
||||||
(*in).DeepCopyInto(*out)
|
(*in).DeepCopyInto(*out)
|
||||||
}
|
}
|
||||||
if in.VolumeGroupSnapshotContentName != nil {
|
if in.VolumeGroupSnapshotContentName != nil {
|
||||||
@@ -290,6 +289,31 @@ func (in *VolumeSnapshotContentStatus) DeepCopy() *VolumeSnapshotContentStatus {
|
|||||||
return out
|
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.
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||||
func (in *VolumeSnapshotList) DeepCopyInto(out *VolumeSnapshotList) {
|
func (in *VolumeSnapshotList) DeepCopyInto(out *VolumeSnapshotList) {
|
||||||
*out = *in
|
*out = *in
|
||||||
@@ -395,7 +419,7 @@ func (in *VolumeSnapshotStatus) DeepCopyInto(out *VolumeSnapshotStatus) {
|
|||||||
}
|
}
|
||||||
if in.Error != nil {
|
if in.Error != nil {
|
||||||
in, out := &in.Error, &out.Error
|
in, out := &in.Error, &out.Error
|
||||||
*out = new(apis.VolumeSnapshotError)
|
*out = new(VolumeSnapshotError)
|
||||||
(*in).DeepCopyInto(*out)
|
(*in).DeepCopyInto(*out)
|
||||||
}
|
}
|
||||||
if in.VolumeGroupSnapshotName != nil {
|
if in.VolumeGroupSnapshotName != nil {
|
||||||
|
17
vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/apis/utils.go
generated
vendored
17
vendor/github.com/kubernetes-csi/external-snapshotter/client/v6/apis/utils.go
generated
vendored
@@ -1,17 +0,0 @@
|
|||||||
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"`
|
|
||||||
}
|
|
@@ -20,7 +20,7 @@ import (
|
|||||||
core_v1 "k8s.io/api/core/v1"
|
core_v1 "k8s.io/api/core/v1"
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
|
||||||
"github.com/kubernetes-csi/external-snapshotter/client/v6/apis"
|
snapshotv1 "github.com/kubernetes-csi/external-snapshotter/client/v6/apis/volumesnapshot/v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
// VolumeGroupSnapshotSpec defines the desired state of VolumeGroupSnapshot
|
// VolumeGroupSnapshotSpec defines the desired state of VolumeGroupSnapshot
|
||||||
@@ -76,7 +76,7 @@ type VolumeGroupSnapshotStatus struct {
|
|||||||
// The snapshot controller will keep retrying when an error occurs during the
|
// The snapshot controller will keep retrying when an error occurs during the
|
||||||
// group snapshot creation. Upon success, this error field will be cleared.
|
// group snapshot creation. Upon success, this error field will be cleared.
|
||||||
// +optional
|
// +optional
|
||||||
Error *apis.VolumeSnapshotError `json:"error,omitempty" protobuf:"bytes,4,opt,name=error,casttype=VolumeSnapshotError"`
|
Error *snapshotv1.VolumeSnapshotError `json:"error,omitempty" protobuf:"bytes,4,opt,name=error,casttype=VolumeSnapshotError"`
|
||||||
|
|
||||||
// VolumeSnapshotRefList is the list of volume snapshot references for this
|
// VolumeSnapshotRefList is the list of volume snapshot references for this
|
||||||
// group snapshot.
|
// group snapshot.
|
||||||
@@ -139,7 +139,7 @@ type VolumeGroupSnapshotClass struct {
|
|||||||
// VolumeGroupSnapshot is deleted.
|
// VolumeGroupSnapshot is deleted.
|
||||||
// Supported values are "Retain" and "Delete".
|
// Supported values are "Retain" and "Delete".
|
||||||
// Required.
|
// Required.
|
||||||
DeletionPolicy *VolumeGroupSnapshotDeletionPolicy `json:"deletionPolicy" protobuf:"bytes,4,opt,name=deletionPolicy"`
|
DeletionPolicy *snapshotv1.DeletionPolicy `json:"deletionPolicy" protobuf:"bytes,4,opt,name=deletionPolicy"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||||
@@ -154,21 +154,6 @@ type VolumeGroupSnapshotClassList struct {
|
|||||||
Items []VolumeGroupSnapshotClass `json:"items" protobuf:"bytes,2,rep,name=items"`
|
Items []VolumeGroupSnapshotClass `json:"items" protobuf:"bytes,2,rep,name=items"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// VolumeGroupSnapshotDeletionPolicy describes a policy for end-of-life maintenance
|
|
||||||
// of VolumeGroupSnapshotContents.
|
|
||||||
// +kubebuilder:validation:Enum=Delete;Retain
|
|
||||||
type VolumeGroupSnapshotDeletionPolicy string
|
|
||||||
|
|
||||||
const (
|
|
||||||
// VolumeGroupSnapshotContentDelete means the group snapshot will be deleted from the
|
|
||||||
// underlying storage system on release from its volume group snapshot.
|
|
||||||
VolumeGroupSnapshotContentDelete VolumeGroupSnapshotDeletionPolicy = "Delete"
|
|
||||||
|
|
||||||
// VolumeGroupSnapshotContentRetain means the group snapshot will be left in its current
|
|
||||||
// state on release from its volume group snapshot.
|
|
||||||
VolumeGroupSnapshotContentRetain VolumeGroupSnapshotDeletionPolicy = "Retain"
|
|
||||||
)
|
|
||||||
|
|
||||||
// +genclient
|
// +genclient
|
||||||
// +genclient:nonNamespaced
|
// +genclient:nonNamespaced
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||||
@@ -221,7 +206,7 @@ type VolumeGroupSnapshotContentSpec struct {
|
|||||||
// For pre-existing snapshots, users MUST specify this field when creating the
|
// For pre-existing snapshots, users MUST specify this field when creating the
|
||||||
// VolumeGroupSnapshotContent object.
|
// VolumeGroupSnapshotContent object.
|
||||||
// Required.
|
// Required.
|
||||||
DeletionPolicy VolumeGroupSnapshotDeletionPolicy `json:"deletionPolicy" protobuf:"bytes,2,opt,name=deletionPolicy"`
|
DeletionPolicy snapshotv1.DeletionPolicy `json:"deletionPolicy" protobuf:"bytes,2,opt,name=deletionPolicy"`
|
||||||
|
|
||||||
// Driver is the name of the CSI driver used to create the physical group snapshot on
|
// Driver is the name of the CSI driver used to create the physical group snapshot on
|
||||||
// the underlying storage system.
|
// the underlying storage system.
|
||||||
@@ -271,7 +256,7 @@ type VolumeGroupSnapshotContentStatus struct {
|
|||||||
// Error is the last observed error during group snapshot creation, if any.
|
// Error is the last observed error during group snapshot creation, if any.
|
||||||
// Upon success after retry, this error field will be cleared.
|
// Upon success after retry, this error field will be cleared.
|
||||||
// +optional
|
// +optional
|
||||||
Error *apis.VolumeSnapshotError `json:"error,omitempty" protobuf:"bytes,4,opt,name=error,casttype=VolumeSnapshotError"`
|
Error *snapshotv1.VolumeSnapshotError `json:"error,omitempty" protobuf:"bytes,4,opt,name=error,casttype=VolumeSnapshotError"`
|
||||||
|
|
||||||
// VolumeSnapshotContentRefList is the list of volume snapshot content references
|
// VolumeSnapshotContentRefList is the list of volume snapshot content references
|
||||||
// for this group snapshot.
|
// for this group snapshot.
|
||||||
|
@@ -22,8 +22,8 @@ limitations under the License.
|
|||||||
package v1alpha1
|
package v1alpha1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
apis "github.com/kubernetes-csi/external-snapshotter/client/v6/apis"
|
v1 "github.com/kubernetes-csi/external-snapshotter/client/v6/apis/volumesnapshot/v1"
|
||||||
v1 "k8s.io/api/core/v1"
|
corev1 "k8s.io/api/core/v1"
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
)
|
)
|
||||||
@@ -70,7 +70,7 @@ func (in *VolumeGroupSnapshotClass) DeepCopyInto(out *VolumeGroupSnapshotClass)
|
|||||||
}
|
}
|
||||||
if in.DeletionPolicy != nil {
|
if in.DeletionPolicy != nil {
|
||||||
in, out := &in.DeletionPolicy, &out.DeletionPolicy
|
in, out := &in.DeletionPolicy, &out.DeletionPolicy
|
||||||
*out = new(VolumeGroupSnapshotDeletionPolicy)
|
*out = new(v1.DeletionPolicy)
|
||||||
**out = **in
|
**out = **in
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
@@ -257,12 +257,12 @@ func (in *VolumeGroupSnapshotContentStatus) DeepCopyInto(out *VolumeGroupSnapsho
|
|||||||
}
|
}
|
||||||
if in.Error != nil {
|
if in.Error != nil {
|
||||||
in, out := &in.Error, &out.Error
|
in, out := &in.Error, &out.Error
|
||||||
*out = new(apis.VolumeSnapshotError)
|
*out = new(v1.VolumeSnapshotError)
|
||||||
(*in).DeepCopyInto(*out)
|
(*in).DeepCopyInto(*out)
|
||||||
}
|
}
|
||||||
if in.VolumeSnapshotContentRefList != nil {
|
if in.VolumeSnapshotContentRefList != nil {
|
||||||
in, out := &in.VolumeSnapshotContentRefList, &out.VolumeSnapshotContentRefList
|
in, out := &in.VolumeSnapshotContentRefList, &out.VolumeSnapshotContentRefList
|
||||||
*out = make([]v1.ObjectReference, len(*in))
|
*out = make([]corev1.ObjectReference, len(*in))
|
||||||
copy(*out, *in)
|
copy(*out, *in)
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
@@ -356,12 +356,12 @@ func (in *VolumeGroupSnapshotStatus) DeepCopyInto(out *VolumeGroupSnapshotStatus
|
|||||||
}
|
}
|
||||||
if in.Error != nil {
|
if in.Error != nil {
|
||||||
in, out := &in.Error, &out.Error
|
in, out := &in.Error, &out.Error
|
||||||
*out = new(apis.VolumeSnapshotError)
|
*out = new(v1.VolumeSnapshotError)
|
||||||
(*in).DeepCopyInto(*out)
|
(*in).DeepCopyInto(*out)
|
||||||
}
|
}
|
||||||
if in.VolumeSnapshotRefList != nil {
|
if in.VolumeSnapshotRefList != nil {
|
||||||
in, out := &in.VolumeSnapshotRefList, &out.VolumeSnapshotRefList
|
in, out := &in.VolumeSnapshotRefList, &out.VolumeSnapshotRefList
|
||||||
*out = make([]v1.ObjectReference, len(*in))
|
*out = make([]corev1.ObjectReference, len(*in))
|
||||||
copy(*out, *in)
|
copy(*out, *in)
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
|
@@ -21,8 +21,6 @@ import (
|
|||||||
core_v1 "k8s.io/api/core/v1"
|
core_v1 "k8s.io/api/core/v1"
|
||||||
"k8s.io/apimachinery/pkg/api/resource"
|
"k8s.io/apimachinery/pkg/api/resource"
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
|
||||||
"github.com/kubernetes-csi/external-snapshotter/client/v6/apis"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// +genclient
|
// +genclient
|
||||||
@@ -184,7 +182,7 @@ type VolumeSnapshotStatus struct {
|
|||||||
// The snapshot controller will keep retrying when an error occurs during the
|
// The snapshot controller will keep retrying when an error occurs during the
|
||||||
// snapshot creation. Upon success, this error field will be cleared.
|
// snapshot creation. Upon success, this error field will be cleared.
|
||||||
// +optional
|
// +optional
|
||||||
Error *apis.VolumeSnapshotError `json:"error,omitempty" protobuf:"bytes,5,opt,name=error,casttype=VolumeSnapshotError"`
|
Error *VolumeSnapshotError `json:"error,omitempty" protobuf:"bytes,5,opt,name=error,casttype=VolumeSnapshotError"`
|
||||||
|
|
||||||
// VolumeGroupSnapshotName is the name of the VolumeGroupSnapshot of which this
|
// VolumeGroupSnapshotName is the name of the VolumeGroupSnapshot of which this
|
||||||
// VolumeSnapshot is a part of.
|
// VolumeSnapshot is a part of.
|
||||||
@@ -421,7 +419,7 @@ type VolumeSnapshotContentStatus struct {
|
|||||||
// error is the last observed error during snapshot creation, if any.
|
// error is the last observed error during snapshot creation, if any.
|
||||||
// Upon success after retry, this error field will be cleared.
|
// Upon success after retry, this error field will be cleared.
|
||||||
// +optional
|
// +optional
|
||||||
Error *apis.VolumeSnapshotError `json:"error,omitempty" protobuf:"bytes,5,opt,name=error,casttype=VolumeSnapshotError"`
|
Error *VolumeSnapshotError `json:"error,omitempty" protobuf:"bytes,5,opt,name=error,casttype=VolumeSnapshotError"`
|
||||||
|
|
||||||
// VolumeGroupSnapshotContentName is the name of the VolumeGroupSnapshotContent of
|
// VolumeGroupSnapshotContentName is the name of the VolumeGroupSnapshotContent of
|
||||||
// which this VolumeSnapshotContent is a part of.
|
// which this VolumeSnapshotContent is a part of.
|
||||||
@@ -442,3 +440,17 @@ const (
|
|||||||
// state on release from its volume snapshot.
|
// state on release from its volume snapshot.
|
||||||
VolumeSnapshotContentRetain DeletionPolicy = "Retain"
|
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,7 +22,6 @@ limitations under the License.
|
|||||||
package v1
|
package v1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
apis "github.com/kubernetes-csi/external-snapshotter/client/v6/apis"
|
|
||||||
corev1 "k8s.io/api/core/v1"
|
corev1 "k8s.io/api/core/v1"
|
||||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
)
|
)
|
||||||
@@ -269,7 +268,7 @@ func (in *VolumeSnapshotContentStatus) DeepCopyInto(out *VolumeSnapshotContentSt
|
|||||||
}
|
}
|
||||||
if in.Error != nil {
|
if in.Error != nil {
|
||||||
in, out := &in.Error, &out.Error
|
in, out := &in.Error, &out.Error
|
||||||
*out = new(apis.VolumeSnapshotError)
|
*out = new(VolumeSnapshotError)
|
||||||
(*in).DeepCopyInto(*out)
|
(*in).DeepCopyInto(*out)
|
||||||
}
|
}
|
||||||
if in.VolumeGroupSnapshotContentName != nil {
|
if in.VolumeGroupSnapshotContentName != nil {
|
||||||
@@ -290,6 +289,31 @@ func (in *VolumeSnapshotContentStatus) DeepCopy() *VolumeSnapshotContentStatus {
|
|||||||
return out
|
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.
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||||
func (in *VolumeSnapshotList) DeepCopyInto(out *VolumeSnapshotList) {
|
func (in *VolumeSnapshotList) DeepCopyInto(out *VolumeSnapshotList) {
|
||||||
*out = *in
|
*out = *in
|
||||||
@@ -395,7 +419,7 @@ func (in *VolumeSnapshotStatus) DeepCopyInto(out *VolumeSnapshotStatus) {
|
|||||||
}
|
}
|
||||||
if in.Error != nil {
|
if in.Error != nil {
|
||||||
in, out := &in.Error, &out.Error
|
in, out := &in.Error, &out.Error
|
||||||
*out = new(apis.VolumeSnapshotError)
|
*out = new(VolumeSnapshotError)
|
||||||
(*in).DeepCopyInto(*out)
|
(*in).DeepCopyInto(*out)
|
||||||
}
|
}
|
||||||
if in.VolumeGroupSnapshotName != nil {
|
if in.VolumeGroupSnapshotName != nil {
|
||||||
|
1
vendor/modules.txt
vendored
1
vendor/modules.txt
vendored
@@ -100,7 +100,6 @@ github.com/kubernetes-csi/csi-test/v4/driver
|
|||||||
github.com/kubernetes-csi/csi-test/v4/utils
|
github.com/kubernetes-csi/csi-test/v4/utils
|
||||||
# github.com/kubernetes-csi/external-snapshotter/client/v6 v6.1.0 => ./client
|
# github.com/kubernetes-csi/external-snapshotter/client/v6 v6.1.0 => ./client
|
||||||
## explicit; go 1.19
|
## 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/volumegroupsnapshot/v1alpha1
|
||||||
github.com/kubernetes-csi/external-snapshotter/client/v6/apis/volumesnapshot/v1
|
github.com/kubernetes-csi/external-snapshotter/client/v6/apis/volumesnapshot/v1
|
||||||
github.com/kubernetes-csi/external-snapshotter/client/v6/clientset/versioned
|
github.com/kubernetes-csi/external-snapshotter/client/v6/clientset/versioned
|
||||||
|
Reference in New Issue
Block a user