Selector in VolumeGroupSnapshotSource API should be optional
This commit is contained in:
@@ -52,8 +52,8 @@ type VolumeGroupSnapshotSource struct {
|
||||
// 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.
|
||||
// Required.
|
||||
Selector metav1.LabelSelector `json:"selector" protobuf:"bytes,1,opt,name=selector"`
|
||||
// +optional
|
||||
Selector *metav1.LabelSelector `json:"selector,omitempty" protobuf:"bytes,1,opt,name=selector"`
|
||||
|
||||
// VolumeGroupSnapshotContentName specifies the name of a pre-existing VolumeGroupSnapshotContent
|
||||
// object representing an existing volume group snapshot.
|
||||
|
@@ -24,6 +24,7 @@ package v1alpha1
|
||||
import (
|
||||
v1 "github.com/kubernetes-csi/external-snapshotter/client/v6/apis/volumesnapshot/v1"
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
)
|
||||
|
||||
@@ -337,7 +338,11 @@ func (in *VolumeGroupSnapshotList) DeepCopyObject() runtime.Object {
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *VolumeGroupSnapshotSource) DeepCopyInto(out *VolumeGroupSnapshotSource) {
|
||||
*out = *in
|
||||
in.Selector.DeepCopyInto(&out.Selector)
|
||||
if in.Selector != nil {
|
||||
in, out := &in.Selector, &out.Selector
|
||||
*out = new(metav1.LabelSelector)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.VolumeGroupSnapshotContentName != nil {
|
||||
in, out := &in.VolumeGroupSnapshotContentName, &out.VolumeGroupSnapshotContentName
|
||||
*out = new(string)
|
||||
|
Reference in New Issue
Block a user