Add VolumeGroupSnapshot API definition, including CRD, client,
informer and lister generated code. Update ./client/hack/README with instructions to update the client directory.
This commit is contained in:
20
client/apis/volumegroupsnapshot/v1alpha1/doc.go
Normal file
20
client/apis/volumegroupsnapshot/v1alpha1/doc.go
Normal file
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
Copyright 2023 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// +k8s:deepcopy-gen=package
|
||||
// +groupName=snapshot.storage.k8s.io
|
||||
|
||||
package v1alpha1
|
57
client/apis/volumegroupsnapshot/v1alpha1/register.go
Normal file
57
client/apis/volumegroupsnapshot/v1alpha1/register.go
Normal file
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
Copyright 2023 The Kubernetes Authors.
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
)
|
||||
|
||||
// GroupName is the group name use in this package.
|
||||
const GroupName = "snapshot.storage.k8s.io"
|
||||
|
||||
var (
|
||||
// SchemeBuilder is the new scheme builder
|
||||
SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
|
||||
// AddToScheme adds to scheme
|
||||
AddToScheme = SchemeBuilder.AddToScheme
|
||||
// SchemeGroupVersion is the group version used to register these objects.
|
||||
SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"}
|
||||
)
|
||||
|
||||
func Resource(resource string) schema.GroupResource {
|
||||
return SchemeGroupVersion.WithResource(resource).GroupResource()
|
||||
}
|
||||
|
||||
func init() {
|
||||
// We only register manually written functions here. The registration of the
|
||||
// generated functions takes place in the generated files. The separation
|
||||
// makes the code compile even when the generated files are missing.
|
||||
SchemeBuilder.Register(addKnownTypes)
|
||||
}
|
||||
|
||||
// addKnownTypes adds the set of types defined in this package to the supplied scheme.
|
||||
func addKnownTypes(scheme *runtime.Scheme) error {
|
||||
scheme.AddKnownTypes(SchemeGroupVersion,
|
||||
&VolumeGroupSnapshotClass{},
|
||||
&VolumeGroupSnapshotClassList{},
|
||||
&VolumeGroupSnapshot{},
|
||||
&VolumeGroupSnapshotList{},
|
||||
&VolumeGroupSnapshotContent{},
|
||||
&VolumeGroupSnapshotContentList{},
|
||||
)
|
||||
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
|
||||
return nil
|
||||
}
|
311
client/apis/volumegroupsnapshot/v1alpha1/types.go
Normal file
311
client/apis/volumegroupsnapshot/v1alpha1/types.go
Normal file
@@ -0,0 +1,311 @@
|
||||
/*
|
||||
Copyright 2023 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
// +kubebuilder:object:generate=true
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
core_v1 "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
||||
// VolumeGroupSnapshotSpec defines the desired state of VolumeGroupSnapshot
|
||||
type VolumeGroupSnapshotSpec struct {
|
||||
// Selector is a label query over PersistentVolumeClaims that are to be grouped
|
||||
// together for snapshotting.
|
||||
// This labelSelector will be used to match the label added to a PVC.
|
||||
// If the label is added or removed to a volume after a group snapshot
|
||||
// is created, the existing group snapshots won't be modified.
|
||||
// Once a VolumeGroupSnapshotContent is created and the sidecar starts to process
|
||||
// it, the volume list will not change with retries.
|
||||
Selector *metav1.LabelSelector `json:"selector" protobuf:"bytes,1,opt,name=selector"`
|
||||
|
||||
// VolumeGroupSnapshotClassName is the name of the VolumeGroupSnapshotClass
|
||||
// requested by the VolumeGroupSnapshot.
|
||||
// VolumeGroupSnapshotClassName may be left nil to indicate that the default
|
||||
// class will be used.
|
||||
// Empty string is not allowed for this field.
|
||||
// +optional
|
||||
VolumeGroupSnapshotClassName *string `json:"volumeGroupSnapshotClassName,omitempty" protobuf:"bytes,2,opt,name=volumeGroupSnapshotClassName"`
|
||||
}
|
||||
|
||||
// VolumeGroupSnapshotStatus defines the observed state of VolumeGroupSnapshot
|
||||
type VolumeGroupSnapshotStatus struct {
|
||||
// BoundVolumeGroupSnapshotContentName is the name of the VolumeGroupSnapshotContent
|
||||
// object to which this VolumeGroupSnapshot object intends to bind to.
|
||||
// If not specified, it indicates that the VolumeGroupSnapshot object has not
|
||||
// been successfully bound to a VolumeGroupSnapshotContent object yet.
|
||||
// NOTE: To avoid possible security issues, consumers must verify binding between
|
||||
// VolumeGroupSnapshot and VolumeGroupSnapshotContent objects is successful
|
||||
// (by validating that both VolumeGroupSnapshot and VolumeGroupSnapshotContent
|
||||
// point at each other) before using this object.
|
||||
// +optional
|
||||
BoundVolumeGroupSnapshotContentName *string `json:"boundVolumeGroupSnapshotContentName,omitempty" protobuf:"bytes,1,opt,name=boundVolumeGroupSnapshotContentName"`
|
||||
|
||||
// CreationTime is the timestamp when the point-in-time group snapshot is taken
|
||||
// by the underlying storage system.
|
||||
// If not specified, it may indicate that the creation time of the group snapshot
|
||||
// is unknown.
|
||||
// +optional
|
||||
CreationTime *metav1.Time `json:"creationTime,omitempty" protobuf:"bytes,2,opt,name=creationTime"`
|
||||
|
||||
// ReadyToUse indicates if all the individual snapshots in the group are ready
|
||||
// to be used to restore a volume.
|
||||
// If not specified, it means the readiness of a group snapshot is unknown.
|
||||
// +optional
|
||||
ReadyToUse *bool `json:"readyToUse,omitempty" protobuf:"varint,3,opt,name=readyToUse"`
|
||||
|
||||
// Error is the last observed error during group snapshot creation, if any.
|
||||
// This field could be helpful to upper level controllers (i.e., application
|
||||
// controller) to decide whether they should continue on waiting for the group
|
||||
// snapshot to be created based on the type of error reported.
|
||||
// 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"`
|
||||
|
||||
// VolumeSnapshotRefList is the list of volume snapshot references for this
|
||||
// group snapshot.
|
||||
// The maximum number of allowed snapshots in the group is 100.
|
||||
// +optional
|
||||
VolumeSnapshotRefList []core_v1.ObjectReference `json:"volumeSnapshotRefList,omitempty" protobuf:"bytes,5,opt,name=volumeSnapshotRefList"`
|
||||
}
|
||||
|
||||
//+genclient
|
||||
//+k8s:deepcopy-gen=true
|
||||
//+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
//+kubebuilder:resource:scope=Namespaced,shortName=vgs
|
||||
//+kubebuilder:subresource:status
|
||||
|
||||
// VolumeGroupSnapshot is a user's request for creating either a point-in-time
|
||||
// group snapshot or binding to a pre-existing group snapshot.
|
||||
// +kubebuilder:object:root=true
|
||||
// +kubebuilder:subresource:status
|
||||
type VolumeGroupSnapshot struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||
|
||||
Spec VolumeGroupSnapshotSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"`
|
||||
Status VolumeGroupSnapshotStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
// VolumeGroupSnapshotList contains a list of VolumeGroupSnapshot
|
||||
type VolumeGroupSnapshotList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata,omitempty"`
|
||||
Items []VolumeGroupSnapshot `json:"items"`
|
||||
}
|
||||
|
||||
//+genclient
|
||||
//+genclient:nonNamespaced
|
||||
//+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// VolumeGroupSnapshotClass is the Schema for the volumegroupsnapshotclass API
|
||||
// +kubebuilder:object:root=true
|
||||
// +kubebuilder:subresource:status
|
||||
// +kubebuilder:resource:scope=Cluster,shortName=vsgclass;vsgclasses
|
||||
type VolumeGroupSnapshotClass struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||
|
||||
// Driver is the name of the storage driver expected to handle this VolumeGroupSnapshotClass.
|
||||
// Required.
|
||||
Driver string `json:"driver" protobuf:"bytes,2,opt,name=driver"`
|
||||
|
||||
// Parameters is a key-value map with storage driver specific parameters for
|
||||
// creating group snapshots.
|
||||
// These values are opaque to the system and are passed directly
|
||||
// to the driver.
|
||||
// +optional
|
||||
Parameters map[string]string `json:"parameters,omitempty" protobuf:"bytes,3,rep,name=parameters"`
|
||||
|
||||
// DeletionPolicy determines whether a VolumeGroupSnapshotContent created
|
||||
// through the VolumeGroupSnapshotClass should be deleted when its bound
|
||||
// VolumeGroupSnapshot is deleted.
|
||||
// Supported values are "Retain" and "Delete".
|
||||
// Required.
|
||||
DeletionPolicy *VolumeGroupSnapshotDeletionPolicy `json:"deletionPolicy" protobuf:"bytes,4,opt,name=deletionPolicy"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// VolumeGroupSnapshotClassList is a collection of VolumeGroupSnapshotClasses.
|
||||
// +kubebuilder:object:root=true
|
||||
type VolumeGroupSnapshotClassList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||
|
||||
// Items is the list of VolumeGroupSnapshotClass
|
||||
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:nonNamespaced
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// VolumeGroupSnapshotContent represents the actual "on-disk" group snapshot object
|
||||
// in the underlying storage system
|
||||
// +kubebuilder:object:root=true
|
||||
// +kubebuilder:resource:scope=Cluster,shortName=vsc;vgscs
|
||||
// +kubebuilder:subresource:status
|
||||
type VolumeGroupSnapshotContent struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||
|
||||
Spec VolumeGroupSnapshotContentSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"`
|
||||
Status VolumeGroupSnapshotContentStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// VolumeGroupSnapshotContentList is a list of VolumeGroupSnapshotContent objects
|
||||
// +kubebuilder:object:root=true
|
||||
type VolumeGroupSnapshotContentList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
// +optional
|
||||
metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||
|
||||
// items is the list of VolumeGroupSnapshotContent
|
||||
Items []VolumeGroupSnapshotContent `json:"items" protobuf:"bytes,2,rep,name=items"`
|
||||
}
|
||||
|
||||
// VolumeGroupSnapshotContentSpec describes the common attributes of a group snapshot content
|
||||
type VolumeGroupSnapshotContentSpec struct {
|
||||
// VolumeGroupSnapshotRef specifies the VolumeGroupSnapshot object to which this
|
||||
// VolumeGroupSnapshotContent object is bound.
|
||||
// VolumeGroupSnapshot.Spec.VolumeGroupSnapshotContentName field must reference to
|
||||
// this VolumeGroupSnapshotContent's name for the bidirectional binding to be valid.
|
||||
// For a pre-existing VolumeGroupSnapshotContent object, name and namespace of the
|
||||
// VolumeGroupSnapshot object MUST be provided for binding to happen.
|
||||
// This field is immutable after creation.
|
||||
// Required.
|
||||
VolumeGroupSnapshotRef core_v1.ObjectReference `json:"volumeGroupSnapshotRef" protobuf:"bytes,1,opt,name=volumeGroupSnapshotRef"`
|
||||
|
||||
// DeletionPolicy determines whether this VolumeGroupSnapshotContent and the
|
||||
// physical snapshots on the underlying storage system should be deleted when
|
||||
// the bound VolumeGroupSnapshot is deleted.
|
||||
// Supported values are "Retain" and "Delete".
|
||||
// For dynamically provisioned group snapshots, this field will automatically
|
||||
// be filled in by the CSI snapshotter sidecar with the "DeletionPolicy" field
|
||||
// defined in the corresponding VolumeGroupSnapshotClass.
|
||||
// For pre-existing snapshots, users MUST specify this field when creating the
|
||||
// VolumeGroupSnapshotContent object.
|
||||
// Required.
|
||||
DeletionPolicy VolumeGroupSnapshotDeletionPolicy `json:"deletionPolicy" protobuf:"bytes,2,opt,name=deletionPolicy"`
|
||||
|
||||
// Driver is the name of the CSI driver used to create the physical group snapshot on
|
||||
// the underlying storage system.
|
||||
// This MUST be the same as the name returned by the CSI GetPluginName() call for
|
||||
// that driver.
|
||||
// Required.
|
||||
Driver string `json:"driver" protobuf:"bytes,3,opt,name=driver"`
|
||||
|
||||
// VolumeGroupSnapshotClassName is the name of the VolumeGroupSnapshotClass from
|
||||
// which this group snapshot was (or will be) created.
|
||||
// Note that after provisioning, the VolumeGroupSnapshotClass may be deleted or
|
||||
// recreated with different set of values, and as such, should not be referenced
|
||||
// post-snapshot creation.
|
||||
// For dynamic provisioning, this field must be set.
|
||||
// This field may be unset for pre-provisioned snapshots.
|
||||
// +optional
|
||||
VolumeGroupSnapshotClassName *string `json:"volumeGroupSnapshotClassName,omitempty" protobuf:"bytes,4,opt,name=volumeGroupSnapshotClassName"`
|
||||
|
||||
// Source specifies whether the snapshot is (or should be) dynamically provisioned
|
||||
// or already exists, and just requires a Kubernetes object representation.
|
||||
// This field is immutable after creation.
|
||||
// Required.
|
||||
Source VolumeGroupSnapshotContentSource `json:"source" protobuf:"bytes,5,opt,name=source"`
|
||||
}
|
||||
|
||||
// VolumeGroupSnapshotContentStatus defines the observed state of VolumeGroupSnapshotContent.
|
||||
type VolumeGroupSnapshotContentStatus struct {
|
||||
// VolumeGroupSnapshotHandle is a unique id returned by the CSI driver
|
||||
// to identify the VolumeGroupSnapshot on the storage system.
|
||||
// If a storage system does not provide such an id, the
|
||||
// CSI driver can choose to return the VolumeGroupSnapshot name.
|
||||
// +optional
|
||||
VolumeGroupSnapshotHandle *string `json:"volumeGroupSnapshotHandle,omitempty" protobuf:"bytes,1,opt,name=volumeGroupSnapshotHandle"`
|
||||
|
||||
// CreationTime is the timestamp when the point-in-time group snapshot is taken
|
||||
// by the underlying storage system.
|
||||
// If not specified, it indicates the creation time is unknown.
|
||||
// +optional
|
||||
CreationTime *int64 `json:"creationTime,omitempty" protobuf:"varint,2,opt,name=creationTime"`
|
||||
|
||||
// ReadyToUse indicates if all the individual snapshots in the group are ready to be
|
||||
// used to restore a volume.
|
||||
// If not specified, it means the readiness of a group snapshot is unknown.
|
||||
// +optional
|
||||
ReadyToUse *bool `json:"readyToUse,omitempty" protobuf:"varint,3,opt,name=readyToUse"`
|
||||
|
||||
// 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"`
|
||||
|
||||
// VolumeSnapshotContentRefList is the list of volume snapshot content references
|
||||
// for this group snapshot.
|
||||
// The maximum number of allowed snapshots in the group is 100.
|
||||
// +optional
|
||||
VolumeSnapshotContentRefList []core_v1.ObjectReference `json:"volumeSnapshotRefList,omitempty" protobuf:"bytes,5,opt,name=volumeSnapshotRefList"`
|
||||
}
|
||||
|
||||
// VolumeGroupSnapshotContentSource represents the CSI source of a group snapshot.
|
||||
// Exactly one of its members must be set.
|
||||
// Members in VolumeGroupSnapshotContentSource are immutable.
|
||||
type VolumeGroupSnapshotContentSource struct {
|
||||
// PersistentVolumeNames is a list of names of PersistentVolumes to be snapshotted
|
||||
// together. Signifies dynamic provisioning of the VolumeGroupSnapshot.
|
||||
// This field is immutable.
|
||||
// +optional
|
||||
PersistentVolumeNames []string `json:"persistentVolumeNames,omitempty" protobuf:"bytes,1,opt,name=persistentVolumeNames"`
|
||||
|
||||
// VolumeGroupSnapshotHandle specifies the CSI "snapshot_id" of a pre-existing
|
||||
// snapshot on the underlying storage system for which a Kubernetes object
|
||||
// representation was (or should be) created.
|
||||
// This field is immutable.
|
||||
// +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"`
|
||||
}
|
@@ -0,0 +1,402 @@
|
||||
//go:build !ignore_autogenerated
|
||||
// +build !ignore_autogenerated
|
||||
|
||||
/*
|
||||
Copyright 2023 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by deepcopy-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
v1 "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
)
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *VolumeGroupSnapshot) DeepCopyInto(out *VolumeGroupSnapshot) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||
in.Spec.DeepCopyInto(&out.Spec)
|
||||
in.Status.DeepCopyInto(&out.Status)
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeGroupSnapshot.
|
||||
func (in *VolumeGroupSnapshot) DeepCopy() *VolumeGroupSnapshot {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(VolumeGroupSnapshot)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *VolumeGroupSnapshot) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *VolumeGroupSnapshotClass) DeepCopyInto(out *VolumeGroupSnapshotClass) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||
if in.Parameters != nil {
|
||||
in, out := &in.Parameters, &out.Parameters
|
||||
*out = make(map[string]string, len(*in))
|
||||
for key, val := range *in {
|
||||
(*out)[key] = val
|
||||
}
|
||||
}
|
||||
if in.DeletionPolicy != nil {
|
||||
in, out := &in.DeletionPolicy, &out.DeletionPolicy
|
||||
*out = new(VolumeGroupSnapshotDeletionPolicy)
|
||||
**out = **in
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeGroupSnapshotClass.
|
||||
func (in *VolumeGroupSnapshotClass) DeepCopy() *VolumeGroupSnapshotClass {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(VolumeGroupSnapshotClass)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *VolumeGroupSnapshotClass) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *VolumeGroupSnapshotClassList) DeepCopyInto(out *VolumeGroupSnapshotClassList) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]VolumeGroupSnapshotClass, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeGroupSnapshotClassList.
|
||||
func (in *VolumeGroupSnapshotClassList) DeepCopy() *VolumeGroupSnapshotClassList {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(VolumeGroupSnapshotClassList)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *VolumeGroupSnapshotClassList) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *VolumeGroupSnapshotContent) DeepCopyInto(out *VolumeGroupSnapshotContent) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||
in.Spec.DeepCopyInto(&out.Spec)
|
||||
in.Status.DeepCopyInto(&out.Status)
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeGroupSnapshotContent.
|
||||
func (in *VolumeGroupSnapshotContent) DeepCopy() *VolumeGroupSnapshotContent {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(VolumeGroupSnapshotContent)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *VolumeGroupSnapshotContent) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *VolumeGroupSnapshotContentList) DeepCopyInto(out *VolumeGroupSnapshotContentList) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]VolumeGroupSnapshotContent, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeGroupSnapshotContentList.
|
||||
func (in *VolumeGroupSnapshotContentList) DeepCopy() *VolumeGroupSnapshotContentList {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(VolumeGroupSnapshotContentList)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *VolumeGroupSnapshotContentList) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *VolumeGroupSnapshotContentSource) DeepCopyInto(out *VolumeGroupSnapshotContentSource) {
|
||||
*out = *in
|
||||
if in.PersistentVolumeNames != nil {
|
||||
in, out := &in.PersistentVolumeNames, &out.PersistentVolumeNames
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
if in.VolumeGroupSnapshotHandle != nil {
|
||||
in, out := &in.VolumeGroupSnapshotHandle, &out.VolumeGroupSnapshotHandle
|
||||
*out = new(string)
|
||||
**out = **in
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeGroupSnapshotContentSource.
|
||||
func (in *VolumeGroupSnapshotContentSource) DeepCopy() *VolumeGroupSnapshotContentSource {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(VolumeGroupSnapshotContentSource)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *VolumeGroupSnapshotContentSpec) DeepCopyInto(out *VolumeGroupSnapshotContentSpec) {
|
||||
*out = *in
|
||||
out.VolumeGroupSnapshotRef = in.VolumeGroupSnapshotRef
|
||||
if in.VolumeGroupSnapshotClassName != nil {
|
||||
in, out := &in.VolumeGroupSnapshotClassName, &out.VolumeGroupSnapshotClassName
|
||||
*out = new(string)
|
||||
**out = **in
|
||||
}
|
||||
in.Source.DeepCopyInto(&out.Source)
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeGroupSnapshotContentSpec.
|
||||
func (in *VolumeGroupSnapshotContentSpec) DeepCopy() *VolumeGroupSnapshotContentSpec {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(VolumeGroupSnapshotContentSpec)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *VolumeGroupSnapshotContentStatus) DeepCopyInto(out *VolumeGroupSnapshotContentStatus) {
|
||||
*out = *in
|
||||
if in.VolumeGroupSnapshotHandle != nil {
|
||||
in, out := &in.VolumeGroupSnapshotHandle, &out.VolumeGroupSnapshotHandle
|
||||
*out = new(string)
|
||||
**out = **in
|
||||
}
|
||||
if in.CreationTime != nil {
|
||||
in, out := &in.CreationTime, &out.CreationTime
|
||||
*out = new(int64)
|
||||
**out = **in
|
||||
}
|
||||
if in.ReadyToUse != nil {
|
||||
in, out := &in.ReadyToUse, &out.ReadyToUse
|
||||
*out = new(bool)
|
||||
**out = **in
|
||||
}
|
||||
if in.Error != nil {
|
||||
in, out := &in.Error, &out.Error
|
||||
*out = new(VolumeGroupSnapshotError)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.VolumeSnapshotContentRefList != nil {
|
||||
in, out := &in.VolumeSnapshotContentRefList, &out.VolumeSnapshotContentRefList
|
||||
*out = make([]v1.ObjectReference, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeGroupSnapshotContentStatus.
|
||||
func (in *VolumeGroupSnapshotContentStatus) DeepCopy() *VolumeGroupSnapshotContentStatus {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(VolumeGroupSnapshotContentStatus)
|
||||
in.DeepCopyInto(out)
|
||||
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
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]VolumeGroupSnapshot, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeGroupSnapshotList.
|
||||
func (in *VolumeGroupSnapshotList) DeepCopy() *VolumeGroupSnapshotList {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(VolumeGroupSnapshotList)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *VolumeGroupSnapshotList) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *VolumeGroupSnapshotSpec) DeepCopyInto(out *VolumeGroupSnapshotSpec) {
|
||||
*out = *in
|
||||
if in.Selector != nil {
|
||||
in, out := &in.Selector, &out.Selector
|
||||
*out = new(metav1.LabelSelector)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.VolumeGroupSnapshotClassName != nil {
|
||||
in, out := &in.VolumeGroupSnapshotClassName, &out.VolumeGroupSnapshotClassName
|
||||
*out = new(string)
|
||||
**out = **in
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeGroupSnapshotSpec.
|
||||
func (in *VolumeGroupSnapshotSpec) DeepCopy() *VolumeGroupSnapshotSpec {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(VolumeGroupSnapshotSpec)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *VolumeGroupSnapshotStatus) DeepCopyInto(out *VolumeGroupSnapshotStatus) {
|
||||
*out = *in
|
||||
if in.BoundVolumeGroupSnapshotContentName != nil {
|
||||
in, out := &in.BoundVolumeGroupSnapshotContentName, &out.BoundVolumeGroupSnapshotContentName
|
||||
*out = new(string)
|
||||
**out = **in
|
||||
}
|
||||
if in.CreationTime != nil {
|
||||
in, out := &in.CreationTime, &out.CreationTime
|
||||
*out = (*in).DeepCopy()
|
||||
}
|
||||
if in.ReadyToUse != nil {
|
||||
in, out := &in.ReadyToUse, &out.ReadyToUse
|
||||
*out = new(bool)
|
||||
**out = **in
|
||||
}
|
||||
if in.Error != nil {
|
||||
in, out := &in.Error, &out.Error
|
||||
*out = new(VolumeGroupSnapshotError)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.VolumeSnapshotRefList != nil {
|
||||
in, out := &in.VolumeSnapshotRefList, &out.VolumeSnapshotRefList
|
||||
*out = make([]v1.ObjectReference, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeGroupSnapshotStatus.
|
||||
func (in *VolumeGroupSnapshotStatus) DeepCopy() *VolumeGroupSnapshotStatus {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(VolumeGroupSnapshotStatus)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
@@ -183,6 +183,11 @@ type VolumeSnapshotStatus struct {
|
||||
// snapshot creation. Upon success, this error field will be cleared.
|
||||
// +optional
|
||||
Error *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.
|
||||
// +optional
|
||||
VolumeGroupSnapshotName *string `json:"volumeGroupSnapshotName,omitempty" protobuf:"bytes,6,opt,name=volumeGroupSnapshotName"`
|
||||
}
|
||||
|
||||
// +genclient
|
||||
@@ -415,6 +420,11 @@ type VolumeSnapshotContentStatus struct {
|
||||
// Upon success after retry, this error field will be cleared.
|
||||
// +optional
|
||||
Error *VolumeSnapshotError `json:"error,omitempty" protobuf:"bytes,5,opt,name=error,casttype=VolumeSnapshotError"`
|
||||
|
||||
// VolumeGroupSnapshotContentName is the name of the VolumeGroupSnapshotContent of
|
||||
// which this VolumeSnapshotContent is a part of.
|
||||
// +optional
|
||||
VolumeGroupSnapshotContentName *string `json:"volumeGroupSnapshotContentName,omitempty" protobuf:"bytes,6,opt,name=volumeGroupSnapshotContentName"`
|
||||
}
|
||||
|
||||
// DeletionPolicy describes a policy for end-of-life maintenance of volume snapshot contents
|
||||
|
@@ -2,7 +2,7 @@
|
||||
// +build !ignore_autogenerated
|
||||
|
||||
/*
|
||||
Copyright 2022 The Kubernetes Authors.
|
||||
Copyright 2023 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
@@ -271,6 +271,11 @@ func (in *VolumeSnapshotContentStatus) DeepCopyInto(out *VolumeSnapshotContentSt
|
||||
*out = new(VolumeSnapshotError)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.VolumeGroupSnapshotContentName != nil {
|
||||
in, out := &in.VolumeGroupSnapshotContentName, &out.VolumeGroupSnapshotContentName
|
||||
*out = new(string)
|
||||
**out = **in
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
@@ -417,6 +422,11 @@ func (in *VolumeSnapshotStatus) DeepCopyInto(out *VolumeSnapshotStatus) {
|
||||
*out = new(VolumeSnapshotError)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.VolumeGroupSnapshotName != nil {
|
||||
in, out := &in.VolumeGroupSnapshotName, &out.VolumeGroupSnapshotName
|
||||
*out = new(string)
|
||||
**out = **in
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user