From 2215b5ace91675989f8d37b850848e2cd0969b50 Mon Sep 17 00:00:00 2001 From: Leonardo Cecchi Date: Mon, 5 May 2025 16:59:44 +0200 Subject: [PATCH] Introduce v1beta2 VolumeGroupSnapshot API This commit introduces the new VolumeGroupSnapshot v1beta2 API, updates the CRD and the generated code. Both v1beta1 and v1beta2 APIs are served, with v1beta1 being the stored version. --- .../v1beta1/zz_generated.deepcopy.go | 2 +- .../apis/volumegroupsnapshot/v1beta2/doc.go | 20 + .../volumegroupsnapshot/v1beta2/register.go | 57 +++ .../apis/volumegroupsnapshot/v1beta2/types.go | 441 +++++++++++++++++ .../v1beta2/zz_generated.deepcopy.go | 466 ++++++++++++++++++ .../v1/zz_generated.deepcopy.go | 2 +- client/clientset/versioned/clientset.go | 15 +- .../versioned/fake/clientset_generated.go | 9 +- client/clientset/versioned/fake/doc.go | 2 +- client/clientset/versioned/fake/register.go | 4 +- client/clientset/versioned/scheme/doc.go | 2 +- client/clientset/versioned/scheme/register.go | 4 +- .../typed/volumegroupsnapshot/v1beta1/doc.go | 2 +- .../volumegroupsnapshot/v1beta1/fake/doc.go | 2 +- .../v1beta1/fake/fake_volumegroupsnapshot.go | 2 +- .../fake/fake_volumegroupsnapshot_client.go | 2 +- .../fake/fake_volumegroupsnapshotclass.go | 2 +- .../fake/fake_volumegroupsnapshotcontent.go | 2 +- .../v1beta1/generated_expansion.go | 2 +- .../v1beta1/volumegroupsnapshot.go | 2 +- .../v1beta1/volumegroupsnapshot_client.go | 2 +- .../v1beta1/volumegroupsnapshotclass.go | 2 +- .../v1beta1/volumegroupsnapshotcontent.go | 2 +- .../typed/volumegroupsnapshot/v1beta2/doc.go | 20 + .../volumegroupsnapshot/v1beta2/fake/doc.go | 20 + .../v1beta2/fake/fake_volumegroupsnapshot.go | 141 ++++++ .../fake/fake_volumegroupsnapshot_client.go | 48 ++ .../fake/fake_volumegroupsnapshotclass.go | 121 +++++ .../fake/fake_volumegroupsnapshotcontent.go | 132 +++++ .../v1beta2/generated_expansion.go | 25 + .../v1beta2/volumegroupsnapshot.go | 195 ++++++++ .../v1beta2/volumegroupsnapshot_client.go | 117 +++++ .../v1beta2/volumegroupsnapshotclass.go | 168 +++++++ .../v1beta2/volumegroupsnapshotcontent.go | 184 +++++++ .../versioned/typed/volumesnapshot/v1/doc.go | 2 +- .../typed/volumesnapshot/v1/fake/doc.go | 2 +- .../v1/fake/fake_volumesnapshot.go | 2 +- .../v1/fake/fake_volumesnapshot_client.go | 2 +- .../v1/fake/fake_volumesnapshotclass.go | 2 +- .../v1/fake/fake_volumesnapshotcontent.go | 2 +- .../volumesnapshot/v1/generated_expansion.go | 2 +- .../typed/volumesnapshot/v1/volumesnapshot.go | 2 +- .../v1/volumesnapshot_client.go | 2 +- .../volumesnapshot/v1/volumesnapshotclass.go | 2 +- .../v1/volumesnapshotcontent.go | 2 +- ...age.k8s.io_volumegroupsnapshotclasses.yaml | 74 +++ ...ge.k8s.io_volumegroupsnapshotcontents.yaml | 316 ++++++++++++ ...t.storage.k8s.io_volumegroupsnapshots.yaml | 220 +++++++++ client/informers/externalversions/factory.go | 2 +- client/informers/externalversions/generic.go | 11 +- .../internalinterfaces/factory_interfaces.go | 2 +- .../volumegroupsnapshot/interface.go | 10 +- .../volumegroupsnapshot/v1beta1/interface.go | 2 +- .../v1beta1/volumegroupsnapshot.go | 2 +- .../v1beta1/volumegroupsnapshotclass.go | 2 +- .../v1beta1/volumegroupsnapshotcontent.go | 2 +- .../volumegroupsnapshot/v1beta2/interface.go | 59 +++ .../v1beta2/volumegroupsnapshot.go | 90 ++++ .../v1beta2/volumegroupsnapshotclass.go | 89 ++++ .../v1beta2/volumegroupsnapshotcontent.go | 89 ++++ .../volumesnapshot/interface.go | 2 +- .../volumesnapshot/v1/interface.go | 2 +- .../volumesnapshot/v1/volumesnapshot.go | 2 +- .../volumesnapshot/v1/volumesnapshotclass.go | 2 +- .../v1/volumesnapshotcontent.go | 2 +- .../v1beta1/expansion_generated.go | 2 +- .../v1beta1/volumegroupsnapshot.go | 2 +- .../v1beta1/volumegroupsnapshotclass.go | 2 +- .../v1beta1/volumegroupsnapshotcontent.go | 2 +- .../v1beta2/expansion_generated.go | 35 ++ .../v1beta2/volumegroupsnapshot.go | 99 ++++ .../v1beta2/volumegroupsnapshotclass.go | 68 +++ .../v1beta2/volumegroupsnapshotcontent.go | 68 +++ .../volumesnapshot/v1/expansion_generated.go | 2 +- .../volumesnapshot/v1/volumesnapshot.go | 2 +- .../volumesnapshot/v1/volumesnapshotclass.go | 2 +- .../v1/volumesnapshotcontent.go | 2 +- .../v1beta1/zz_generated.deepcopy.go | 2 +- .../apis/volumegroupsnapshot/v1beta2/doc.go | 20 + .../volumegroupsnapshot/v1beta2/register.go | 57 +++ .../apis/volumegroupsnapshot/v1beta2/types.go | 441 +++++++++++++++++ .../v1beta2/zz_generated.deepcopy.go | 466 ++++++++++++++++++ .../v1/zz_generated.deepcopy.go | 2 +- .../v8/clientset/versioned/clientset.go | 15 +- .../versioned/fake/clientset_generated.go | 9 +- .../client/v8/clientset/versioned/fake/doc.go | 2 +- .../v8/clientset/versioned/fake/register.go | 4 +- .../v8/clientset/versioned/scheme/doc.go | 2 +- .../v8/clientset/versioned/scheme/register.go | 4 +- .../typed/volumegroupsnapshot/v1beta1/doc.go | 2 +- .../volumegroupsnapshot/v1beta1/fake/doc.go | 2 +- .../v1beta1/fake/fake_volumegroupsnapshot.go | 2 +- .../fake/fake_volumegroupsnapshot_client.go | 2 +- .../fake/fake_volumegroupsnapshotclass.go | 2 +- .../fake/fake_volumegroupsnapshotcontent.go | 2 +- .../v1beta1/generated_expansion.go | 2 +- .../v1beta1/volumegroupsnapshot.go | 2 +- .../v1beta1/volumegroupsnapshot_client.go | 2 +- .../v1beta1/volumegroupsnapshotclass.go | 2 +- .../v1beta1/volumegroupsnapshotcontent.go | 2 +- .../typed/volumegroupsnapshot/v1beta2/doc.go | 20 + .../volumegroupsnapshot/v1beta2/fake/doc.go | 20 + .../v1beta2/fake/fake_volumegroupsnapshot.go | 141 ++++++ .../fake/fake_volumegroupsnapshot_client.go | 48 ++ .../fake/fake_volumegroupsnapshotclass.go | 121 +++++ .../fake/fake_volumegroupsnapshotcontent.go | 132 +++++ .../v1beta2/generated_expansion.go | 25 + .../v1beta2/volumegroupsnapshot.go | 195 ++++++++ .../v1beta2/volumegroupsnapshot_client.go | 117 +++++ .../v1beta2/volumegroupsnapshotclass.go | 168 +++++++ .../v1beta2/volumegroupsnapshotcontent.go | 184 +++++++ .../versioned/typed/volumesnapshot/v1/doc.go | 2 +- .../typed/volumesnapshot/v1/fake/doc.go | 2 +- .../v1/fake/fake_volumesnapshot.go | 2 +- .../v1/fake/fake_volumesnapshot_client.go | 2 +- .../v1/fake/fake_volumesnapshotclass.go | 2 +- .../v1/fake/fake_volumesnapshotcontent.go | 2 +- .../volumesnapshot/v1/generated_expansion.go | 2 +- .../typed/volumesnapshot/v1/volumesnapshot.go | 2 +- .../v1/volumesnapshot_client.go | 2 +- .../volumesnapshot/v1/volumesnapshotclass.go | 2 +- .../v1/volumesnapshotcontent.go | 2 +- .../v8/informers/externalversions/factory.go | 2 +- .../v8/informers/externalversions/generic.go | 11 +- .../internalinterfaces/factory_interfaces.go | 2 +- .../volumegroupsnapshot/interface.go | 10 +- .../volumegroupsnapshot/v1beta1/interface.go | 2 +- .../v1beta1/volumegroupsnapshot.go | 2 +- .../v1beta1/volumegroupsnapshotclass.go | 2 +- .../v1beta1/volumegroupsnapshotcontent.go | 2 +- .../volumegroupsnapshot/v1beta2/interface.go | 59 +++ .../v1beta2/volumegroupsnapshot.go | 90 ++++ .../v1beta2/volumegroupsnapshotclass.go | 89 ++++ .../v1beta2/volumegroupsnapshotcontent.go | 89 ++++ .../volumesnapshot/interface.go | 2 +- .../volumesnapshot/v1/interface.go | 2 +- .../volumesnapshot/v1/volumesnapshot.go | 2 +- .../volumesnapshot/v1/volumesnapshotclass.go | 2 +- .../v1/volumesnapshotcontent.go | 2 +- .../v1beta1/expansion_generated.go | 2 +- .../v1beta1/volumegroupsnapshot.go | 2 +- .../v1beta1/volumegroupsnapshotclass.go | 2 +- .../v1beta1/volumegroupsnapshotcontent.go | 2 +- .../v1beta2/expansion_generated.go | 35 ++ .../v1beta2/volumegroupsnapshot.go | 99 ++++ .../v1beta2/volumegroupsnapshotclass.go | 68 +++ .../v1beta2/volumegroupsnapshotcontent.go | 68 +++ .../volumesnapshot/v1/expansion_generated.go | 2 +- .../volumesnapshot/v1/volumesnapshot.go | 2 +- .../volumesnapshot/v1/volumesnapshotclass.go | 2 +- .../v1/volumesnapshotcontent.go | 2 +- vendor/modules.txt | 5 + 152 files changed, 6303 insertions(+), 102 deletions(-) create mode 100644 client/apis/volumegroupsnapshot/v1beta2/doc.go create mode 100644 client/apis/volumegroupsnapshot/v1beta2/register.go create mode 100644 client/apis/volumegroupsnapshot/v1beta2/types.go create mode 100644 client/apis/volumegroupsnapshot/v1beta2/zz_generated.deepcopy.go create mode 100644 client/clientset/versioned/typed/volumegroupsnapshot/v1beta2/doc.go create mode 100644 client/clientset/versioned/typed/volumegroupsnapshot/v1beta2/fake/doc.go create mode 100644 client/clientset/versioned/typed/volumegroupsnapshot/v1beta2/fake/fake_volumegroupsnapshot.go create mode 100644 client/clientset/versioned/typed/volumegroupsnapshot/v1beta2/fake/fake_volumegroupsnapshot_client.go create mode 100644 client/clientset/versioned/typed/volumegroupsnapshot/v1beta2/fake/fake_volumegroupsnapshotclass.go create mode 100644 client/clientset/versioned/typed/volumegroupsnapshot/v1beta2/fake/fake_volumegroupsnapshotcontent.go create mode 100644 client/clientset/versioned/typed/volumegroupsnapshot/v1beta2/generated_expansion.go create mode 100644 client/clientset/versioned/typed/volumegroupsnapshot/v1beta2/volumegroupsnapshot.go create mode 100644 client/clientset/versioned/typed/volumegroupsnapshot/v1beta2/volumegroupsnapshot_client.go create mode 100644 client/clientset/versioned/typed/volumegroupsnapshot/v1beta2/volumegroupsnapshotclass.go create mode 100644 client/clientset/versioned/typed/volumegroupsnapshot/v1beta2/volumegroupsnapshotcontent.go create mode 100644 client/informers/externalversions/volumegroupsnapshot/v1beta2/interface.go create mode 100644 client/informers/externalversions/volumegroupsnapshot/v1beta2/volumegroupsnapshot.go create mode 100644 client/informers/externalversions/volumegroupsnapshot/v1beta2/volumegroupsnapshotclass.go create mode 100644 client/informers/externalversions/volumegroupsnapshot/v1beta2/volumegroupsnapshotcontent.go create mode 100644 client/listers/volumegroupsnapshot/v1beta2/expansion_generated.go create mode 100644 client/listers/volumegroupsnapshot/v1beta2/volumegroupsnapshot.go create mode 100644 client/listers/volumegroupsnapshot/v1beta2/volumegroupsnapshotclass.go create mode 100644 client/listers/volumegroupsnapshot/v1beta2/volumegroupsnapshotcontent.go create mode 100644 vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta2/doc.go create mode 100644 vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta2/register.go create mode 100644 vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta2/types.go create mode 100644 vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta2/zz_generated.deepcopy.go create mode 100644 vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta2/doc.go create mode 100644 vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta2/fake/doc.go create mode 100644 vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta2/fake/fake_volumegroupsnapshot.go create mode 100644 vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta2/fake/fake_volumegroupsnapshot_client.go create mode 100644 vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta2/fake/fake_volumegroupsnapshotclass.go create mode 100644 vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta2/fake/fake_volumegroupsnapshotcontent.go create mode 100644 vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta2/generated_expansion.go create mode 100644 vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta2/volumegroupsnapshot.go create mode 100644 vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta2/volumegroupsnapshot_client.go create mode 100644 vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta2/volumegroupsnapshotclass.go create mode 100644 vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta2/volumegroupsnapshotcontent.go create mode 100644 vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumegroupsnapshot/v1beta2/interface.go create mode 100644 vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumegroupsnapshot/v1beta2/volumegroupsnapshot.go create mode 100644 vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumegroupsnapshot/v1beta2/volumegroupsnapshotclass.go create mode 100644 vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumegroupsnapshot/v1beta2/volumegroupsnapshotcontent.go create mode 100644 vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1beta2/expansion_generated.go create mode 100644 vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1beta2/volumegroupsnapshot.go create mode 100644 vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1beta2/volumegroupsnapshotclass.go create mode 100644 vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1beta2/volumegroupsnapshotcontent.go diff --git a/client/apis/volumegroupsnapshot/v1beta1/zz_generated.deepcopy.go b/client/apis/volumegroupsnapshot/v1beta1/zz_generated.deepcopy.go index 4c59130df..0b01c4c05 100644 --- a/client/apis/volumegroupsnapshot/v1beta1/zz_generated.deepcopy.go +++ b/client/apis/volumegroupsnapshot/v1beta1/zz_generated.deepcopy.go @@ -2,7 +2,7 @@ // +build !ignore_autogenerated /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/client/apis/volumegroupsnapshot/v1beta2/doc.go b/client/apis/volumegroupsnapshot/v1beta2/doc.go new file mode 100644 index 000000000..7e20f8d77 --- /dev/null +++ b/client/apis/volumegroupsnapshot/v1beta2/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 2025 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=groupsnapshot.storage.k8s.io + +package v1beta2 diff --git a/client/apis/volumegroupsnapshot/v1beta2/register.go b/client/apis/volumegroupsnapshot/v1beta2/register.go new file mode 100644 index 000000000..d982a1f61 --- /dev/null +++ b/client/apis/volumegroupsnapshot/v1beta2/register.go @@ -0,0 +1,57 @@ +/* +Copyright 2025 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 v1beta2 + +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 = "groupsnapshot.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: "v1beta2"} +) + +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 +} diff --git a/client/apis/volumegroupsnapshot/v1beta2/types.go b/client/apis/volumegroupsnapshot/v1beta2/types.go new file mode 100644 index 000000000..2c8f15479 --- /dev/null +++ b/client/apis/volumegroupsnapshot/v1beta2/types.go @@ -0,0 +1,441 @@ +/* +Copyright 2025 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 v1beta2 + +import ( + core_v1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + snapshotv1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumesnapshot/v1" +) + +// VolumeGroupSnapshotSpec defines the desired state of a volume group snapshot. +type VolumeGroupSnapshotSpec struct { + // Source specifies where a group snapshot will be created from. + // This field is immutable after creation. + // Required. + Source VolumeGroupSnapshotSource `json:"source" protobuf:"bytes,1,opt,name=source"` + + // 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 + // +kubebuilder:validation:XValidation:rule="size(self) > 0",message="volumeGroupSnapshotClassName must not be the empty string when set" + VolumeGroupSnapshotClassName *string `json:"volumeGroupSnapshotClassName,omitempty" protobuf:"bytes,2,opt,name=volumeGroupSnapshotClassName"` +} + +// VolumeGroupSnapshotSource specifies whether the underlying group snapshot should be +// dynamically taken upon creation or if a pre-existing VolumeGroupSnapshotContent +// object should be used. +// Exactly one of its members must be set. +// Members in VolumeGroupSnapshotSource are immutable. +// +kubebuilder:validation:XValidation:rule="!has(oldSelf.selector) || has(self.selector)", message="selector is required once set" +// +kubebuilder:validation:XValidation:rule="!has(oldSelf.volumeGroupSnapshotContentName) || has(self.volumeGroupSnapshotContentName)", message="volumeGroupSnapshotContentName is required once set" +// +kubebuilder:validation:XValidation:rule="(has(self.selector) && !has(self.volumeGroupSnapshotContentName)) || (!has(self.selector) && has(self.volumeGroupSnapshotContentName))", message="exactly one of selector and volumeGroupSnapshotContentName must be set" +type VolumeGroupSnapshotSource struct { + // Selector is a label query over persistent volume claims 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. + // +optional + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="selector is immutable" + 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. + // This field should be set if the volume group snapshot already exists and + // only needs a representation in Kubernetes. + // This field is immutable. + // +optional + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="volumeGroupSnapshotContentName is immutable" + VolumeGroupSnapshotContentName *string `json:"volumeGroupSnapshotContentName,omitempty" protobuf:"bytes,2,opt,name=volumeGroupSnapshotContentName"` +} + +// VolumeGroupSnapshotStatus defines the observed state of volume group snapshot. +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. + // The format of this field is a Unix nanoseconds time encoded as an int64. + // On Unix, the command date +%s%N returns the current time in nanoseconds + // since 1970-01-01 00:00:00 UTC. + // This field is updated based on the CreationTime field in VolumeGroupSnapshotContentStatus + // +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 group of volumes. + // ReadyToUse becomes true when ReadyToUse of all individual snapshots become true. + // 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 *snapshotv1.VolumeSnapshotError `json:"error,omitempty" protobuf:"bytes,4,opt,name=error,casttype=VolumeSnapshotError"` +} + +//+genclient +//+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// 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:storageversion +// +kubebuilder:resource:scope=Namespaced,shortName=vgs +// +kubebuilder:subresource:status +// +kubebuilder:printcolumn:name="ReadyToUse",type=boolean,JSONPath=`.status.readyToUse`,description="Indicates if all the individual snapshots in the group are ready to be used to restore a group of volumes." +// +kubebuilder:printcolumn:name="VolumeGroupSnapshotClass",type=string,JSONPath=`.spec.volumeGroupSnapshotClassName`,description="The name of the VolumeGroupSnapshotClass requested by the VolumeGroupSnapshot." +// +kubebuilder:printcolumn:name="VolumeGroupSnapshotContent",type=string,JSONPath=`.status.boundVolumeGroupSnapshotContentName`,description="Name of the VolumeGroupSnapshotContent object to which the VolumeGroupSnapshot object intends to bind to. Please note that verification of binding actually requires checking both VolumeGroupSnapshot and VolumeGroupSnapshotContent to ensure both are pointing at each other. Binding MUST be verified prior to usage of this object." +// +kubebuilder:printcolumn:name="CreationTime",type=date,JSONPath=`.status.creationTime`,description="Timestamp when the point-in-time group snapshot was taken by the underlying storage system." +// +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp` +type VolumeGroupSnapshot struct { + metav1.TypeMeta `json:",inline"` + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Spec defines the desired characteristics of a group snapshot requested by a user. + // Required. + Spec VolumeGroupSnapshotSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"` + // Status represents the current information of a group snapshot. + // Consumers must verify binding between VolumeGroupSnapshot and + // VolumeGroupSnapshotContent objects is successful (by validating that both + // VolumeGroupSnapshot and VolumeGroupSnapshotContent point to each other) before + // using this object. + // +optional + 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 objects. +type VolumeGroupSnapshotList struct { + metav1.TypeMeta `json:",inline"` + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + // Items is the list of VolumeGroupSnapshots. + Items []VolumeGroupSnapshot `json:"items" protobuf:"bytes,2,rep,name=items"` +} + +//+genclient +//+genclient:nonNamespaced +//+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// VolumeGroupSnapshotClass specifies parameters that a underlying storage system +// uses when creating a volume group snapshot. A specific VolumeGroupSnapshotClass +// is used by specifying its name in a VolumeGroupSnapshot object. +// VolumeGroupSnapshotClasses are non-namespaced. +// +kubebuilder:object:root=true +// +kubebuilder:storageversion +// +kubebuilder:resource:scope=Cluster,shortName=vgsclass;vgsclasses +// +kubebuilder:printcolumn:name="Driver",type=string,JSONPath=`.driver` +// +kubebuilder:printcolumn:name="DeletionPolicy",type=string,JSONPath=`.deletionPolicy`,description="Determines whether a VolumeGroupSnapshotContent created through the VolumeGroupSnapshotClass should be deleted when its bound VolumeGroupSnapshot is deleted." +// +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp` +type VolumeGroupSnapshotClass struct { + metav1.TypeMeta `json:",inline"` + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + // +optional + 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 Kubernetes 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". + // "Retain" means that the VolumeGroupSnapshotContent and its physical group + // snapshot on underlying storage system are kept. + // "Delete" means that the VolumeGroupSnapshotContent and its physical group + // snapshot on underlying storage system are deleted. + // Required. + DeletionPolicy snapshotv1.DeletionPolicy `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"` + // Standard list metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Items is the list of VolumeGroupSnapshotClasses. + Items []VolumeGroupSnapshotClass `json:"items" protobuf:"bytes,2,rep,name=items"` +} + +// +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:storageversion +// +kubebuilder:resource:scope=Cluster,shortName=vgsc;vgscs +// +kubebuilder:subresource:status +// +kubebuilder:printcolumn:name="ReadyToUse",type=boolean,JSONPath=`.status.readyToUse`,description="Indicates if all the individual snapshots in the group are ready to be used to restore a group of volumes." +// +kubebuilder:printcolumn:name="DeletionPolicy",type=string,JSONPath=`.spec.deletionPolicy`,description="Determines whether this VolumeGroupSnapshotContent and its physical group snapshot on the underlying storage system should be deleted when its bound VolumeGroupSnapshot is deleted." +// +kubebuilder:printcolumn:name="Driver",type=string,JSONPath=`.spec.driver`,description="Name of the CSI driver used to create the physical group snapshot on the underlying storage system." +// +kubebuilder:printcolumn:name="VolumeGroupSnapshotClass",type=string,JSONPath=`.spec.volumeGroupSnapshotClassName`,description="Name of the VolumeGroupSnapshotClass from which this group snapshot was (or will be) created." +// +kubebuilder:printcolumn:name="VolumeGroupSnapshotNamespace",type=string,JSONPath=`.spec.volumeGroupSnapshotRef.namespace`,description="Namespace of the VolumeGroupSnapshot object to which this VolumeGroupSnapshotContent object is bound." +// +kubebuilder:printcolumn:name="VolumeGroupSnapshot",type=string,JSONPath=`.spec.volumeGroupSnapshotRef.name`,description="Name of the VolumeGroupSnapshot object to which this VolumeGroupSnapshotContent object is bound." +// +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp` +type VolumeGroupSnapshotContent struct { + metav1.TypeMeta `json:",inline"` + // Standard list metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Spec defines properties of a VolumeGroupSnapshotContent created by the underlying storage system. + // Required. + Spec VolumeGroupSnapshotContentSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"` + // status represents the current information of a group snapshot. + // +optional + 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"` + // Standard list metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Items is the list of VolumeGroupSnapshotContents. + 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. + // +kubebuilder:validation:XValidation:rule="has(self.name) && has(self.__namespace__)",message="both volumeGroupSnapshotRef.name and volumeGroupSnapshotRef.namespace must be set" + VolumeGroupSnapshotRef core_v1.ObjectReference `json:"volumeGroupSnapshotRef" protobuf:"bytes,1,opt,name=volumeGroupSnapshotRef"` + + // DeletionPolicy determines whether this VolumeGroupSnapshotContent and the + // physical group snapshot on the underlying storage system should be deleted + // when the bound VolumeGroupSnapshot is deleted. + // Supported values are "Retain" and "Delete". + // "Retain" means that the VolumeGroupSnapshotContent and its physical group + // snapshot on underlying storage system are kept. + // "Delete" means that the VolumeGroupSnapshotContent and its physical group + // snapshot on underlying storage system are deleted. + // 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 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 + // 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"` +} + +// The VolumeSnapshotInfo struct is added in v1beta2 +// VolumeSnapshotInfo contains information for a snapshot +type VolumeSnapshotInfo struct { + // VolumeHandle is a unique id returned by the CSI driver to identify a volume + // on the storage system + VolumeHandle string `json:"volumeHandle,omitempty" protobuf:"bytes,1,opt,name=volumeHandle"` + + // SnapshotHandle is a unique id returned by the CSI driver to identify a volume + // snapshot on the storage system + SnapshotHandle string `json:"snapshotHandle,omitempty" protobuf:"bytes,2,opt,name=snapshotHandle"` + + // creationTime is the timestamp when the point-in-time snapshot is taken + // by the underlying storage system. + // +optional + CreationTime *int64 `json:"creationTime,omitempty" protobuf:"varint,3,opt,name=creationTime"` + + // ReadyToUse indicates if the snapshot is ready to be used to restore a volume. + // +optional + ReadyToUse *bool `json:"readyToUse,omitempty" protobuf:"varint,4,opt,name=readyToUse"` + + // RestoreSize represents the complete size of the snapshot in bytes. + // +optional + RestoreSize *int64 `json:"restoreSize,omitempty" protobuf:"bytes,5,opt,name=restoreSize"` +} + +// 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. + // If not specified, it means the readiness of a group snapshot is unknown. + // The format of this field is a Unix nanoseconds time encoded as an int64. + // On Unix, the command date +%s%N returns the current time in nanoseconds + // since 1970-01-01 00:00:00 UTC. + // This field is the source for the CreationTime field in VolumeGroupSnapshotStatus + // +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 group of volumes. + // ReadyToUse becomes true when ReadyToUse of all individual snapshots become true. + // +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 *snapshotv1.VolumeSnapshotError `json:"error,omitempty" protobuf:"bytes,4,opt,name=error,casttype=VolumeSnapshotError"` + + // This field is introduced in v1beta1 but removed in v1beta2 + // It is replaced by VolumeSnapshotInfoList + // Information in this field from an existing v1beta1 API object + // will be copied to VolumeSnapshotInfoList by the conversion logic + // + // VolumeSnapshotHandlePairList is a list of CSI "volume_id" and "snapshot_id" + // pair returned by the CSI driver to identify snapshots and their source volumes + // on the storage system. + // +optional + // VolumeSnapshotHandlePairList []VolumeSnapshotHandlePair `json:"volumeSnapshotHandlePairList,omitempty" protobuf:"bytes,6,opt,name=volumeSnapshotHandlePairList"` + + // This field is introduced in v1beta2 + // It is replacing VolumeSnapshotHandlePairList + // VolumeSnapshotInfoList is a list of snapshot information returned by + // by the CSI driver to identify snapshots on the storage system. + // +optional + VolumeSnapshotInfoList []VolumeSnapshotInfo `json:"volumeSnapshotInfoList,omitempty" protobuf:"bytes,5,opt,name=volumeSnapshotInfo"` +} + +// VolumeGroupSnapshotContentSource represents the CSI source of a group snapshot. +// Exactly one of its members must be set. +// Members in VolumeGroupSnapshotContentSource are immutable. +// +kubebuilder:validation:XValidation:rule="!has(oldSelf.volumeHandles) || has(self.volumeHandles)", message="volumeHandles is required once set" +// +kubebuilder:validation:XValidation:rule="!has(oldSelf.groupSnapshotHandles) || has(self.groupSnapshotHandles)", message="groupSnapshotHandles is required once set" +// +kubebuilder:validation:XValidation:rule="(has(self.volumeHandles) && !has(self.groupSnapshotHandles)) || (!has(self.volumeHandles) && has(self.groupSnapshotHandles))", message="exactly one of volumeHandles and groupSnapshotHandles must be set" +type VolumeGroupSnapshotContentSource struct { + // VolumeHandles is a list of volume handles on the backend to be snapshotted + // together. It is specified for dynamic provisioning of the VolumeGroupSnapshot. + // This field is immutable. + // +optional + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="volumeHandles is immutable" + VolumeHandles []string `json:"volumeHandles,omitempty" protobuf:"bytes,1,opt,name=volumeHandles"` + + // GroupSnapshotHandles specifies the CSI "group_snapshot_id" of a pre-existing + // group snapshot and a list of CSI "snapshot_id" of pre-existing snapshots + // on the underlying storage system for which a Kubernetes object + // representation was (or should be) created. + // This field is immutable. + // +optional + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="groupSnapshotHandles is immutable" + GroupSnapshotHandles *GroupSnapshotHandles `json:"groupSnapshotHandles,omitempty" protobuf:"bytes,2,opt,name=groupSnapshotHandles"` +} + +type GroupSnapshotHandles struct { + // VolumeGroupSnapshotHandle specifies the CSI "group_snapshot_id" of a pre-existing + // group snapshot on the underlying storage system for which a Kubernetes object + // representation was (or should be) created. + // This field is immutable. + // Required. + VolumeGroupSnapshotHandle string `json:"volumeGroupSnapshotHandle" protobuf:"bytes,1,opt,name=volumeGroupSnapshotHandle"` + + // VolumeSnapshotHandles is a list of CSI "snapshot_id" of pre-existing + // snapshots on the underlying storage system for which Kubernetes objects + // representation were (or should be) created. + // This field is immutable. + // Required. + VolumeSnapshotHandles []string `json:"volumeSnapshotHandles" protobuf:"bytes,2,opt,name=volumeSnapshotHandles"` +} + +// VolumeSnapshotHandlePair defines a pair of a source volume handle and a snapshot handle +type VolumeSnapshotHandlePair struct { + // VolumeHandle is a unique id returned by the CSI driver to identify a volume + // on the storage system + // Required. + VolumeHandle string `json:"volumeHandle" protobuf:"bytes,1,opt,name=volumeHandle"` + + // SnapshotHandle is a unique id returned by the CSI driver to identify a volume + // snapshot on the storage system + // Required. + SnapshotHandle string `json:"snapshotHandle" protobuf:"bytes,2,opt,name=snapshotHandle"` +} diff --git a/client/apis/volumegroupsnapshot/v1beta2/zz_generated.deepcopy.go b/client/apis/volumegroupsnapshot/v1beta2/zz_generated.deepcopy.go new file mode 100644 index 000000000..05729d72a --- /dev/null +++ b/client/apis/volumegroupsnapshot/v1beta2/zz_generated.deepcopy.go @@ -0,0 +1,466 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright 2025 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 v1beta2 + +import ( + v1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumesnapshot/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 *GroupSnapshotHandles) DeepCopyInto(out *GroupSnapshotHandles) { + *out = *in + if in.VolumeSnapshotHandles != nil { + in, out := &in.VolumeSnapshotHandles, &out.VolumeSnapshotHandles + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GroupSnapshotHandles. +func (in *GroupSnapshotHandles) DeepCopy() *GroupSnapshotHandles { + if in == nil { + return nil + } + out := new(GroupSnapshotHandles) + in.DeepCopyInto(out) + return out +} + +// 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) + if in.Status != nil { + in, out := &in.Status, &out.Status + *out = new(VolumeGroupSnapshotStatus) + (*in).DeepCopyInto(*out) + } + 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 + } + } + 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) + if in.Status != nil { + in, out := &in.Status, &out.Status + *out = new(VolumeGroupSnapshotContentStatus) + (*in).DeepCopyInto(*out) + } + 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.VolumeHandles != nil { + in, out := &in.VolumeHandles, &out.VolumeHandles + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.GroupSnapshotHandles != nil { + in, out := &in.GroupSnapshotHandles, &out.GroupSnapshotHandles + *out = new(GroupSnapshotHandles) + (*in).DeepCopyInto(*out) + } + 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 = (*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(v1.VolumeSnapshotError) + (*in).DeepCopyInto(*out) + } + if in.VolumeSnapshotInfoList != nil { + in, out := &in.VolumeSnapshotInfoList, &out.VolumeSnapshotInfoList + *out = make([]VolumeSnapshotInfo, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + 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 *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 *VolumeGroupSnapshotSource) DeepCopyInto(out *VolumeGroupSnapshotSource) { + *out = *in + 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) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeGroupSnapshotSource. +func (in *VolumeGroupSnapshotSource) DeepCopy() *VolumeGroupSnapshotSource { + if in == nil { + return nil + } + out := new(VolumeGroupSnapshotSource) + in.DeepCopyInto(out) + return out +} + +// 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 + in.Source.DeepCopyInto(&out.Source) + 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(v1.VolumeSnapshotError) + (*in).DeepCopyInto(*out) + } + 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 +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VolumeSnapshotHandlePair) DeepCopyInto(out *VolumeSnapshotHandlePair) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeSnapshotHandlePair. +func (in *VolumeSnapshotHandlePair) DeepCopy() *VolumeSnapshotHandlePair { + if in == nil { + return nil + } + out := new(VolumeSnapshotHandlePair) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VolumeSnapshotInfo) DeepCopyInto(out *VolumeSnapshotInfo) { + *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.RestoreSize != nil { + in, out := &in.RestoreSize, &out.RestoreSize + *out = new(int64) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeSnapshotInfo. +func (in *VolumeSnapshotInfo) DeepCopy() *VolumeSnapshotInfo { + if in == nil { + return nil + } + out := new(VolumeSnapshotInfo) + in.DeepCopyInto(out) + return out +} diff --git a/client/apis/volumesnapshot/v1/zz_generated.deepcopy.go b/client/apis/volumesnapshot/v1/zz_generated.deepcopy.go index a590aef06..d4f75a9e0 100644 --- a/client/apis/volumesnapshot/v1/zz_generated.deepcopy.go +++ b/client/apis/volumesnapshot/v1/zz_generated.deepcopy.go @@ -2,7 +2,7 @@ // +build !ignore_autogenerated /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/client/clientset/versioned/clientset.go b/client/clientset/versioned/clientset.go index 050de3b87..9a165783e 100644 --- a/client/clientset/versioned/clientset.go +++ b/client/clientset/versioned/clientset.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. @@ -23,6 +23,7 @@ import ( "net/http" groupsnapshotv1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1" + groupsnapshotv1beta2 "github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta2" snapshotv1 "github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumesnapshot/v1" discovery "k8s.io/client-go/discovery" rest "k8s.io/client-go/rest" @@ -32,6 +33,7 @@ import ( type Interface interface { Discovery() discovery.DiscoveryInterface GroupsnapshotV1beta1() groupsnapshotv1beta1.GroupsnapshotV1beta1Interface + GroupsnapshotV1beta2() groupsnapshotv1beta2.GroupsnapshotV1beta2Interface SnapshotV1() snapshotv1.SnapshotV1Interface } @@ -39,6 +41,7 @@ type Interface interface { type Clientset struct { *discovery.DiscoveryClient groupsnapshotV1beta1 *groupsnapshotv1beta1.GroupsnapshotV1beta1Client + groupsnapshotV1beta2 *groupsnapshotv1beta2.GroupsnapshotV1beta2Client snapshotV1 *snapshotv1.SnapshotV1Client } @@ -47,6 +50,11 @@ func (c *Clientset) GroupsnapshotV1beta1() groupsnapshotv1beta1.GroupsnapshotV1b return c.groupsnapshotV1beta1 } +// GroupsnapshotV1beta2 retrieves the GroupsnapshotV1beta2Client +func (c *Clientset) GroupsnapshotV1beta2() groupsnapshotv1beta2.GroupsnapshotV1beta2Interface { + return c.groupsnapshotV1beta2 +} + // SnapshotV1 retrieves the SnapshotV1Client func (c *Clientset) SnapshotV1() snapshotv1.SnapshotV1Interface { return c.snapshotV1 @@ -100,6 +108,10 @@ func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset, if err != nil { return nil, err } + cs.groupsnapshotV1beta2, err = groupsnapshotv1beta2.NewForConfigAndClient(&configShallowCopy, httpClient) + if err != nil { + return nil, err + } cs.snapshotV1, err = snapshotv1.NewForConfigAndClient(&configShallowCopy, httpClient) if err != nil { return nil, err @@ -126,6 +138,7 @@ func NewForConfigOrDie(c *rest.Config) *Clientset { func New(c rest.Interface) *Clientset { var cs Clientset cs.groupsnapshotV1beta1 = groupsnapshotv1beta1.New(c) + cs.groupsnapshotV1beta2 = groupsnapshotv1beta2.New(c) cs.snapshotV1 = snapshotv1.New(c) cs.DiscoveryClient = discovery.NewDiscoveryClient(c) diff --git a/client/clientset/versioned/fake/clientset_generated.go b/client/clientset/versioned/fake/clientset_generated.go index 637c89f34..600753ecb 100644 --- a/client/clientset/versioned/fake/clientset_generated.go +++ b/client/clientset/versioned/fake/clientset_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. @@ -22,6 +22,8 @@ import ( clientset "github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned" groupsnapshotv1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1" fakegroupsnapshotv1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake" + groupsnapshotv1beta2 "github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta2" + fakegroupsnapshotv1beta2 "github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta2/fake" snapshotv1 "github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumesnapshot/v1" fakesnapshotv1 "github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumesnapshot/v1/fake" "k8s.io/apimachinery/pkg/runtime" @@ -86,6 +88,11 @@ func (c *Clientset) GroupsnapshotV1beta1() groupsnapshotv1beta1.GroupsnapshotV1b return &fakegroupsnapshotv1beta1.FakeGroupsnapshotV1beta1{Fake: &c.Fake} } +// GroupsnapshotV1beta2 retrieves the GroupsnapshotV1beta2Client +func (c *Clientset) GroupsnapshotV1beta2() groupsnapshotv1beta2.GroupsnapshotV1beta2Interface { + return &fakegroupsnapshotv1beta2.FakeGroupsnapshotV1beta2{Fake: &c.Fake} +} + // SnapshotV1 retrieves the SnapshotV1Client func (c *Clientset) SnapshotV1() snapshotv1.SnapshotV1Interface { return &fakesnapshotv1.FakeSnapshotV1{Fake: &c.Fake} diff --git a/client/clientset/versioned/fake/doc.go b/client/clientset/versioned/fake/doc.go index c8342d4bd..ac8c1ec9e 100644 --- a/client/clientset/versioned/fake/doc.go +++ b/client/clientset/versioned/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/client/clientset/versioned/fake/register.go b/client/clientset/versioned/fake/register.go index c1e1e26d0..7f508b6e5 100644 --- a/client/clientset/versioned/fake/register.go +++ b/client/clientset/versioned/fake/register.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. @@ -20,6 +20,7 @@ package fake import ( groupsnapshotv1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta1" + groupsnapshotv1beta2 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta2" snapshotv1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumesnapshot/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" @@ -33,6 +34,7 @@ var codecs = serializer.NewCodecFactory(scheme) var localSchemeBuilder = runtime.SchemeBuilder{ groupsnapshotv1beta1.AddToScheme, + groupsnapshotv1beta2.AddToScheme, snapshotv1.AddToScheme, } diff --git a/client/clientset/versioned/scheme/doc.go b/client/clientset/versioned/scheme/doc.go index 0fe2de913..9e531af56 100644 --- a/client/clientset/versioned/scheme/doc.go +++ b/client/clientset/versioned/scheme/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/client/clientset/versioned/scheme/register.go b/client/clientset/versioned/scheme/register.go index 6f8c4fdf0..573d7bcc9 100644 --- a/client/clientset/versioned/scheme/register.go +++ b/client/clientset/versioned/scheme/register.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. @@ -20,6 +20,7 @@ package scheme import ( groupsnapshotv1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta1" + groupsnapshotv1beta2 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta2" snapshotv1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumesnapshot/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" @@ -33,6 +34,7 @@ var Codecs = serializer.NewCodecFactory(Scheme) var ParameterCodec = runtime.NewParameterCodec(Scheme) var localSchemeBuilder = runtime.SchemeBuilder{ groupsnapshotv1beta1.AddToScheme, + groupsnapshotv1beta2.AddToScheme, snapshotv1.AddToScheme, } diff --git a/client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/doc.go b/client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/doc.go index c70a3f531..5d50e29f7 100644 --- a/client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/doc.go +++ b/client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/doc.go b/client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/doc.go index d9bd9db27..18420d452 100644 --- a/client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/doc.go +++ b/client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/fake_volumegroupsnapshot.go b/client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/fake_volumegroupsnapshot.go index 9cb98c4ae..b108fc575 100644 --- a/client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/fake_volumegroupsnapshot.go +++ b/client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/fake_volumegroupsnapshot.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/fake_volumegroupsnapshot_client.go b/client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/fake_volumegroupsnapshot_client.go index 47ce2cb4f..17f1e7c3b 100644 --- a/client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/fake_volumegroupsnapshot_client.go +++ b/client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/fake_volumegroupsnapshot_client.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/fake_volumegroupsnapshotclass.go b/client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/fake_volumegroupsnapshotclass.go index 1ca15d7e0..9ae7856f2 100644 --- a/client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/fake_volumegroupsnapshotclass.go +++ b/client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/fake_volumegroupsnapshotclass.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/fake_volumegroupsnapshotcontent.go b/client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/fake_volumegroupsnapshotcontent.go index 738f0cd4b..50cd79f37 100644 --- a/client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/fake_volumegroupsnapshotcontent.go +++ b/client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/fake_volumegroupsnapshotcontent.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/generated_expansion.go b/client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/generated_expansion.go index 10f62712e..e1de72e99 100644 --- a/client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/generated_expansion.go +++ b/client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/volumegroupsnapshot.go b/client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/volumegroupsnapshot.go index 8687a330f..c5ab020b3 100644 --- a/client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/volumegroupsnapshot.go +++ b/client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/volumegroupsnapshot.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/volumegroupsnapshot_client.go b/client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/volumegroupsnapshot_client.go index 49ecc7cf5..ddd9505ea 100644 --- a/client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/volumegroupsnapshot_client.go +++ b/client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/volumegroupsnapshot_client.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/volumegroupsnapshotclass.go b/client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/volumegroupsnapshotclass.go index 642cedd70..a76945851 100644 --- a/client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/volumegroupsnapshotclass.go +++ b/client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/volumegroupsnapshotclass.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/volumegroupsnapshotcontent.go b/client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/volumegroupsnapshotcontent.go index eafada589..77de5fe20 100644 --- a/client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/volumegroupsnapshotcontent.go +++ b/client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/volumegroupsnapshotcontent.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/client/clientset/versioned/typed/volumegroupsnapshot/v1beta2/doc.go b/client/clientset/versioned/typed/volumegroupsnapshot/v1beta2/doc.go new file mode 100644 index 000000000..705324605 --- /dev/null +++ b/client/clientset/versioned/typed/volumegroupsnapshot/v1beta2/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 2025 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 client-gen. DO NOT EDIT. + +// This package has the automatically generated typed clients. +package v1beta2 diff --git a/client/clientset/versioned/typed/volumegroupsnapshot/v1beta2/fake/doc.go b/client/clientset/versioned/typed/volumegroupsnapshot/v1beta2/fake/doc.go new file mode 100644 index 000000000..18420d452 --- /dev/null +++ b/client/clientset/versioned/typed/volumegroupsnapshot/v1beta2/fake/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 2025 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 client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/client/clientset/versioned/typed/volumegroupsnapshot/v1beta2/fake/fake_volumegroupsnapshot.go b/client/clientset/versioned/typed/volumegroupsnapshot/v1beta2/fake/fake_volumegroupsnapshot.go new file mode 100644 index 000000000..b831eb560 --- /dev/null +++ b/client/clientset/versioned/typed/volumegroupsnapshot/v1beta2/fake/fake_volumegroupsnapshot.go @@ -0,0 +1,141 @@ +/* +Copyright 2025 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + v1beta2 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta2" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + testing "k8s.io/client-go/testing" +) + +// FakeVolumeGroupSnapshots implements VolumeGroupSnapshotInterface +type FakeVolumeGroupSnapshots struct { + Fake *FakeGroupsnapshotV1beta2 + ns string +} + +var volumegroupsnapshotsResource = v1beta2.SchemeGroupVersion.WithResource("volumegroupsnapshots") + +var volumegroupsnapshotsKind = v1beta2.SchemeGroupVersion.WithKind("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 *v1beta2.VolumeGroupSnapshot, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(volumegroupsnapshotsResource, c.ns, name), &v1beta2.VolumeGroupSnapshot{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta2.VolumeGroupSnapshot), err +} + +// List takes label and field selectors, and returns the list of VolumeGroupSnapshots that match those selectors. +func (c *FakeVolumeGroupSnapshots) List(ctx context.Context, opts v1.ListOptions) (result *v1beta2.VolumeGroupSnapshotList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(volumegroupsnapshotsResource, volumegroupsnapshotsKind, c.ns, opts), &v1beta2.VolumeGroupSnapshotList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1beta2.VolumeGroupSnapshotList{ListMeta: obj.(*v1beta2.VolumeGroupSnapshotList).ListMeta} + for _, item := range obj.(*v1beta2.VolumeGroupSnapshotList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested volumeGroupSnapshots. +func (c *FakeVolumeGroupSnapshots) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(volumegroupsnapshotsResource, c.ns, opts)) + +} + +// Create takes the representation of a volumeGroupSnapshot and creates it. Returns the server's representation of the volumeGroupSnapshot, and an error, if there is any. +func (c *FakeVolumeGroupSnapshots) Create(ctx context.Context, volumeGroupSnapshot *v1beta2.VolumeGroupSnapshot, opts v1.CreateOptions) (result *v1beta2.VolumeGroupSnapshot, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(volumegroupsnapshotsResource, c.ns, volumeGroupSnapshot), &v1beta2.VolumeGroupSnapshot{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta2.VolumeGroupSnapshot), err +} + +// Update takes the representation of a volumeGroupSnapshot and updates it. Returns the server's representation of the volumeGroupSnapshot, and an error, if there is any. +func (c *FakeVolumeGroupSnapshots) Update(ctx context.Context, volumeGroupSnapshot *v1beta2.VolumeGroupSnapshot, opts v1.UpdateOptions) (result *v1beta2.VolumeGroupSnapshot, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(volumegroupsnapshotsResource, c.ns, volumeGroupSnapshot), &v1beta2.VolumeGroupSnapshot{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta2.VolumeGroupSnapshot), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeVolumeGroupSnapshots) UpdateStatus(ctx context.Context, volumeGroupSnapshot *v1beta2.VolumeGroupSnapshot, opts v1.UpdateOptions) (*v1beta2.VolumeGroupSnapshot, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(volumegroupsnapshotsResource, "status", c.ns, volumeGroupSnapshot), &v1beta2.VolumeGroupSnapshot{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta2.VolumeGroupSnapshot), err +} + +// Delete takes name of the volumeGroupSnapshot and deletes it. Returns an error if one occurs. +func (c *FakeVolumeGroupSnapshots) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(volumegroupsnapshotsResource, c.ns, name, opts), &v1beta2.VolumeGroupSnapshot{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeVolumeGroupSnapshots) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(volumegroupsnapshotsResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1beta2.VolumeGroupSnapshotList{}) + return err +} + +// Patch applies the patch and returns the patched volumeGroupSnapshot. +func (c *FakeVolumeGroupSnapshots) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta2.VolumeGroupSnapshot, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(volumegroupsnapshotsResource, c.ns, name, pt, data, subresources...), &v1beta2.VolumeGroupSnapshot{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta2.VolumeGroupSnapshot), err +} diff --git a/client/clientset/versioned/typed/volumegroupsnapshot/v1beta2/fake/fake_volumegroupsnapshot_client.go b/client/clientset/versioned/typed/volumegroupsnapshot/v1beta2/fake/fake_volumegroupsnapshot_client.go new file mode 100644 index 000000000..a9a0fa4c3 --- /dev/null +++ b/client/clientset/versioned/typed/volumegroupsnapshot/v1beta2/fake/fake_volumegroupsnapshot_client.go @@ -0,0 +1,48 @@ +/* +Copyright 2025 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 client-gen. DO NOT EDIT. + +package fake + +import ( + v1beta2 "github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta2" + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakeGroupsnapshotV1beta2 struct { + *testing.Fake +} + +func (c *FakeGroupsnapshotV1beta2) VolumeGroupSnapshots(namespace string) v1beta2.VolumeGroupSnapshotInterface { + return &FakeVolumeGroupSnapshots{c, namespace} +} + +func (c *FakeGroupsnapshotV1beta2) VolumeGroupSnapshotClasses() v1beta2.VolumeGroupSnapshotClassInterface { + return &FakeVolumeGroupSnapshotClasses{c} +} + +func (c *FakeGroupsnapshotV1beta2) VolumeGroupSnapshotContents() v1beta2.VolumeGroupSnapshotContentInterface { + return &FakeVolumeGroupSnapshotContents{c} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeGroupsnapshotV1beta2) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/client/clientset/versioned/typed/volumegroupsnapshot/v1beta2/fake/fake_volumegroupsnapshotclass.go b/client/clientset/versioned/typed/volumegroupsnapshot/v1beta2/fake/fake_volumegroupsnapshotclass.go new file mode 100644 index 000000000..499575d42 --- /dev/null +++ b/client/clientset/versioned/typed/volumegroupsnapshot/v1beta2/fake/fake_volumegroupsnapshotclass.go @@ -0,0 +1,121 @@ +/* +Copyright 2025 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + v1beta2 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta2" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + testing "k8s.io/client-go/testing" +) + +// FakeVolumeGroupSnapshotClasses implements VolumeGroupSnapshotClassInterface +type FakeVolumeGroupSnapshotClasses struct { + Fake *FakeGroupsnapshotV1beta2 +} + +var volumegroupsnapshotclassesResource = v1beta2.SchemeGroupVersion.WithResource("volumegroupsnapshotclasses") + +var volumegroupsnapshotclassesKind = v1beta2.SchemeGroupVersion.WithKind("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 *v1beta2.VolumeGroupSnapshotClass, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(volumegroupsnapshotclassesResource, name), &v1beta2.VolumeGroupSnapshotClass{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta2.VolumeGroupSnapshotClass), err +} + +// List takes label and field selectors, and returns the list of VolumeGroupSnapshotClasses that match those selectors. +func (c *FakeVolumeGroupSnapshotClasses) List(ctx context.Context, opts v1.ListOptions) (result *v1beta2.VolumeGroupSnapshotClassList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(volumegroupsnapshotclassesResource, volumegroupsnapshotclassesKind, opts), &v1beta2.VolumeGroupSnapshotClassList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1beta2.VolumeGroupSnapshotClassList{ListMeta: obj.(*v1beta2.VolumeGroupSnapshotClassList).ListMeta} + for _, item := range obj.(*v1beta2.VolumeGroupSnapshotClassList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested volumeGroupSnapshotClasses. +func (c *FakeVolumeGroupSnapshotClasses) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(volumegroupsnapshotclassesResource, opts)) +} + +// Create takes the representation of a volumeGroupSnapshotClass and creates it. Returns the server's representation of the volumeGroupSnapshotClass, and an error, if there is any. +func (c *FakeVolumeGroupSnapshotClasses) Create(ctx context.Context, volumeGroupSnapshotClass *v1beta2.VolumeGroupSnapshotClass, opts v1.CreateOptions) (result *v1beta2.VolumeGroupSnapshotClass, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(volumegroupsnapshotclassesResource, volumeGroupSnapshotClass), &v1beta2.VolumeGroupSnapshotClass{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta2.VolumeGroupSnapshotClass), err +} + +// Update takes the representation of a volumeGroupSnapshotClass and updates it. Returns the server's representation of the volumeGroupSnapshotClass, and an error, if there is any. +func (c *FakeVolumeGroupSnapshotClasses) Update(ctx context.Context, volumeGroupSnapshotClass *v1beta2.VolumeGroupSnapshotClass, opts v1.UpdateOptions) (result *v1beta2.VolumeGroupSnapshotClass, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(volumegroupsnapshotclassesResource, volumeGroupSnapshotClass), &v1beta2.VolumeGroupSnapshotClass{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta2.VolumeGroupSnapshotClass), err +} + +// Delete takes name of the volumeGroupSnapshotClass and deletes it. Returns an error if one occurs. +func (c *FakeVolumeGroupSnapshotClasses) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteActionWithOptions(volumegroupsnapshotclassesResource, name, opts), &v1beta2.VolumeGroupSnapshotClass{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeVolumeGroupSnapshotClasses) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(volumegroupsnapshotclassesResource, listOpts) + + _, err := c.Fake.Invokes(action, &v1beta2.VolumeGroupSnapshotClassList{}) + return err +} + +// Patch applies the patch and returns the patched volumeGroupSnapshotClass. +func (c *FakeVolumeGroupSnapshotClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta2.VolumeGroupSnapshotClass, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(volumegroupsnapshotclassesResource, name, pt, data, subresources...), &v1beta2.VolumeGroupSnapshotClass{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta2.VolumeGroupSnapshotClass), err +} diff --git a/client/clientset/versioned/typed/volumegroupsnapshot/v1beta2/fake/fake_volumegroupsnapshotcontent.go b/client/clientset/versioned/typed/volumegroupsnapshot/v1beta2/fake/fake_volumegroupsnapshotcontent.go new file mode 100644 index 000000000..26e1fb533 --- /dev/null +++ b/client/clientset/versioned/typed/volumegroupsnapshot/v1beta2/fake/fake_volumegroupsnapshotcontent.go @@ -0,0 +1,132 @@ +/* +Copyright 2025 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + v1beta2 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta2" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + testing "k8s.io/client-go/testing" +) + +// FakeVolumeGroupSnapshotContents implements VolumeGroupSnapshotContentInterface +type FakeVolumeGroupSnapshotContents struct { + Fake *FakeGroupsnapshotV1beta2 +} + +var volumegroupsnapshotcontentsResource = v1beta2.SchemeGroupVersion.WithResource("volumegroupsnapshotcontents") + +var volumegroupsnapshotcontentsKind = v1beta2.SchemeGroupVersion.WithKind("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 *v1beta2.VolumeGroupSnapshotContent, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(volumegroupsnapshotcontentsResource, name), &v1beta2.VolumeGroupSnapshotContent{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta2.VolumeGroupSnapshotContent), err +} + +// List takes label and field selectors, and returns the list of VolumeGroupSnapshotContents that match those selectors. +func (c *FakeVolumeGroupSnapshotContents) List(ctx context.Context, opts v1.ListOptions) (result *v1beta2.VolumeGroupSnapshotContentList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(volumegroupsnapshotcontentsResource, volumegroupsnapshotcontentsKind, opts), &v1beta2.VolumeGroupSnapshotContentList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1beta2.VolumeGroupSnapshotContentList{ListMeta: obj.(*v1beta2.VolumeGroupSnapshotContentList).ListMeta} + for _, item := range obj.(*v1beta2.VolumeGroupSnapshotContentList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested volumeGroupSnapshotContents. +func (c *FakeVolumeGroupSnapshotContents) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(volumegroupsnapshotcontentsResource, opts)) +} + +// Create takes the representation of a volumeGroupSnapshotContent and creates it. Returns the server's representation of the volumeGroupSnapshotContent, and an error, if there is any. +func (c *FakeVolumeGroupSnapshotContents) Create(ctx context.Context, volumeGroupSnapshotContent *v1beta2.VolumeGroupSnapshotContent, opts v1.CreateOptions) (result *v1beta2.VolumeGroupSnapshotContent, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(volumegroupsnapshotcontentsResource, volumeGroupSnapshotContent), &v1beta2.VolumeGroupSnapshotContent{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta2.VolumeGroupSnapshotContent), err +} + +// Update takes the representation of a volumeGroupSnapshotContent and updates it. Returns the server's representation of the volumeGroupSnapshotContent, and an error, if there is any. +func (c *FakeVolumeGroupSnapshotContents) Update(ctx context.Context, volumeGroupSnapshotContent *v1beta2.VolumeGroupSnapshotContent, opts v1.UpdateOptions) (result *v1beta2.VolumeGroupSnapshotContent, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(volumegroupsnapshotcontentsResource, volumeGroupSnapshotContent), &v1beta2.VolumeGroupSnapshotContent{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta2.VolumeGroupSnapshotContent), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeVolumeGroupSnapshotContents) UpdateStatus(ctx context.Context, volumeGroupSnapshotContent *v1beta2.VolumeGroupSnapshotContent, opts v1.UpdateOptions) (*v1beta2.VolumeGroupSnapshotContent, error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateSubresourceAction(volumegroupsnapshotcontentsResource, "status", volumeGroupSnapshotContent), &v1beta2.VolumeGroupSnapshotContent{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta2.VolumeGroupSnapshotContent), err +} + +// Delete takes name of the volumeGroupSnapshotContent and deletes it. Returns an error if one occurs. +func (c *FakeVolumeGroupSnapshotContents) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteActionWithOptions(volumegroupsnapshotcontentsResource, name, opts), &v1beta2.VolumeGroupSnapshotContent{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeVolumeGroupSnapshotContents) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(volumegroupsnapshotcontentsResource, listOpts) + + _, err := c.Fake.Invokes(action, &v1beta2.VolumeGroupSnapshotContentList{}) + return err +} + +// Patch applies the patch and returns the patched volumeGroupSnapshotContent. +func (c *FakeVolumeGroupSnapshotContents) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta2.VolumeGroupSnapshotContent, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(volumegroupsnapshotcontentsResource, name, pt, data, subresources...), &v1beta2.VolumeGroupSnapshotContent{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta2.VolumeGroupSnapshotContent), err +} diff --git a/client/clientset/versioned/typed/volumegroupsnapshot/v1beta2/generated_expansion.go b/client/clientset/versioned/typed/volumegroupsnapshot/v1beta2/generated_expansion.go new file mode 100644 index 000000000..ed8318ed6 --- /dev/null +++ b/client/clientset/versioned/typed/volumegroupsnapshot/v1beta2/generated_expansion.go @@ -0,0 +1,25 @@ +/* +Copyright 2025 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 client-gen. DO NOT EDIT. + +package v1beta2 + +type VolumeGroupSnapshotExpansion interface{} + +type VolumeGroupSnapshotClassExpansion interface{} + +type VolumeGroupSnapshotContentExpansion interface{} diff --git a/client/clientset/versioned/typed/volumegroupsnapshot/v1beta2/volumegroupsnapshot.go b/client/clientset/versioned/typed/volumegroupsnapshot/v1beta2/volumegroupsnapshot.go new file mode 100644 index 000000000..a9b7a8f64 --- /dev/null +++ b/client/clientset/versioned/typed/volumegroupsnapshot/v1beta2/volumegroupsnapshot.go @@ -0,0 +1,195 @@ +/* +Copyright 2025 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 client-gen. DO NOT EDIT. + +package v1beta2 + +import ( + "context" + "time" + + v1beta2 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta2" + scheme "github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/scheme" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// VolumeGroupSnapshotsGetter has a method to return a VolumeGroupSnapshotInterface. +// A group's client should implement this interface. +type VolumeGroupSnapshotsGetter interface { + VolumeGroupSnapshots(namespace string) VolumeGroupSnapshotInterface +} + +// VolumeGroupSnapshotInterface has methods to work with VolumeGroupSnapshot resources. +type VolumeGroupSnapshotInterface interface { + Create(ctx context.Context, volumeGroupSnapshot *v1beta2.VolumeGroupSnapshot, opts v1.CreateOptions) (*v1beta2.VolumeGroupSnapshot, error) + Update(ctx context.Context, volumeGroupSnapshot *v1beta2.VolumeGroupSnapshot, opts v1.UpdateOptions) (*v1beta2.VolumeGroupSnapshot, error) + UpdateStatus(ctx context.Context, volumeGroupSnapshot *v1beta2.VolumeGroupSnapshot, opts v1.UpdateOptions) (*v1beta2.VolumeGroupSnapshot, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta2.VolumeGroupSnapshot, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta2.VolumeGroupSnapshotList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta2.VolumeGroupSnapshot, err error) + VolumeGroupSnapshotExpansion +} + +// volumeGroupSnapshots implements VolumeGroupSnapshotInterface +type volumeGroupSnapshots struct { + client rest.Interface + ns string +} + +// newVolumeGroupSnapshots returns a VolumeGroupSnapshots +func newVolumeGroupSnapshots(c *GroupsnapshotV1beta2Client, namespace string) *volumeGroupSnapshots { + return &volumeGroupSnapshots{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the volumeGroupSnapshot, and returns the corresponding volumeGroupSnapshot object, and an error if there is any. +func (c *volumeGroupSnapshots) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta2.VolumeGroupSnapshot, err error) { + result = &v1beta2.VolumeGroupSnapshot{} + err = c.client.Get(). + Namespace(c.ns). + Resource("volumegroupsnapshots"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of VolumeGroupSnapshots that match those selectors. +func (c *volumeGroupSnapshots) List(ctx context.Context, opts v1.ListOptions) (result *v1beta2.VolumeGroupSnapshotList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1beta2.VolumeGroupSnapshotList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("volumegroupsnapshots"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested volumeGroupSnapshots. +func (c *volumeGroupSnapshots) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("volumegroupsnapshots"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a volumeGroupSnapshot and creates it. Returns the server's representation of the volumeGroupSnapshot, and an error, if there is any. +func (c *volumeGroupSnapshots) Create(ctx context.Context, volumeGroupSnapshot *v1beta2.VolumeGroupSnapshot, opts v1.CreateOptions) (result *v1beta2.VolumeGroupSnapshot, err error) { + result = &v1beta2.VolumeGroupSnapshot{} + err = c.client.Post(). + Namespace(c.ns). + Resource("volumegroupsnapshots"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(volumeGroupSnapshot). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a volumeGroupSnapshot and updates it. Returns the server's representation of the volumeGroupSnapshot, and an error, if there is any. +func (c *volumeGroupSnapshots) Update(ctx context.Context, volumeGroupSnapshot *v1beta2.VolumeGroupSnapshot, opts v1.UpdateOptions) (result *v1beta2.VolumeGroupSnapshot, err error) { + result = &v1beta2.VolumeGroupSnapshot{} + err = c.client.Put(). + Namespace(c.ns). + Resource("volumegroupsnapshots"). + Name(volumeGroupSnapshot.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(volumeGroupSnapshot). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *volumeGroupSnapshots) UpdateStatus(ctx context.Context, volumeGroupSnapshot *v1beta2.VolumeGroupSnapshot, opts v1.UpdateOptions) (result *v1beta2.VolumeGroupSnapshot, err error) { + result = &v1beta2.VolumeGroupSnapshot{} + err = c.client.Put(). + Namespace(c.ns). + Resource("volumegroupsnapshots"). + Name(volumeGroupSnapshot.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(volumeGroupSnapshot). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the volumeGroupSnapshot and deletes it. Returns an error if one occurs. +func (c *volumeGroupSnapshots) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("volumegroupsnapshots"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *volumeGroupSnapshots) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("volumegroupsnapshots"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched volumeGroupSnapshot. +func (c *volumeGroupSnapshots) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta2.VolumeGroupSnapshot, err error) { + result = &v1beta2.VolumeGroupSnapshot{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("volumegroupsnapshots"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/client/clientset/versioned/typed/volumegroupsnapshot/v1beta2/volumegroupsnapshot_client.go b/client/clientset/versioned/typed/volumegroupsnapshot/v1beta2/volumegroupsnapshot_client.go new file mode 100644 index 000000000..500229c0f --- /dev/null +++ b/client/clientset/versioned/typed/volumegroupsnapshot/v1beta2/volumegroupsnapshot_client.go @@ -0,0 +1,117 @@ +/* +Copyright 2025 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 client-gen. DO NOT EDIT. + +package v1beta2 + +import ( + "net/http" + + v1beta2 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta2" + "github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/scheme" + rest "k8s.io/client-go/rest" +) + +type GroupsnapshotV1beta2Interface interface { + RESTClient() rest.Interface + VolumeGroupSnapshotsGetter + VolumeGroupSnapshotClassesGetter + VolumeGroupSnapshotContentsGetter +} + +// GroupsnapshotV1beta2Client is used to interact with features provided by the groupsnapshot.storage.k8s.io group. +type GroupsnapshotV1beta2Client struct { + restClient rest.Interface +} + +func (c *GroupsnapshotV1beta2Client) VolumeGroupSnapshots(namespace string) VolumeGroupSnapshotInterface { + return newVolumeGroupSnapshots(c, namespace) +} + +func (c *GroupsnapshotV1beta2Client) VolumeGroupSnapshotClasses() VolumeGroupSnapshotClassInterface { + return newVolumeGroupSnapshotClasses(c) +} + +func (c *GroupsnapshotV1beta2Client) VolumeGroupSnapshotContents() VolumeGroupSnapshotContentInterface { + return newVolumeGroupSnapshotContents(c) +} + +// NewForConfig creates a new GroupsnapshotV1beta2Client for the given config. +// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), +// where httpClient was generated with rest.HTTPClientFor(c). +func NewForConfig(c *rest.Config) (*GroupsnapshotV1beta2Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + httpClient, err := rest.HTTPClientFor(&config) + if err != nil { + return nil, err + } + return NewForConfigAndClient(&config, httpClient) +} + +// NewForConfigAndClient creates a new GroupsnapshotV1beta2Client 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) (*GroupsnapshotV1beta2Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientForConfigAndClient(&config, h) + if err != nil { + return nil, err + } + return &GroupsnapshotV1beta2Client{client}, nil +} + +// NewForConfigOrDie creates a new GroupsnapshotV1beta2Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *GroupsnapshotV1beta2Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new GroupsnapshotV1beta2Client for the given RESTClient. +func New(c rest.Interface) *GroupsnapshotV1beta2Client { + return &GroupsnapshotV1beta2Client{c} +} + +func setConfigDefaults(config *rest.Config) error { + gv := v1beta2.SchemeGroupVersion + config.GroupVersion = &gv + config.APIPath = "/apis" + config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + + if config.UserAgent == "" { + config.UserAgent = rest.DefaultKubernetesUserAgent() + } + + return nil +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *GroupsnapshotV1beta2Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/client/clientset/versioned/typed/volumegroupsnapshot/v1beta2/volumegroupsnapshotclass.go b/client/clientset/versioned/typed/volumegroupsnapshot/v1beta2/volumegroupsnapshotclass.go new file mode 100644 index 000000000..e03c85cfb --- /dev/null +++ b/client/clientset/versioned/typed/volumegroupsnapshot/v1beta2/volumegroupsnapshotclass.go @@ -0,0 +1,168 @@ +/* +Copyright 2025 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 client-gen. DO NOT EDIT. + +package v1beta2 + +import ( + "context" + "time" + + v1beta2 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta2" + scheme "github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/scheme" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// VolumeGroupSnapshotClassesGetter has a method to return a VolumeGroupSnapshotClassInterface. +// A group's client should implement this interface. +type VolumeGroupSnapshotClassesGetter interface { + VolumeGroupSnapshotClasses() VolumeGroupSnapshotClassInterface +} + +// VolumeGroupSnapshotClassInterface has methods to work with VolumeGroupSnapshotClass resources. +type VolumeGroupSnapshotClassInterface interface { + Create(ctx context.Context, volumeGroupSnapshotClass *v1beta2.VolumeGroupSnapshotClass, opts v1.CreateOptions) (*v1beta2.VolumeGroupSnapshotClass, error) + Update(ctx context.Context, volumeGroupSnapshotClass *v1beta2.VolumeGroupSnapshotClass, opts v1.UpdateOptions) (*v1beta2.VolumeGroupSnapshotClass, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta2.VolumeGroupSnapshotClass, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta2.VolumeGroupSnapshotClassList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta2.VolumeGroupSnapshotClass, err error) + VolumeGroupSnapshotClassExpansion +} + +// volumeGroupSnapshotClasses implements VolumeGroupSnapshotClassInterface +type volumeGroupSnapshotClasses struct { + client rest.Interface +} + +// newVolumeGroupSnapshotClasses returns a VolumeGroupSnapshotClasses +func newVolumeGroupSnapshotClasses(c *GroupsnapshotV1beta2Client) *volumeGroupSnapshotClasses { + return &volumeGroupSnapshotClasses{ + client: c.RESTClient(), + } +} + +// Get takes name of the volumeGroupSnapshotClass, and returns the corresponding volumeGroupSnapshotClass object, and an error if there is any. +func (c *volumeGroupSnapshotClasses) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta2.VolumeGroupSnapshotClass, err error) { + result = &v1beta2.VolumeGroupSnapshotClass{} + err = c.client.Get(). + Resource("volumegroupsnapshotclasses"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of VolumeGroupSnapshotClasses that match those selectors. +func (c *volumeGroupSnapshotClasses) List(ctx context.Context, opts v1.ListOptions) (result *v1beta2.VolumeGroupSnapshotClassList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1beta2.VolumeGroupSnapshotClassList{} + err = c.client.Get(). + Resource("volumegroupsnapshotclasses"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested volumeGroupSnapshotClasses. +func (c *volumeGroupSnapshotClasses) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("volumegroupsnapshotclasses"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a volumeGroupSnapshotClass and creates it. Returns the server's representation of the volumeGroupSnapshotClass, and an error, if there is any. +func (c *volumeGroupSnapshotClasses) Create(ctx context.Context, volumeGroupSnapshotClass *v1beta2.VolumeGroupSnapshotClass, opts v1.CreateOptions) (result *v1beta2.VolumeGroupSnapshotClass, err error) { + result = &v1beta2.VolumeGroupSnapshotClass{} + err = c.client.Post(). + Resource("volumegroupsnapshotclasses"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(volumeGroupSnapshotClass). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a volumeGroupSnapshotClass and updates it. Returns the server's representation of the volumeGroupSnapshotClass, and an error, if there is any. +func (c *volumeGroupSnapshotClasses) Update(ctx context.Context, volumeGroupSnapshotClass *v1beta2.VolumeGroupSnapshotClass, opts v1.UpdateOptions) (result *v1beta2.VolumeGroupSnapshotClass, err error) { + result = &v1beta2.VolumeGroupSnapshotClass{} + err = c.client.Put(). + Resource("volumegroupsnapshotclasses"). + Name(volumeGroupSnapshotClass.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(volumeGroupSnapshotClass). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the volumeGroupSnapshotClass and deletes it. Returns an error if one occurs. +func (c *volumeGroupSnapshotClasses) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Resource("volumegroupsnapshotclasses"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *volumeGroupSnapshotClasses) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("volumegroupsnapshotclasses"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched volumeGroupSnapshotClass. +func (c *volumeGroupSnapshotClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta2.VolumeGroupSnapshotClass, err error) { + result = &v1beta2.VolumeGroupSnapshotClass{} + err = c.client.Patch(pt). + Resource("volumegroupsnapshotclasses"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/client/clientset/versioned/typed/volumegroupsnapshot/v1beta2/volumegroupsnapshotcontent.go b/client/clientset/versioned/typed/volumegroupsnapshot/v1beta2/volumegroupsnapshotcontent.go new file mode 100644 index 000000000..3168991fc --- /dev/null +++ b/client/clientset/versioned/typed/volumegroupsnapshot/v1beta2/volumegroupsnapshotcontent.go @@ -0,0 +1,184 @@ +/* +Copyright 2025 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 client-gen. DO NOT EDIT. + +package v1beta2 + +import ( + "context" + "time" + + v1beta2 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta2" + scheme "github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/scheme" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// VolumeGroupSnapshotContentsGetter has a method to return a VolumeGroupSnapshotContentInterface. +// A group's client should implement this interface. +type VolumeGroupSnapshotContentsGetter interface { + VolumeGroupSnapshotContents() VolumeGroupSnapshotContentInterface +} + +// VolumeGroupSnapshotContentInterface has methods to work with VolumeGroupSnapshotContent resources. +type VolumeGroupSnapshotContentInterface interface { + Create(ctx context.Context, volumeGroupSnapshotContent *v1beta2.VolumeGroupSnapshotContent, opts v1.CreateOptions) (*v1beta2.VolumeGroupSnapshotContent, error) + Update(ctx context.Context, volumeGroupSnapshotContent *v1beta2.VolumeGroupSnapshotContent, opts v1.UpdateOptions) (*v1beta2.VolumeGroupSnapshotContent, error) + UpdateStatus(ctx context.Context, volumeGroupSnapshotContent *v1beta2.VolumeGroupSnapshotContent, opts v1.UpdateOptions) (*v1beta2.VolumeGroupSnapshotContent, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta2.VolumeGroupSnapshotContent, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta2.VolumeGroupSnapshotContentList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta2.VolumeGroupSnapshotContent, err error) + VolumeGroupSnapshotContentExpansion +} + +// volumeGroupSnapshotContents implements VolumeGroupSnapshotContentInterface +type volumeGroupSnapshotContents struct { + client rest.Interface +} + +// newVolumeGroupSnapshotContents returns a VolumeGroupSnapshotContents +func newVolumeGroupSnapshotContents(c *GroupsnapshotV1beta2Client) *volumeGroupSnapshotContents { + return &volumeGroupSnapshotContents{ + client: c.RESTClient(), + } +} + +// Get takes name of the volumeGroupSnapshotContent, and returns the corresponding volumeGroupSnapshotContent object, and an error if there is any. +func (c *volumeGroupSnapshotContents) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta2.VolumeGroupSnapshotContent, err error) { + result = &v1beta2.VolumeGroupSnapshotContent{} + err = c.client.Get(). + Resource("volumegroupsnapshotcontents"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of VolumeGroupSnapshotContents that match those selectors. +func (c *volumeGroupSnapshotContents) List(ctx context.Context, opts v1.ListOptions) (result *v1beta2.VolumeGroupSnapshotContentList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1beta2.VolumeGroupSnapshotContentList{} + err = c.client.Get(). + Resource("volumegroupsnapshotcontents"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested volumeGroupSnapshotContents. +func (c *volumeGroupSnapshotContents) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("volumegroupsnapshotcontents"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a volumeGroupSnapshotContent and creates it. Returns the server's representation of the volumeGroupSnapshotContent, and an error, if there is any. +func (c *volumeGroupSnapshotContents) Create(ctx context.Context, volumeGroupSnapshotContent *v1beta2.VolumeGroupSnapshotContent, opts v1.CreateOptions) (result *v1beta2.VolumeGroupSnapshotContent, err error) { + result = &v1beta2.VolumeGroupSnapshotContent{} + err = c.client.Post(). + Resource("volumegroupsnapshotcontents"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(volumeGroupSnapshotContent). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a volumeGroupSnapshotContent and updates it. Returns the server's representation of the volumeGroupSnapshotContent, and an error, if there is any. +func (c *volumeGroupSnapshotContents) Update(ctx context.Context, volumeGroupSnapshotContent *v1beta2.VolumeGroupSnapshotContent, opts v1.UpdateOptions) (result *v1beta2.VolumeGroupSnapshotContent, err error) { + result = &v1beta2.VolumeGroupSnapshotContent{} + err = c.client.Put(). + Resource("volumegroupsnapshotcontents"). + Name(volumeGroupSnapshotContent.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(volumeGroupSnapshotContent). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *volumeGroupSnapshotContents) UpdateStatus(ctx context.Context, volumeGroupSnapshotContent *v1beta2.VolumeGroupSnapshotContent, opts v1.UpdateOptions) (result *v1beta2.VolumeGroupSnapshotContent, err error) { + result = &v1beta2.VolumeGroupSnapshotContent{} + err = c.client.Put(). + Resource("volumegroupsnapshotcontents"). + Name(volumeGroupSnapshotContent.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(volumeGroupSnapshotContent). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the volumeGroupSnapshotContent and deletes it. Returns an error if one occurs. +func (c *volumeGroupSnapshotContents) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Resource("volumegroupsnapshotcontents"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *volumeGroupSnapshotContents) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("volumegroupsnapshotcontents"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched volumeGroupSnapshotContent. +func (c *volumeGroupSnapshotContents) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta2.VolumeGroupSnapshotContent, err error) { + result = &v1beta2.VolumeGroupSnapshotContent{} + err = c.client.Patch(pt). + Resource("volumegroupsnapshotcontents"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/client/clientset/versioned/typed/volumesnapshot/v1/doc.go b/client/clientset/versioned/typed/volumesnapshot/v1/doc.go index 03b25c753..a49aac718 100644 --- a/client/clientset/versioned/typed/volumesnapshot/v1/doc.go +++ b/client/clientset/versioned/typed/volumesnapshot/v1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/client/clientset/versioned/typed/volumesnapshot/v1/fake/doc.go b/client/clientset/versioned/typed/volumesnapshot/v1/fake/doc.go index d9bd9db27..18420d452 100644 --- a/client/clientset/versioned/typed/volumesnapshot/v1/fake/doc.go +++ b/client/clientset/versioned/typed/volumesnapshot/v1/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/client/clientset/versioned/typed/volumesnapshot/v1/fake/fake_volumesnapshot.go b/client/clientset/versioned/typed/volumesnapshot/v1/fake/fake_volumesnapshot.go index ddf1a0121..bd3fcb9b8 100644 --- a/client/clientset/versioned/typed/volumesnapshot/v1/fake/fake_volumesnapshot.go +++ b/client/clientset/versioned/typed/volumesnapshot/v1/fake/fake_volumesnapshot.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/client/clientset/versioned/typed/volumesnapshot/v1/fake/fake_volumesnapshot_client.go b/client/clientset/versioned/typed/volumesnapshot/v1/fake/fake_volumesnapshot_client.go index 3877e4158..efc45f429 100644 --- a/client/clientset/versioned/typed/volumesnapshot/v1/fake/fake_volumesnapshot_client.go +++ b/client/clientset/versioned/typed/volumesnapshot/v1/fake/fake_volumesnapshot_client.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/client/clientset/versioned/typed/volumesnapshot/v1/fake/fake_volumesnapshotclass.go b/client/clientset/versioned/typed/volumesnapshot/v1/fake/fake_volumesnapshotclass.go index 5d198af9f..613929cbb 100644 --- a/client/clientset/versioned/typed/volumesnapshot/v1/fake/fake_volumesnapshotclass.go +++ b/client/clientset/versioned/typed/volumesnapshot/v1/fake/fake_volumesnapshotclass.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/client/clientset/versioned/typed/volumesnapshot/v1/fake/fake_volumesnapshotcontent.go b/client/clientset/versioned/typed/volumesnapshot/v1/fake/fake_volumesnapshotcontent.go index 229e3387e..0f001d777 100644 --- a/client/clientset/versioned/typed/volumesnapshot/v1/fake/fake_volumesnapshotcontent.go +++ b/client/clientset/versioned/typed/volumesnapshot/v1/fake/fake_volumesnapshotcontent.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/client/clientset/versioned/typed/volumesnapshot/v1/generated_expansion.go b/client/clientset/versioned/typed/volumesnapshot/v1/generated_expansion.go index c52fe570e..731776689 100644 --- a/client/clientset/versioned/typed/volumesnapshot/v1/generated_expansion.go +++ b/client/clientset/versioned/typed/volumesnapshot/v1/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/client/clientset/versioned/typed/volumesnapshot/v1/volumesnapshot.go b/client/clientset/versioned/typed/volumesnapshot/v1/volumesnapshot.go index c99b49175..53fdff362 100644 --- a/client/clientset/versioned/typed/volumesnapshot/v1/volumesnapshot.go +++ b/client/clientset/versioned/typed/volumesnapshot/v1/volumesnapshot.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/client/clientset/versioned/typed/volumesnapshot/v1/volumesnapshot_client.go b/client/clientset/versioned/typed/volumesnapshot/v1/volumesnapshot_client.go index 877208fd6..34cfc808c 100644 --- a/client/clientset/versioned/typed/volumesnapshot/v1/volumesnapshot_client.go +++ b/client/clientset/versioned/typed/volumesnapshot/v1/volumesnapshot_client.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/client/clientset/versioned/typed/volumesnapshot/v1/volumesnapshotclass.go b/client/clientset/versioned/typed/volumesnapshot/v1/volumesnapshotclass.go index 5fa38735a..9f46bc5bc 100644 --- a/client/clientset/versioned/typed/volumesnapshot/v1/volumesnapshotclass.go +++ b/client/clientset/versioned/typed/volumesnapshot/v1/volumesnapshotclass.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/client/clientset/versioned/typed/volumesnapshot/v1/volumesnapshotcontent.go b/client/clientset/versioned/typed/volumesnapshot/v1/volumesnapshotcontent.go index d425cb3db..1fff1f232 100644 --- a/client/clientset/versioned/typed/volumesnapshot/v1/volumesnapshotcontent.go +++ b/client/clientset/versioned/typed/volumesnapshot/v1/volumesnapshotcontent.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/client/config/crd/groupsnapshot.storage.k8s.io_volumegroupsnapshotclasses.yaml b/client/config/crd/groupsnapshot.storage.k8s.io_volumegroupsnapshotclasses.yaml index e552f81b5..370ca4a2e 100644 --- a/client/config/crd/groupsnapshot.storage.k8s.io_volumegroupsnapshotclasses.yaml +++ b/client/config/crd/groupsnapshot.storage.k8s.io_volumegroupsnapshotclasses.yaml @@ -92,3 +92,77 @@ spec: served: true storage: true subresources: {} + - additionalPrinterColumns: + - jsonPath: .driver + name: Driver + type: string + - description: Determines whether a VolumeGroupSnapshotContent created through + the VolumeGroupSnapshotClass should be deleted when its bound VolumeGroupSnapshot + is deleted. + jsonPath: .deletionPolicy + name: DeletionPolicy + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1beta2 + schema: + openAPIV3Schema: + description: |- + VolumeGroupSnapshotClass specifies parameters that a underlying storage system + uses when creating a volume group snapshot. A specific VolumeGroupSnapshotClass + is used by specifying its name in a VolumeGroupSnapshot object. + VolumeGroupSnapshotClasses are non-namespaced. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + deletionPolicy: + description: |- + DeletionPolicy determines whether a VolumeGroupSnapshotContent created + through the VolumeGroupSnapshotClass should be deleted when its bound + VolumeGroupSnapshot is deleted. + Supported values are "Retain" and "Delete". + "Retain" means that the VolumeGroupSnapshotContent and its physical group + snapshot on underlying storage system are kept. + "Delete" means that the VolumeGroupSnapshotContent and its physical group + snapshot on underlying storage system are deleted. + Required. + enum: + - Delete + - Retain + type: string + driver: + description: |- + Driver is the name of the storage driver expected to handle this VolumeGroupSnapshotClass. + Required. + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + parameters: + additionalProperties: + type: string + description: |- + Parameters is a key-value map with storage driver specific parameters for + creating group snapshots. + These values are opaque to Kubernetes and are passed directly to the driver. + type: object + required: + - deletionPolicy + - driver + type: object + served: true + storage: false + subresources: {} diff --git a/client/config/crd/groupsnapshot.storage.k8s.io_volumegroupsnapshotcontents.yaml b/client/config/crd/groupsnapshot.storage.k8s.io_volumegroupsnapshotcontents.yaml index a6d15d8ad..7415d1836 100644 --- a/client/config/crd/groupsnapshot.storage.k8s.io_volumegroupsnapshotcontents.yaml +++ b/client/config/crd/groupsnapshot.storage.k8s.io_volumegroupsnapshotcontents.yaml @@ -322,3 +322,319 @@ spec: storage: true subresources: status: {} + - additionalPrinterColumns: + - description: Indicates if all the individual snapshots in the group are ready + to be used to restore a group of volumes. + jsonPath: .status.readyToUse + name: ReadyToUse + type: boolean + - description: Determines whether this VolumeGroupSnapshotContent and its physical + group snapshot on the underlying storage system should be deleted when its + bound VolumeGroupSnapshot is deleted. + jsonPath: .spec.deletionPolicy + name: DeletionPolicy + type: string + - description: Name of the CSI driver used to create the physical group snapshot + on the underlying storage system. + jsonPath: .spec.driver + name: Driver + type: string + - description: Name of the VolumeGroupSnapshotClass from which this group snapshot + was (or will be) created. + jsonPath: .spec.volumeGroupSnapshotClassName + name: VolumeGroupSnapshotClass + type: string + - description: Namespace of the VolumeGroupSnapshot object to which this VolumeGroupSnapshotContent + object is bound. + jsonPath: .spec.volumeGroupSnapshotRef.namespace + name: VolumeGroupSnapshotNamespace + type: string + - description: Name of the VolumeGroupSnapshot object to which this VolumeGroupSnapshotContent + object is bound. + jsonPath: .spec.volumeGroupSnapshotRef.name + name: VolumeGroupSnapshot + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1beta2 + schema: + openAPIV3Schema: + description: |- + VolumeGroupSnapshotContent represents the actual "on-disk" group snapshot object + in the underlying storage system + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: |- + Spec defines properties of a VolumeGroupSnapshotContent created by the underlying storage system. + Required. + properties: + deletionPolicy: + description: |- + DeletionPolicy determines whether this VolumeGroupSnapshotContent and the + physical group snapshot on the underlying storage system should be deleted + when the bound VolumeGroupSnapshot is deleted. + Supported values are "Retain" and "Delete". + "Retain" means that the VolumeGroupSnapshotContent and its physical group + snapshot on underlying storage system are kept. + "Delete" means that the VolumeGroupSnapshotContent and its physical group + snapshot on underlying storage system are deleted. + 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. + enum: + - Delete + - Retain + type: string + driver: + description: |- + 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. + type: string + source: + description: |- + 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. + properties: + groupSnapshotHandles: + description: |- + GroupSnapshotHandles specifies the CSI "group_snapshot_id" of a pre-existing + group snapshot and a list of CSI "snapshot_id" of pre-existing snapshots + on the underlying storage system for which a Kubernetes object + representation was (or should be) created. + This field is immutable. + properties: + volumeGroupSnapshotHandle: + description: |- + VolumeGroupSnapshotHandle specifies the CSI "group_snapshot_id" of a pre-existing + group snapshot on the underlying storage system for which a Kubernetes object + representation was (or should be) created. + This field is immutable. + Required. + type: string + volumeSnapshotHandles: + description: |- + VolumeSnapshotHandles is a list of CSI "snapshot_id" of pre-existing + snapshots on the underlying storage system for which Kubernetes objects + representation were (or should be) created. + This field is immutable. + Required. + items: + type: string + type: array + required: + - volumeGroupSnapshotHandle + - volumeSnapshotHandles + type: object + x-kubernetes-validations: + - message: groupSnapshotHandles is immutable + rule: self == oldSelf + volumeHandles: + description: |- + VolumeHandles is a list of volume handles on the backend to be snapshotted + together. It is specified for dynamic provisioning of the VolumeGroupSnapshot. + This field is immutable. + items: + type: string + type: array + x-kubernetes-validations: + - message: volumeHandles is immutable + rule: self == oldSelf + type: object + x-kubernetes-validations: + - message: volumeHandles is required once set + rule: '!has(oldSelf.volumeHandles) || has(self.volumeHandles)' + - message: groupSnapshotHandles is required once set + rule: '!has(oldSelf.groupSnapshotHandles) || has(self.groupSnapshotHandles)' + - message: exactly one of volumeHandles and groupSnapshotHandles must + be set + rule: (has(self.volumeHandles) && !has(self.groupSnapshotHandles)) + || (!has(self.volumeHandles) && has(self.groupSnapshotHandles)) + volumeGroupSnapshotClassName: + description: |- + 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. + type: string + volumeGroupSnapshotRef: + description: |- + 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. + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: |- + If referring to a piece of an object instead of an entire object, this string + should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. + For example, if the object reference is to a container within a pod, this would take on a value like: + "spec.containers{name}" (where "name" refers to the name of the container that triggered + the event) or if no container name is specified "spec.containers[2]" (container with + index 2 in this pod). This syntax is chosen only to have some well-defined way of + referencing a part of an object. + TODO: this design is not final and this field is subject to change in the future. + type: string + kind: + description: |- + Kind of the referent. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + name: + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + namespace: + description: |- + Namespace of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ + type: string + resourceVersion: + description: |- + Specific resourceVersion to which this reference is made, if any. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency + type: string + uid: + description: |- + UID of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + type: string + type: object + x-kubernetes-map-type: atomic + x-kubernetes-validations: + - message: both volumeGroupSnapshotRef.name and volumeGroupSnapshotRef.namespace + must be set + rule: has(self.name) && has(self.__namespace__) + required: + - deletionPolicy + - driver + - source + - volumeGroupSnapshotRef + type: object + status: + description: status represents the current information of a group snapshot. + properties: + creationTime: + description: |- + 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. + If not specified, it means the readiness of a group snapshot is unknown. + The format of this field is a Unix nanoseconds time encoded as an int64. + On Unix, the command date +%s%N returns the current time in nanoseconds + since 1970-01-01 00:00:00 UTC. + This field is the source for the CreationTime field in VolumeGroupSnapshotStatus + format: date-time + type: string + error: + description: |- + Error is the last observed error during group snapshot creation, if any. + Upon success after retry, this error field will be cleared. + properties: + message: + description: |- + 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. + type: string + time: + description: time is the timestamp when the error was encountered. + format: date-time + type: string + type: object + readyToUse: + description: |- + ReadyToUse indicates if all the individual snapshots in the group are ready to be + used to restore a group of volumes. + ReadyToUse becomes true when ReadyToUse of all individual snapshots become true. + type: boolean + volumeGroupSnapshotHandle: + description: |- + 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. + type: string + volumeSnapshotInfoList: + description: |- + This field is introduced in v1beta2 + It is replacing VolumeSnapshotHandlePairList + VolumeSnapshotInfoList is a list of snapshot information returned by + by the CSI driver to identify snapshots on the storage system. + items: + description: |- + The VolumeSnapshotInfo struct is added in v1beta2 + VolumeSnapshotInfo contains information for a snapshot + properties: + creationTime: + description: |- + creationTime is the timestamp when the point-in-time snapshot is taken + by the underlying storage system. + format: int64 + type: integer + readyToUse: + description: ReadyToUse indicates if the snapshot is ready to + be used to restore a volume. + type: boolean + restoreSize: + description: RestoreSize represents the complete size of the + snapshot in bytes. + format: int64 + type: integer + snapshotHandle: + description: |- + SnapshotHandle is a unique id returned by the CSI driver to identify a volume + snapshot on the storage system + type: string + volumeHandle: + description: |- + VolumeHandle is a unique id returned by the CSI driver to identify a volume + on the storage system + type: string + type: object + type: array + type: object + required: + - spec + type: object + served: true + storage: false + subresources: + status: {} diff --git a/client/config/crd/groupsnapshot.storage.k8s.io_volumegroupsnapshots.yaml b/client/config/crd/groupsnapshot.storage.k8s.io_volumegroupsnapshots.yaml index 145d1211d..036824434 100644 --- a/client/config/crd/groupsnapshot.storage.k8s.io_volumegroupsnapshots.yaml +++ b/client/config/crd/groupsnapshot.storage.k8s.io_volumegroupsnapshots.yaml @@ -237,3 +237,223 @@ spec: storage: true subresources: status: {} + - additionalPrinterColumns: + - description: Indicates if all the individual snapshots in the group are ready + to be used to restore a group of volumes. + jsonPath: .status.readyToUse + name: ReadyToUse + type: boolean + - description: The name of the VolumeGroupSnapshotClass requested by the VolumeGroupSnapshot. + jsonPath: .spec.volumeGroupSnapshotClassName + name: VolumeGroupSnapshotClass + type: string + - description: Name of the VolumeGroupSnapshotContent object to which the VolumeGroupSnapshot + object intends to bind to. Please note that verification of binding actually + requires checking both VolumeGroupSnapshot and VolumeGroupSnapshotContent + to ensure both are pointing at each other. Binding MUST be verified prior + to usage of this object. + jsonPath: .status.boundVolumeGroupSnapshotContentName + name: VolumeGroupSnapshotContent + type: string + - description: Timestamp when the point-in-time group snapshot was taken by the + underlying storage system. + jsonPath: .status.creationTime + name: CreationTime + type: date + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1beta2 + schema: + openAPIV3Schema: + description: |- + VolumeGroupSnapshot is a user's request for creating either a point-in-time + group snapshot or binding to a pre-existing group snapshot. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: |- + Spec defines the desired characteristics of a group snapshot requested by a user. + Required. + properties: + source: + description: |- + Source specifies where a group snapshot will be created from. + This field is immutable after creation. + Required. + properties: + selector: + description: |- + Selector is a label query over persistent volume claims 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. + properties: + matchExpressions: + description: matchExpressions is a list of label selector + requirements. The requirements are ANDed. + items: + description: |- + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. + properties: + key: + description: key is the label key that the selector + applies to. + type: string + operator: + description: |- + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: |- + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced during a strategic + merge patch. + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + description: |- + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + x-kubernetes-validations: + - message: selector is immutable + rule: self == oldSelf + volumeGroupSnapshotContentName: + description: |- + VolumeGroupSnapshotContentName specifies the name of a pre-existing VolumeGroupSnapshotContent + object representing an existing volume group snapshot. + This field should be set if the volume group snapshot already exists and + only needs a representation in Kubernetes. + This field is immutable. + type: string + x-kubernetes-validations: + - message: volumeGroupSnapshotContentName is immutable + rule: self == oldSelf + type: object + x-kubernetes-validations: + - message: selector is required once set + rule: '!has(oldSelf.selector) || has(self.selector)' + - message: volumeGroupSnapshotContentName is required once set + rule: '!has(oldSelf.volumeGroupSnapshotContentName) || has(self.volumeGroupSnapshotContentName)' + - message: exactly one of selector and volumeGroupSnapshotContentName + must be set + rule: (has(self.selector) && !has(self.volumeGroupSnapshotContentName)) + || (!has(self.selector) && has(self.volumeGroupSnapshotContentName)) + volumeGroupSnapshotClassName: + description: |- + 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. + type: string + x-kubernetes-validations: + - message: volumeGroupSnapshotClassName must not be the empty string + when set + rule: size(self) > 0 + required: + - source + type: object + status: + description: |- + Status represents the current information of a group snapshot. + Consumers must verify binding between VolumeGroupSnapshot and + VolumeGroupSnapshotContent objects is successful (by validating that both + VolumeGroupSnapshot and VolumeGroupSnapshotContent point to each other) before + using this object. + properties: + boundVolumeGroupSnapshotContentName: + description: |- + 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. + type: string + creationTime: + description: |- + 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. + The format of this field is a Unix nanoseconds time encoded as an int64. + On Unix, the command date +%s%N returns the current time in nanoseconds + since 1970-01-01 00:00:00 UTC. + This field is updated based on the CreationTime field in VolumeGroupSnapshotContentStatus + format: date-time + type: string + error: + description: |- + 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. + properties: + message: + description: |- + 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. + type: string + time: + description: time is the timestamp when the error was encountered. + format: date-time + type: string + type: object + readyToUse: + description: |- + ReadyToUse indicates if all the individual snapshots in the group are ready + to be used to restore a group of volumes. + ReadyToUse becomes true when ReadyToUse of all individual snapshots become true. + If not specified, it means the readiness of a group snapshot is unknown. + type: boolean + type: object + required: + - spec + type: object + served: true + storage: false + subresources: + status: {} diff --git a/client/informers/externalversions/factory.go b/client/informers/externalversions/factory.go index b2b0ef72f..d13af4687 100644 --- a/client/informers/externalversions/factory.go +++ b/client/informers/externalversions/factory.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/client/informers/externalversions/generic.go b/client/informers/externalversions/generic.go index 3f4fb8ee5..2fb01475c 100644 --- a/client/informers/externalversions/generic.go +++ b/client/informers/externalversions/generic.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. @@ -22,6 +22,7 @@ import ( "fmt" v1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta1" + v1beta2 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta2" v1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumesnapshot/v1" schema "k8s.io/apimachinery/pkg/runtime/schema" cache "k8s.io/client-go/tools/cache" @@ -61,6 +62,14 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource case v1beta1.SchemeGroupVersion.WithResource("volumegroupsnapshotcontents"): return &genericInformer{resource: resource.GroupResource(), informer: f.Groupsnapshot().V1beta1().VolumeGroupSnapshotContents().Informer()}, nil + // Group=groupsnapshot.storage.k8s.io, Version=v1beta2 + case v1beta2.SchemeGroupVersion.WithResource("volumegroupsnapshots"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Groupsnapshot().V1beta2().VolumeGroupSnapshots().Informer()}, nil + case v1beta2.SchemeGroupVersion.WithResource("volumegroupsnapshotclasses"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Groupsnapshot().V1beta2().VolumeGroupSnapshotClasses().Informer()}, nil + case v1beta2.SchemeGroupVersion.WithResource("volumegroupsnapshotcontents"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Groupsnapshot().V1beta2().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 diff --git a/client/informers/externalversions/internalinterfaces/factory_interfaces.go b/client/informers/externalversions/internalinterfaces/factory_interfaces.go index 50c56e95e..43f74471b 100644 --- a/client/informers/externalversions/internalinterfaces/factory_interfaces.go +++ b/client/informers/externalversions/internalinterfaces/factory_interfaces.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/client/informers/externalversions/volumegroupsnapshot/interface.go b/client/informers/externalversions/volumegroupsnapshot/interface.go index e75bc2edf..fdd82f6cf 100644 --- a/client/informers/externalversions/volumegroupsnapshot/interface.go +++ b/client/informers/externalversions/volumegroupsnapshot/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. @@ -21,12 +21,15 @@ package volumegroupsnapshot import ( internalinterfaces "github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/internalinterfaces" v1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumegroupsnapshot/v1beta1" + v1beta2 "github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumegroupsnapshot/v1beta2" ) // Interface provides access to each of this group's versions. type Interface interface { // V1beta1 provides access to shared informers for resources in V1beta1. V1beta1() v1beta1.Interface + // V1beta2 provides access to shared informers for resources in V1beta2. + V1beta2() v1beta2.Interface } type group struct { @@ -44,3 +47,8 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList func (g *group) V1beta1() v1beta1.Interface { return v1beta1.New(g.factory, g.namespace, g.tweakListOptions) } + +// V1beta2 returns a new v1beta2.Interface. +func (g *group) V1beta2() v1beta2.Interface { + return v1beta2.New(g.factory, g.namespace, g.tweakListOptions) +} diff --git a/client/informers/externalversions/volumegroupsnapshot/v1beta1/interface.go b/client/informers/externalversions/volumegroupsnapshot/v1beta1/interface.go index 3bcbe139f..cc45f04fb 100644 --- a/client/informers/externalversions/volumegroupsnapshot/v1beta1/interface.go +++ b/client/informers/externalversions/volumegroupsnapshot/v1beta1/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/client/informers/externalversions/volumegroupsnapshot/v1beta1/volumegroupsnapshot.go b/client/informers/externalversions/volumegroupsnapshot/v1beta1/volumegroupsnapshot.go index 25343f6c1..1fb1c99b1 100644 --- a/client/informers/externalversions/volumegroupsnapshot/v1beta1/volumegroupsnapshot.go +++ b/client/informers/externalversions/volumegroupsnapshot/v1beta1/volumegroupsnapshot.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/client/informers/externalversions/volumegroupsnapshot/v1beta1/volumegroupsnapshotclass.go b/client/informers/externalversions/volumegroupsnapshot/v1beta1/volumegroupsnapshotclass.go index c3fa376ec..9a0d6fcff 100644 --- a/client/informers/externalversions/volumegroupsnapshot/v1beta1/volumegroupsnapshotclass.go +++ b/client/informers/externalversions/volumegroupsnapshot/v1beta1/volumegroupsnapshotclass.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/client/informers/externalversions/volumegroupsnapshot/v1beta1/volumegroupsnapshotcontent.go b/client/informers/externalversions/volumegroupsnapshot/v1beta1/volumegroupsnapshotcontent.go index 8d15f85cc..ed62e8c4e 100644 --- a/client/informers/externalversions/volumegroupsnapshot/v1beta1/volumegroupsnapshotcontent.go +++ b/client/informers/externalversions/volumegroupsnapshot/v1beta1/volumegroupsnapshotcontent.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/client/informers/externalversions/volumegroupsnapshot/v1beta2/interface.go b/client/informers/externalversions/volumegroupsnapshot/v1beta2/interface.go new file mode 100644 index 000000000..67419a8e3 --- /dev/null +++ b/client/informers/externalversions/volumegroupsnapshot/v1beta2/interface.go @@ -0,0 +1,59 @@ +/* +Copyright 2025 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 informer-gen. DO NOT EDIT. + +package v1beta2 + +import ( + internalinterfaces "github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/internalinterfaces" +) + +// Interface provides access to all the informers in this group version. +type Interface interface { + // VolumeGroupSnapshots returns a VolumeGroupSnapshotInformer. + VolumeGroupSnapshots() VolumeGroupSnapshotInformer + // VolumeGroupSnapshotClasses returns a VolumeGroupSnapshotClassInformer. + VolumeGroupSnapshotClasses() VolumeGroupSnapshotClassInformer + // VolumeGroupSnapshotContents returns a VolumeGroupSnapshotContentInformer. + VolumeGroupSnapshotContents() VolumeGroupSnapshotContentInformer +} + +type version struct { + factory internalinterfaces.SharedInformerFactory + namespace string + tweakListOptions internalinterfaces.TweakListOptionsFunc +} + +// New returns a new Interface. +func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { + return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} +} + +// VolumeGroupSnapshots returns a VolumeGroupSnapshotInformer. +func (v *version) VolumeGroupSnapshots() VolumeGroupSnapshotInformer { + return &volumeGroupSnapshotInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} + +// VolumeGroupSnapshotClasses returns a VolumeGroupSnapshotClassInformer. +func (v *version) VolumeGroupSnapshotClasses() VolumeGroupSnapshotClassInformer { + return &volumeGroupSnapshotClassInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} +} + +// VolumeGroupSnapshotContents returns a VolumeGroupSnapshotContentInformer. +func (v *version) VolumeGroupSnapshotContents() VolumeGroupSnapshotContentInformer { + return &volumeGroupSnapshotContentInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} +} diff --git a/client/informers/externalversions/volumegroupsnapshot/v1beta2/volumegroupsnapshot.go b/client/informers/externalversions/volumegroupsnapshot/v1beta2/volumegroupsnapshot.go new file mode 100644 index 000000000..d268d6f30 --- /dev/null +++ b/client/informers/externalversions/volumegroupsnapshot/v1beta2/volumegroupsnapshot.go @@ -0,0 +1,90 @@ +/* +Copyright 2025 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 informer-gen. DO NOT EDIT. + +package v1beta2 + +import ( + "context" + time "time" + + volumegroupsnapshotv1beta2 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta2" + versioned "github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned" + internalinterfaces "github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/internalinterfaces" + v1beta2 "github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1beta2" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +// VolumeGroupSnapshotInformer provides access to a shared informer and lister for +// VolumeGroupSnapshots. +type VolumeGroupSnapshotInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1beta2.VolumeGroupSnapshotLister +} + +type volumeGroupSnapshotInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc + namespace string +} + +// NewVolumeGroupSnapshotInformer constructs a new informer for VolumeGroupSnapshot type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewVolumeGroupSnapshotInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredVolumeGroupSnapshotInformer(client, namespace, resyncPeriod, indexers, nil) +} + +// NewFilteredVolumeGroupSnapshotInformer constructs a new informer for VolumeGroupSnapshot type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewFilteredVolumeGroupSnapshotInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { + return cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.GroupsnapshotV1beta2().VolumeGroupSnapshots(namespace).List(context.TODO(), options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.GroupsnapshotV1beta2().VolumeGroupSnapshots(namespace).Watch(context.TODO(), options) + }, + }, + &volumegroupsnapshotv1beta2.VolumeGroupSnapshot{}, + resyncPeriod, + indexers, + ) +} + +func (f *volumeGroupSnapshotInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredVolumeGroupSnapshotInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *volumeGroupSnapshotInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&volumegroupsnapshotv1beta2.VolumeGroupSnapshot{}, f.defaultInformer) +} + +func (f *volumeGroupSnapshotInformer) Lister() v1beta2.VolumeGroupSnapshotLister { + return v1beta2.NewVolumeGroupSnapshotLister(f.Informer().GetIndexer()) +} diff --git a/client/informers/externalversions/volumegroupsnapshot/v1beta2/volumegroupsnapshotclass.go b/client/informers/externalversions/volumegroupsnapshot/v1beta2/volumegroupsnapshotclass.go new file mode 100644 index 000000000..b5cf8d6b5 --- /dev/null +++ b/client/informers/externalversions/volumegroupsnapshot/v1beta2/volumegroupsnapshotclass.go @@ -0,0 +1,89 @@ +/* +Copyright 2025 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 informer-gen. DO NOT EDIT. + +package v1beta2 + +import ( + "context" + time "time" + + volumegroupsnapshotv1beta2 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta2" + versioned "github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned" + internalinterfaces "github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/internalinterfaces" + v1beta2 "github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1beta2" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +// VolumeGroupSnapshotClassInformer provides access to a shared informer and lister for +// VolumeGroupSnapshotClasses. +type VolumeGroupSnapshotClassInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1beta2.VolumeGroupSnapshotClassLister +} + +type volumeGroupSnapshotClassInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc +} + +// NewVolumeGroupSnapshotClassInformer constructs a new informer for VolumeGroupSnapshotClass type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewVolumeGroupSnapshotClassInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredVolumeGroupSnapshotClassInformer(client, resyncPeriod, indexers, nil) +} + +// NewFilteredVolumeGroupSnapshotClassInformer constructs a new informer for VolumeGroupSnapshotClass type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewFilteredVolumeGroupSnapshotClassInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { + return cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.GroupsnapshotV1beta2().VolumeGroupSnapshotClasses().List(context.TODO(), options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.GroupsnapshotV1beta2().VolumeGroupSnapshotClasses().Watch(context.TODO(), options) + }, + }, + &volumegroupsnapshotv1beta2.VolumeGroupSnapshotClass{}, + resyncPeriod, + indexers, + ) +} + +func (f *volumeGroupSnapshotClassInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredVolumeGroupSnapshotClassInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *volumeGroupSnapshotClassInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&volumegroupsnapshotv1beta2.VolumeGroupSnapshotClass{}, f.defaultInformer) +} + +func (f *volumeGroupSnapshotClassInformer) Lister() v1beta2.VolumeGroupSnapshotClassLister { + return v1beta2.NewVolumeGroupSnapshotClassLister(f.Informer().GetIndexer()) +} diff --git a/client/informers/externalversions/volumegroupsnapshot/v1beta2/volumegroupsnapshotcontent.go b/client/informers/externalversions/volumegroupsnapshot/v1beta2/volumegroupsnapshotcontent.go new file mode 100644 index 000000000..bde0a3036 --- /dev/null +++ b/client/informers/externalversions/volumegroupsnapshot/v1beta2/volumegroupsnapshotcontent.go @@ -0,0 +1,89 @@ +/* +Copyright 2025 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 informer-gen. DO NOT EDIT. + +package v1beta2 + +import ( + "context" + time "time" + + volumegroupsnapshotv1beta2 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta2" + versioned "github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned" + internalinterfaces "github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/internalinterfaces" + v1beta2 "github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1beta2" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +// VolumeGroupSnapshotContentInformer provides access to a shared informer and lister for +// VolumeGroupSnapshotContents. +type VolumeGroupSnapshotContentInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1beta2.VolumeGroupSnapshotContentLister +} + +type volumeGroupSnapshotContentInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc +} + +// NewVolumeGroupSnapshotContentInformer constructs a new informer for VolumeGroupSnapshotContent type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewVolumeGroupSnapshotContentInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredVolumeGroupSnapshotContentInformer(client, resyncPeriod, indexers, nil) +} + +// NewFilteredVolumeGroupSnapshotContentInformer constructs a new informer for VolumeGroupSnapshotContent type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewFilteredVolumeGroupSnapshotContentInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { + return cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.GroupsnapshotV1beta2().VolumeGroupSnapshotContents().List(context.TODO(), options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.GroupsnapshotV1beta2().VolumeGroupSnapshotContents().Watch(context.TODO(), options) + }, + }, + &volumegroupsnapshotv1beta2.VolumeGroupSnapshotContent{}, + resyncPeriod, + indexers, + ) +} + +func (f *volumeGroupSnapshotContentInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredVolumeGroupSnapshotContentInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *volumeGroupSnapshotContentInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&volumegroupsnapshotv1beta2.VolumeGroupSnapshotContent{}, f.defaultInformer) +} + +func (f *volumeGroupSnapshotContentInformer) Lister() v1beta2.VolumeGroupSnapshotContentLister { + return v1beta2.NewVolumeGroupSnapshotContentLister(f.Informer().GetIndexer()) +} diff --git a/client/informers/externalversions/volumesnapshot/interface.go b/client/informers/externalversions/volumesnapshot/interface.go index bb6c4000c..52aa45ac3 100644 --- a/client/informers/externalversions/volumesnapshot/interface.go +++ b/client/informers/externalversions/volumesnapshot/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/client/informers/externalversions/volumesnapshot/v1/interface.go b/client/informers/externalversions/volumesnapshot/v1/interface.go index 4b7ce9050..355976469 100644 --- a/client/informers/externalversions/volumesnapshot/v1/interface.go +++ b/client/informers/externalversions/volumesnapshot/v1/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/client/informers/externalversions/volumesnapshot/v1/volumesnapshot.go b/client/informers/externalversions/volumesnapshot/v1/volumesnapshot.go index fe8070b22..8822d85ed 100644 --- a/client/informers/externalversions/volumesnapshot/v1/volumesnapshot.go +++ b/client/informers/externalversions/volumesnapshot/v1/volumesnapshot.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/client/informers/externalversions/volumesnapshot/v1/volumesnapshotclass.go b/client/informers/externalversions/volumesnapshot/v1/volumesnapshotclass.go index 7b2d7f1c5..09595ebda 100644 --- a/client/informers/externalversions/volumesnapshot/v1/volumesnapshotclass.go +++ b/client/informers/externalversions/volumesnapshot/v1/volumesnapshotclass.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/client/informers/externalversions/volumesnapshot/v1/volumesnapshotcontent.go b/client/informers/externalversions/volumesnapshot/v1/volumesnapshotcontent.go index 18203f9cb..75c684100 100644 --- a/client/informers/externalversions/volumesnapshot/v1/volumesnapshotcontent.go +++ b/client/informers/externalversions/volumesnapshot/v1/volumesnapshotcontent.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/client/listers/volumegroupsnapshot/v1beta1/expansion_generated.go b/client/listers/volumegroupsnapshot/v1beta1/expansion_generated.go index 1b4044bbd..c08a1c659 100644 --- a/client/listers/volumegroupsnapshot/v1beta1/expansion_generated.go +++ b/client/listers/volumegroupsnapshot/v1beta1/expansion_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/client/listers/volumegroupsnapshot/v1beta1/volumegroupsnapshot.go b/client/listers/volumegroupsnapshot/v1beta1/volumegroupsnapshot.go index f2edc34a7..471bd1007 100644 --- a/client/listers/volumegroupsnapshot/v1beta1/volumegroupsnapshot.go +++ b/client/listers/volumegroupsnapshot/v1beta1/volumegroupsnapshot.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/client/listers/volumegroupsnapshot/v1beta1/volumegroupsnapshotclass.go b/client/listers/volumegroupsnapshot/v1beta1/volumegroupsnapshotclass.go index 351e37e91..166cfbdd7 100644 --- a/client/listers/volumegroupsnapshot/v1beta1/volumegroupsnapshotclass.go +++ b/client/listers/volumegroupsnapshot/v1beta1/volumegroupsnapshotclass.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/client/listers/volumegroupsnapshot/v1beta1/volumegroupsnapshotcontent.go b/client/listers/volumegroupsnapshot/v1beta1/volumegroupsnapshotcontent.go index 576302795..f4e1be413 100644 --- a/client/listers/volumegroupsnapshot/v1beta1/volumegroupsnapshotcontent.go +++ b/client/listers/volumegroupsnapshot/v1beta1/volumegroupsnapshotcontent.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/client/listers/volumegroupsnapshot/v1beta2/expansion_generated.go b/client/listers/volumegroupsnapshot/v1beta2/expansion_generated.go new file mode 100644 index 000000000..9a5a89ec2 --- /dev/null +++ b/client/listers/volumegroupsnapshot/v1beta2/expansion_generated.go @@ -0,0 +1,35 @@ +/* +Copyright 2025 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 lister-gen. DO NOT EDIT. + +package v1beta2 + +// VolumeGroupSnapshotListerExpansion allows custom methods to be added to +// VolumeGroupSnapshotLister. +type VolumeGroupSnapshotListerExpansion interface{} + +// VolumeGroupSnapshotNamespaceListerExpansion allows custom methods to be added to +// VolumeGroupSnapshotNamespaceLister. +type VolumeGroupSnapshotNamespaceListerExpansion interface{} + +// VolumeGroupSnapshotClassListerExpansion allows custom methods to be added to +// VolumeGroupSnapshotClassLister. +type VolumeGroupSnapshotClassListerExpansion interface{} + +// VolumeGroupSnapshotContentListerExpansion allows custom methods to be added to +// VolumeGroupSnapshotContentLister. +type VolumeGroupSnapshotContentListerExpansion interface{} diff --git a/client/listers/volumegroupsnapshot/v1beta2/volumegroupsnapshot.go b/client/listers/volumegroupsnapshot/v1beta2/volumegroupsnapshot.go new file mode 100644 index 000000000..cc58c9aa9 --- /dev/null +++ b/client/listers/volumegroupsnapshot/v1beta2/volumegroupsnapshot.go @@ -0,0 +1,99 @@ +/* +Copyright 2025 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 lister-gen. DO NOT EDIT. + +package v1beta2 + +import ( + v1beta2 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta2" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// VolumeGroupSnapshotLister helps list VolumeGroupSnapshots. +// All objects returned here must be treated as read-only. +type VolumeGroupSnapshotLister interface { + // List lists all VolumeGroupSnapshots in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1beta2.VolumeGroupSnapshot, err error) + // VolumeGroupSnapshots returns an object that can list and get VolumeGroupSnapshots. + VolumeGroupSnapshots(namespace string) VolumeGroupSnapshotNamespaceLister + VolumeGroupSnapshotListerExpansion +} + +// volumeGroupSnapshotLister implements the VolumeGroupSnapshotLister interface. +type volumeGroupSnapshotLister struct { + indexer cache.Indexer +} + +// NewVolumeGroupSnapshotLister returns a new VolumeGroupSnapshotLister. +func NewVolumeGroupSnapshotLister(indexer cache.Indexer) VolumeGroupSnapshotLister { + return &volumeGroupSnapshotLister{indexer: indexer} +} + +// List lists all VolumeGroupSnapshots in the indexer. +func (s *volumeGroupSnapshotLister) List(selector labels.Selector) (ret []*v1beta2.VolumeGroupSnapshot, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta2.VolumeGroupSnapshot)) + }) + return ret, err +} + +// VolumeGroupSnapshots returns an object that can list and get VolumeGroupSnapshots. +func (s *volumeGroupSnapshotLister) VolumeGroupSnapshots(namespace string) VolumeGroupSnapshotNamespaceLister { + return volumeGroupSnapshotNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// VolumeGroupSnapshotNamespaceLister helps list and get VolumeGroupSnapshots. +// All objects returned here must be treated as read-only. +type VolumeGroupSnapshotNamespaceLister interface { + // List lists all VolumeGroupSnapshots in the indexer for a given namespace. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1beta2.VolumeGroupSnapshot, err error) + // Get retrieves the VolumeGroupSnapshot from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. + Get(name string) (*v1beta2.VolumeGroupSnapshot, error) + VolumeGroupSnapshotNamespaceListerExpansion +} + +// volumeGroupSnapshotNamespaceLister implements the VolumeGroupSnapshotNamespaceLister +// interface. +type volumeGroupSnapshotNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all VolumeGroupSnapshots in the indexer for a given namespace. +func (s volumeGroupSnapshotNamespaceLister) List(selector labels.Selector) (ret []*v1beta2.VolumeGroupSnapshot, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta2.VolumeGroupSnapshot)) + }) + return ret, err +} + +// Get retrieves the VolumeGroupSnapshot from the indexer for a given namespace and name. +func (s volumeGroupSnapshotNamespaceLister) Get(name string) (*v1beta2.VolumeGroupSnapshot, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1beta2.Resource("volumegroupsnapshot"), name) + } + return obj.(*v1beta2.VolumeGroupSnapshot), nil +} diff --git a/client/listers/volumegroupsnapshot/v1beta2/volumegroupsnapshotclass.go b/client/listers/volumegroupsnapshot/v1beta2/volumegroupsnapshotclass.go new file mode 100644 index 000000000..9beb4b35c --- /dev/null +++ b/client/listers/volumegroupsnapshot/v1beta2/volumegroupsnapshotclass.go @@ -0,0 +1,68 @@ +/* +Copyright 2025 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 lister-gen. DO NOT EDIT. + +package v1beta2 + +import ( + v1beta2 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta2" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// VolumeGroupSnapshotClassLister helps list VolumeGroupSnapshotClasses. +// All objects returned here must be treated as read-only. +type VolumeGroupSnapshotClassLister interface { + // List lists all VolumeGroupSnapshotClasses in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1beta2.VolumeGroupSnapshotClass, err error) + // Get retrieves the VolumeGroupSnapshotClass from the index for a given name. + // Objects returned here must be treated as read-only. + Get(name string) (*v1beta2.VolumeGroupSnapshotClass, error) + VolumeGroupSnapshotClassListerExpansion +} + +// volumeGroupSnapshotClassLister implements the VolumeGroupSnapshotClassLister interface. +type volumeGroupSnapshotClassLister struct { + indexer cache.Indexer +} + +// NewVolumeGroupSnapshotClassLister returns a new VolumeGroupSnapshotClassLister. +func NewVolumeGroupSnapshotClassLister(indexer cache.Indexer) VolumeGroupSnapshotClassLister { + return &volumeGroupSnapshotClassLister{indexer: indexer} +} + +// List lists all VolumeGroupSnapshotClasses in the indexer. +func (s *volumeGroupSnapshotClassLister) List(selector labels.Selector) (ret []*v1beta2.VolumeGroupSnapshotClass, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta2.VolumeGroupSnapshotClass)) + }) + return ret, err +} + +// Get retrieves the VolumeGroupSnapshotClass from the index for a given name. +func (s *volumeGroupSnapshotClassLister) Get(name string) (*v1beta2.VolumeGroupSnapshotClass, error) { + obj, exists, err := s.indexer.GetByKey(name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1beta2.Resource("volumegroupsnapshotclass"), name) + } + return obj.(*v1beta2.VolumeGroupSnapshotClass), nil +} diff --git a/client/listers/volumegroupsnapshot/v1beta2/volumegroupsnapshotcontent.go b/client/listers/volumegroupsnapshot/v1beta2/volumegroupsnapshotcontent.go new file mode 100644 index 000000000..b84723390 --- /dev/null +++ b/client/listers/volumegroupsnapshot/v1beta2/volumegroupsnapshotcontent.go @@ -0,0 +1,68 @@ +/* +Copyright 2025 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 lister-gen. DO NOT EDIT. + +package v1beta2 + +import ( + v1beta2 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta2" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// VolumeGroupSnapshotContentLister helps list VolumeGroupSnapshotContents. +// All objects returned here must be treated as read-only. +type VolumeGroupSnapshotContentLister interface { + // List lists all VolumeGroupSnapshotContents in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1beta2.VolumeGroupSnapshotContent, err error) + // Get retrieves the VolumeGroupSnapshotContent from the index for a given name. + // Objects returned here must be treated as read-only. + Get(name string) (*v1beta2.VolumeGroupSnapshotContent, error) + VolumeGroupSnapshotContentListerExpansion +} + +// volumeGroupSnapshotContentLister implements the VolumeGroupSnapshotContentLister interface. +type volumeGroupSnapshotContentLister struct { + indexer cache.Indexer +} + +// NewVolumeGroupSnapshotContentLister returns a new VolumeGroupSnapshotContentLister. +func NewVolumeGroupSnapshotContentLister(indexer cache.Indexer) VolumeGroupSnapshotContentLister { + return &volumeGroupSnapshotContentLister{indexer: indexer} +} + +// List lists all VolumeGroupSnapshotContents in the indexer. +func (s *volumeGroupSnapshotContentLister) List(selector labels.Selector) (ret []*v1beta2.VolumeGroupSnapshotContent, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta2.VolumeGroupSnapshotContent)) + }) + return ret, err +} + +// Get retrieves the VolumeGroupSnapshotContent from the index for a given name. +func (s *volumeGroupSnapshotContentLister) Get(name string) (*v1beta2.VolumeGroupSnapshotContent, error) { + obj, exists, err := s.indexer.GetByKey(name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1beta2.Resource("volumegroupsnapshotcontent"), name) + } + return obj.(*v1beta2.VolumeGroupSnapshotContent), nil +} diff --git a/client/listers/volumesnapshot/v1/expansion_generated.go b/client/listers/volumesnapshot/v1/expansion_generated.go index 722075103..a53e1e156 100644 --- a/client/listers/volumesnapshot/v1/expansion_generated.go +++ b/client/listers/volumesnapshot/v1/expansion_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/client/listers/volumesnapshot/v1/volumesnapshot.go b/client/listers/volumesnapshot/v1/volumesnapshot.go index 1a2036323..64e9e6abe 100644 --- a/client/listers/volumesnapshot/v1/volumesnapshot.go +++ b/client/listers/volumesnapshot/v1/volumesnapshot.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/client/listers/volumesnapshot/v1/volumesnapshotclass.go b/client/listers/volumesnapshot/v1/volumesnapshotclass.go index 6eb42e736..b18e30c98 100644 --- a/client/listers/volumesnapshot/v1/volumesnapshotclass.go +++ b/client/listers/volumesnapshot/v1/volumesnapshotclass.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/client/listers/volumesnapshot/v1/volumesnapshotcontent.go b/client/listers/volumesnapshot/v1/volumesnapshotcontent.go index 7af231808..e2dd1c044 100644 --- a/client/listers/volumesnapshot/v1/volumesnapshotcontent.go +++ b/client/listers/volumesnapshot/v1/volumesnapshotcontent.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta1/zz_generated.deepcopy.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta1/zz_generated.deepcopy.go index 4c59130df..0b01c4c05 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta1/zz_generated.deepcopy.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta1/zz_generated.deepcopy.go @@ -2,7 +2,7 @@ // +build !ignore_autogenerated /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta2/doc.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta2/doc.go new file mode 100644 index 000000000..7e20f8d77 --- /dev/null +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta2/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 2025 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=groupsnapshot.storage.k8s.io + +package v1beta2 diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta2/register.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta2/register.go new file mode 100644 index 000000000..d982a1f61 --- /dev/null +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta2/register.go @@ -0,0 +1,57 @@ +/* +Copyright 2025 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 v1beta2 + +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 = "groupsnapshot.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: "v1beta2"} +) + +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 +} diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta2/types.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta2/types.go new file mode 100644 index 000000000..2c8f15479 --- /dev/null +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta2/types.go @@ -0,0 +1,441 @@ +/* +Copyright 2025 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 v1beta2 + +import ( + core_v1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + snapshotv1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumesnapshot/v1" +) + +// VolumeGroupSnapshotSpec defines the desired state of a volume group snapshot. +type VolumeGroupSnapshotSpec struct { + // Source specifies where a group snapshot will be created from. + // This field is immutable after creation. + // Required. + Source VolumeGroupSnapshotSource `json:"source" protobuf:"bytes,1,opt,name=source"` + + // 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 + // +kubebuilder:validation:XValidation:rule="size(self) > 0",message="volumeGroupSnapshotClassName must not be the empty string when set" + VolumeGroupSnapshotClassName *string `json:"volumeGroupSnapshotClassName,omitempty" protobuf:"bytes,2,opt,name=volumeGroupSnapshotClassName"` +} + +// VolumeGroupSnapshotSource specifies whether the underlying group snapshot should be +// dynamically taken upon creation or if a pre-existing VolumeGroupSnapshotContent +// object should be used. +// Exactly one of its members must be set. +// Members in VolumeGroupSnapshotSource are immutable. +// +kubebuilder:validation:XValidation:rule="!has(oldSelf.selector) || has(self.selector)", message="selector is required once set" +// +kubebuilder:validation:XValidation:rule="!has(oldSelf.volumeGroupSnapshotContentName) || has(self.volumeGroupSnapshotContentName)", message="volumeGroupSnapshotContentName is required once set" +// +kubebuilder:validation:XValidation:rule="(has(self.selector) && !has(self.volumeGroupSnapshotContentName)) || (!has(self.selector) && has(self.volumeGroupSnapshotContentName))", message="exactly one of selector and volumeGroupSnapshotContentName must be set" +type VolumeGroupSnapshotSource struct { + // Selector is a label query over persistent volume claims 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. + // +optional + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="selector is immutable" + 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. + // This field should be set if the volume group snapshot already exists and + // only needs a representation in Kubernetes. + // This field is immutable. + // +optional + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="volumeGroupSnapshotContentName is immutable" + VolumeGroupSnapshotContentName *string `json:"volumeGroupSnapshotContentName,omitempty" protobuf:"bytes,2,opt,name=volumeGroupSnapshotContentName"` +} + +// VolumeGroupSnapshotStatus defines the observed state of volume group snapshot. +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. + // The format of this field is a Unix nanoseconds time encoded as an int64. + // On Unix, the command date +%s%N returns the current time in nanoseconds + // since 1970-01-01 00:00:00 UTC. + // This field is updated based on the CreationTime field in VolumeGroupSnapshotContentStatus + // +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 group of volumes. + // ReadyToUse becomes true when ReadyToUse of all individual snapshots become true. + // 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 *snapshotv1.VolumeSnapshotError `json:"error,omitempty" protobuf:"bytes,4,opt,name=error,casttype=VolumeSnapshotError"` +} + +//+genclient +//+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// 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:storageversion +// +kubebuilder:resource:scope=Namespaced,shortName=vgs +// +kubebuilder:subresource:status +// +kubebuilder:printcolumn:name="ReadyToUse",type=boolean,JSONPath=`.status.readyToUse`,description="Indicates if all the individual snapshots in the group are ready to be used to restore a group of volumes." +// +kubebuilder:printcolumn:name="VolumeGroupSnapshotClass",type=string,JSONPath=`.spec.volumeGroupSnapshotClassName`,description="The name of the VolumeGroupSnapshotClass requested by the VolumeGroupSnapshot." +// +kubebuilder:printcolumn:name="VolumeGroupSnapshotContent",type=string,JSONPath=`.status.boundVolumeGroupSnapshotContentName`,description="Name of the VolumeGroupSnapshotContent object to which the VolumeGroupSnapshot object intends to bind to. Please note that verification of binding actually requires checking both VolumeGroupSnapshot and VolumeGroupSnapshotContent to ensure both are pointing at each other. Binding MUST be verified prior to usage of this object." +// +kubebuilder:printcolumn:name="CreationTime",type=date,JSONPath=`.status.creationTime`,description="Timestamp when the point-in-time group snapshot was taken by the underlying storage system." +// +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp` +type VolumeGroupSnapshot struct { + metav1.TypeMeta `json:",inline"` + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Spec defines the desired characteristics of a group snapshot requested by a user. + // Required. + Spec VolumeGroupSnapshotSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"` + // Status represents the current information of a group snapshot. + // Consumers must verify binding between VolumeGroupSnapshot and + // VolumeGroupSnapshotContent objects is successful (by validating that both + // VolumeGroupSnapshot and VolumeGroupSnapshotContent point to each other) before + // using this object. + // +optional + 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 objects. +type VolumeGroupSnapshotList struct { + metav1.TypeMeta `json:",inline"` + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + // Items is the list of VolumeGroupSnapshots. + Items []VolumeGroupSnapshot `json:"items" protobuf:"bytes,2,rep,name=items"` +} + +//+genclient +//+genclient:nonNamespaced +//+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// VolumeGroupSnapshotClass specifies parameters that a underlying storage system +// uses when creating a volume group snapshot. A specific VolumeGroupSnapshotClass +// is used by specifying its name in a VolumeGroupSnapshot object. +// VolumeGroupSnapshotClasses are non-namespaced. +// +kubebuilder:object:root=true +// +kubebuilder:storageversion +// +kubebuilder:resource:scope=Cluster,shortName=vgsclass;vgsclasses +// +kubebuilder:printcolumn:name="Driver",type=string,JSONPath=`.driver` +// +kubebuilder:printcolumn:name="DeletionPolicy",type=string,JSONPath=`.deletionPolicy`,description="Determines whether a VolumeGroupSnapshotContent created through the VolumeGroupSnapshotClass should be deleted when its bound VolumeGroupSnapshot is deleted." +// +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp` +type VolumeGroupSnapshotClass struct { + metav1.TypeMeta `json:",inline"` + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + // +optional + 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 Kubernetes 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". + // "Retain" means that the VolumeGroupSnapshotContent and its physical group + // snapshot on underlying storage system are kept. + // "Delete" means that the VolumeGroupSnapshotContent and its physical group + // snapshot on underlying storage system are deleted. + // Required. + DeletionPolicy snapshotv1.DeletionPolicy `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"` + // Standard list metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Items is the list of VolumeGroupSnapshotClasses. + Items []VolumeGroupSnapshotClass `json:"items" protobuf:"bytes,2,rep,name=items"` +} + +// +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:storageversion +// +kubebuilder:resource:scope=Cluster,shortName=vgsc;vgscs +// +kubebuilder:subresource:status +// +kubebuilder:printcolumn:name="ReadyToUse",type=boolean,JSONPath=`.status.readyToUse`,description="Indicates if all the individual snapshots in the group are ready to be used to restore a group of volumes." +// +kubebuilder:printcolumn:name="DeletionPolicy",type=string,JSONPath=`.spec.deletionPolicy`,description="Determines whether this VolumeGroupSnapshotContent and its physical group snapshot on the underlying storage system should be deleted when its bound VolumeGroupSnapshot is deleted." +// +kubebuilder:printcolumn:name="Driver",type=string,JSONPath=`.spec.driver`,description="Name of the CSI driver used to create the physical group snapshot on the underlying storage system." +// +kubebuilder:printcolumn:name="VolumeGroupSnapshotClass",type=string,JSONPath=`.spec.volumeGroupSnapshotClassName`,description="Name of the VolumeGroupSnapshotClass from which this group snapshot was (or will be) created." +// +kubebuilder:printcolumn:name="VolumeGroupSnapshotNamespace",type=string,JSONPath=`.spec.volumeGroupSnapshotRef.namespace`,description="Namespace of the VolumeGroupSnapshot object to which this VolumeGroupSnapshotContent object is bound." +// +kubebuilder:printcolumn:name="VolumeGroupSnapshot",type=string,JSONPath=`.spec.volumeGroupSnapshotRef.name`,description="Name of the VolumeGroupSnapshot object to which this VolumeGroupSnapshotContent object is bound." +// +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp` +type VolumeGroupSnapshotContent struct { + metav1.TypeMeta `json:",inline"` + // Standard list metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Spec defines properties of a VolumeGroupSnapshotContent created by the underlying storage system. + // Required. + Spec VolumeGroupSnapshotContentSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"` + // status represents the current information of a group snapshot. + // +optional + 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"` + // Standard list metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Items is the list of VolumeGroupSnapshotContents. + 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. + // +kubebuilder:validation:XValidation:rule="has(self.name) && has(self.__namespace__)",message="both volumeGroupSnapshotRef.name and volumeGroupSnapshotRef.namespace must be set" + VolumeGroupSnapshotRef core_v1.ObjectReference `json:"volumeGroupSnapshotRef" protobuf:"bytes,1,opt,name=volumeGroupSnapshotRef"` + + // DeletionPolicy determines whether this VolumeGroupSnapshotContent and the + // physical group snapshot on the underlying storage system should be deleted + // when the bound VolumeGroupSnapshot is deleted. + // Supported values are "Retain" and "Delete". + // "Retain" means that the VolumeGroupSnapshotContent and its physical group + // snapshot on underlying storage system are kept. + // "Delete" means that the VolumeGroupSnapshotContent and its physical group + // snapshot on underlying storage system are deleted. + // 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 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 + // 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"` +} + +// The VolumeSnapshotInfo struct is added in v1beta2 +// VolumeSnapshotInfo contains information for a snapshot +type VolumeSnapshotInfo struct { + // VolumeHandle is a unique id returned by the CSI driver to identify a volume + // on the storage system + VolumeHandle string `json:"volumeHandle,omitempty" protobuf:"bytes,1,opt,name=volumeHandle"` + + // SnapshotHandle is a unique id returned by the CSI driver to identify a volume + // snapshot on the storage system + SnapshotHandle string `json:"snapshotHandle,omitempty" protobuf:"bytes,2,opt,name=snapshotHandle"` + + // creationTime is the timestamp when the point-in-time snapshot is taken + // by the underlying storage system. + // +optional + CreationTime *int64 `json:"creationTime,omitempty" protobuf:"varint,3,opt,name=creationTime"` + + // ReadyToUse indicates if the snapshot is ready to be used to restore a volume. + // +optional + ReadyToUse *bool `json:"readyToUse,omitempty" protobuf:"varint,4,opt,name=readyToUse"` + + // RestoreSize represents the complete size of the snapshot in bytes. + // +optional + RestoreSize *int64 `json:"restoreSize,omitempty" protobuf:"bytes,5,opt,name=restoreSize"` +} + +// 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. + // If not specified, it means the readiness of a group snapshot is unknown. + // The format of this field is a Unix nanoseconds time encoded as an int64. + // On Unix, the command date +%s%N returns the current time in nanoseconds + // since 1970-01-01 00:00:00 UTC. + // This field is the source for the CreationTime field in VolumeGroupSnapshotStatus + // +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 group of volumes. + // ReadyToUse becomes true when ReadyToUse of all individual snapshots become true. + // +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 *snapshotv1.VolumeSnapshotError `json:"error,omitempty" protobuf:"bytes,4,opt,name=error,casttype=VolumeSnapshotError"` + + // This field is introduced in v1beta1 but removed in v1beta2 + // It is replaced by VolumeSnapshotInfoList + // Information in this field from an existing v1beta1 API object + // will be copied to VolumeSnapshotInfoList by the conversion logic + // + // VolumeSnapshotHandlePairList is a list of CSI "volume_id" and "snapshot_id" + // pair returned by the CSI driver to identify snapshots and their source volumes + // on the storage system. + // +optional + // VolumeSnapshotHandlePairList []VolumeSnapshotHandlePair `json:"volumeSnapshotHandlePairList,omitempty" protobuf:"bytes,6,opt,name=volumeSnapshotHandlePairList"` + + // This field is introduced in v1beta2 + // It is replacing VolumeSnapshotHandlePairList + // VolumeSnapshotInfoList is a list of snapshot information returned by + // by the CSI driver to identify snapshots on the storage system. + // +optional + VolumeSnapshotInfoList []VolumeSnapshotInfo `json:"volumeSnapshotInfoList,omitempty" protobuf:"bytes,5,opt,name=volumeSnapshotInfo"` +} + +// VolumeGroupSnapshotContentSource represents the CSI source of a group snapshot. +// Exactly one of its members must be set. +// Members in VolumeGroupSnapshotContentSource are immutable. +// +kubebuilder:validation:XValidation:rule="!has(oldSelf.volumeHandles) || has(self.volumeHandles)", message="volumeHandles is required once set" +// +kubebuilder:validation:XValidation:rule="!has(oldSelf.groupSnapshotHandles) || has(self.groupSnapshotHandles)", message="groupSnapshotHandles is required once set" +// +kubebuilder:validation:XValidation:rule="(has(self.volumeHandles) && !has(self.groupSnapshotHandles)) || (!has(self.volumeHandles) && has(self.groupSnapshotHandles))", message="exactly one of volumeHandles and groupSnapshotHandles must be set" +type VolumeGroupSnapshotContentSource struct { + // VolumeHandles is a list of volume handles on the backend to be snapshotted + // together. It is specified for dynamic provisioning of the VolumeGroupSnapshot. + // This field is immutable. + // +optional + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="volumeHandles is immutable" + VolumeHandles []string `json:"volumeHandles,omitempty" protobuf:"bytes,1,opt,name=volumeHandles"` + + // GroupSnapshotHandles specifies the CSI "group_snapshot_id" of a pre-existing + // group snapshot and a list of CSI "snapshot_id" of pre-existing snapshots + // on the underlying storage system for which a Kubernetes object + // representation was (or should be) created. + // This field is immutable. + // +optional + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="groupSnapshotHandles is immutable" + GroupSnapshotHandles *GroupSnapshotHandles `json:"groupSnapshotHandles,omitempty" protobuf:"bytes,2,opt,name=groupSnapshotHandles"` +} + +type GroupSnapshotHandles struct { + // VolumeGroupSnapshotHandle specifies the CSI "group_snapshot_id" of a pre-existing + // group snapshot on the underlying storage system for which a Kubernetes object + // representation was (or should be) created. + // This field is immutable. + // Required. + VolumeGroupSnapshotHandle string `json:"volumeGroupSnapshotHandle" protobuf:"bytes,1,opt,name=volumeGroupSnapshotHandle"` + + // VolumeSnapshotHandles is a list of CSI "snapshot_id" of pre-existing + // snapshots on the underlying storage system for which Kubernetes objects + // representation were (or should be) created. + // This field is immutable. + // Required. + VolumeSnapshotHandles []string `json:"volumeSnapshotHandles" protobuf:"bytes,2,opt,name=volumeSnapshotHandles"` +} + +// VolumeSnapshotHandlePair defines a pair of a source volume handle and a snapshot handle +type VolumeSnapshotHandlePair struct { + // VolumeHandle is a unique id returned by the CSI driver to identify a volume + // on the storage system + // Required. + VolumeHandle string `json:"volumeHandle" protobuf:"bytes,1,opt,name=volumeHandle"` + + // SnapshotHandle is a unique id returned by the CSI driver to identify a volume + // snapshot on the storage system + // Required. + SnapshotHandle string `json:"snapshotHandle" protobuf:"bytes,2,opt,name=snapshotHandle"` +} diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta2/zz_generated.deepcopy.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta2/zz_generated.deepcopy.go new file mode 100644 index 000000000..05729d72a --- /dev/null +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta2/zz_generated.deepcopy.go @@ -0,0 +1,466 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright 2025 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 v1beta2 + +import ( + v1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumesnapshot/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 *GroupSnapshotHandles) DeepCopyInto(out *GroupSnapshotHandles) { + *out = *in + if in.VolumeSnapshotHandles != nil { + in, out := &in.VolumeSnapshotHandles, &out.VolumeSnapshotHandles + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GroupSnapshotHandles. +func (in *GroupSnapshotHandles) DeepCopy() *GroupSnapshotHandles { + if in == nil { + return nil + } + out := new(GroupSnapshotHandles) + in.DeepCopyInto(out) + return out +} + +// 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) + if in.Status != nil { + in, out := &in.Status, &out.Status + *out = new(VolumeGroupSnapshotStatus) + (*in).DeepCopyInto(*out) + } + 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 + } + } + 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) + if in.Status != nil { + in, out := &in.Status, &out.Status + *out = new(VolumeGroupSnapshotContentStatus) + (*in).DeepCopyInto(*out) + } + 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.VolumeHandles != nil { + in, out := &in.VolumeHandles, &out.VolumeHandles + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.GroupSnapshotHandles != nil { + in, out := &in.GroupSnapshotHandles, &out.GroupSnapshotHandles + *out = new(GroupSnapshotHandles) + (*in).DeepCopyInto(*out) + } + 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 = (*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(v1.VolumeSnapshotError) + (*in).DeepCopyInto(*out) + } + if in.VolumeSnapshotInfoList != nil { + in, out := &in.VolumeSnapshotInfoList, &out.VolumeSnapshotInfoList + *out = make([]VolumeSnapshotInfo, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + 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 *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 *VolumeGroupSnapshotSource) DeepCopyInto(out *VolumeGroupSnapshotSource) { + *out = *in + 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) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeGroupSnapshotSource. +func (in *VolumeGroupSnapshotSource) DeepCopy() *VolumeGroupSnapshotSource { + if in == nil { + return nil + } + out := new(VolumeGroupSnapshotSource) + in.DeepCopyInto(out) + return out +} + +// 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 + in.Source.DeepCopyInto(&out.Source) + 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(v1.VolumeSnapshotError) + (*in).DeepCopyInto(*out) + } + 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 +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VolumeSnapshotHandlePair) DeepCopyInto(out *VolumeSnapshotHandlePair) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeSnapshotHandlePair. +func (in *VolumeSnapshotHandlePair) DeepCopy() *VolumeSnapshotHandlePair { + if in == nil { + return nil + } + out := new(VolumeSnapshotHandlePair) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VolumeSnapshotInfo) DeepCopyInto(out *VolumeSnapshotInfo) { + *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.RestoreSize != nil { + in, out := &in.RestoreSize, &out.RestoreSize + *out = new(int64) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeSnapshotInfo. +func (in *VolumeSnapshotInfo) DeepCopy() *VolumeSnapshotInfo { + if in == nil { + return nil + } + out := new(VolumeSnapshotInfo) + in.DeepCopyInto(out) + return out +} diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumesnapshot/v1/zz_generated.deepcopy.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumesnapshot/v1/zz_generated.deepcopy.go index a590aef06..d4f75a9e0 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumesnapshot/v1/zz_generated.deepcopy.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumesnapshot/v1/zz_generated.deepcopy.go @@ -2,7 +2,7 @@ // +build !ignore_autogenerated /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/clientset.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/clientset.go index 050de3b87..9a165783e 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/clientset.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/clientset.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. @@ -23,6 +23,7 @@ import ( "net/http" groupsnapshotv1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1" + groupsnapshotv1beta2 "github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta2" snapshotv1 "github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumesnapshot/v1" discovery "k8s.io/client-go/discovery" rest "k8s.io/client-go/rest" @@ -32,6 +33,7 @@ import ( type Interface interface { Discovery() discovery.DiscoveryInterface GroupsnapshotV1beta1() groupsnapshotv1beta1.GroupsnapshotV1beta1Interface + GroupsnapshotV1beta2() groupsnapshotv1beta2.GroupsnapshotV1beta2Interface SnapshotV1() snapshotv1.SnapshotV1Interface } @@ -39,6 +41,7 @@ type Interface interface { type Clientset struct { *discovery.DiscoveryClient groupsnapshotV1beta1 *groupsnapshotv1beta1.GroupsnapshotV1beta1Client + groupsnapshotV1beta2 *groupsnapshotv1beta2.GroupsnapshotV1beta2Client snapshotV1 *snapshotv1.SnapshotV1Client } @@ -47,6 +50,11 @@ func (c *Clientset) GroupsnapshotV1beta1() groupsnapshotv1beta1.GroupsnapshotV1b return c.groupsnapshotV1beta1 } +// GroupsnapshotV1beta2 retrieves the GroupsnapshotV1beta2Client +func (c *Clientset) GroupsnapshotV1beta2() groupsnapshotv1beta2.GroupsnapshotV1beta2Interface { + return c.groupsnapshotV1beta2 +} + // SnapshotV1 retrieves the SnapshotV1Client func (c *Clientset) SnapshotV1() snapshotv1.SnapshotV1Interface { return c.snapshotV1 @@ -100,6 +108,10 @@ func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset, if err != nil { return nil, err } + cs.groupsnapshotV1beta2, err = groupsnapshotv1beta2.NewForConfigAndClient(&configShallowCopy, httpClient) + if err != nil { + return nil, err + } cs.snapshotV1, err = snapshotv1.NewForConfigAndClient(&configShallowCopy, httpClient) if err != nil { return nil, err @@ -126,6 +138,7 @@ func NewForConfigOrDie(c *rest.Config) *Clientset { func New(c rest.Interface) *Clientset { var cs Clientset cs.groupsnapshotV1beta1 = groupsnapshotv1beta1.New(c) + cs.groupsnapshotV1beta2 = groupsnapshotv1beta2.New(c) cs.snapshotV1 = snapshotv1.New(c) cs.DiscoveryClient = discovery.NewDiscoveryClient(c) diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/fake/clientset_generated.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/fake/clientset_generated.go index 637c89f34..600753ecb 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/fake/clientset_generated.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/fake/clientset_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. @@ -22,6 +22,8 @@ import ( clientset "github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned" groupsnapshotv1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1" fakegroupsnapshotv1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake" + groupsnapshotv1beta2 "github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta2" + fakegroupsnapshotv1beta2 "github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta2/fake" snapshotv1 "github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumesnapshot/v1" fakesnapshotv1 "github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumesnapshot/v1/fake" "k8s.io/apimachinery/pkg/runtime" @@ -86,6 +88,11 @@ func (c *Clientset) GroupsnapshotV1beta1() groupsnapshotv1beta1.GroupsnapshotV1b return &fakegroupsnapshotv1beta1.FakeGroupsnapshotV1beta1{Fake: &c.Fake} } +// GroupsnapshotV1beta2 retrieves the GroupsnapshotV1beta2Client +func (c *Clientset) GroupsnapshotV1beta2() groupsnapshotv1beta2.GroupsnapshotV1beta2Interface { + return &fakegroupsnapshotv1beta2.FakeGroupsnapshotV1beta2{Fake: &c.Fake} +} + // SnapshotV1 retrieves the SnapshotV1Client func (c *Clientset) SnapshotV1() snapshotv1.SnapshotV1Interface { return &fakesnapshotv1.FakeSnapshotV1{Fake: &c.Fake} diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/fake/doc.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/fake/doc.go index c8342d4bd..ac8c1ec9e 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/fake/doc.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/fake/register.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/fake/register.go index c1e1e26d0..7f508b6e5 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/fake/register.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/fake/register.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. @@ -20,6 +20,7 @@ package fake import ( groupsnapshotv1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta1" + groupsnapshotv1beta2 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta2" snapshotv1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumesnapshot/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" @@ -33,6 +34,7 @@ var codecs = serializer.NewCodecFactory(scheme) var localSchemeBuilder = runtime.SchemeBuilder{ groupsnapshotv1beta1.AddToScheme, + groupsnapshotv1beta2.AddToScheme, snapshotv1.AddToScheme, } diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/scheme/doc.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/scheme/doc.go index 0fe2de913..9e531af56 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/scheme/doc.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/scheme/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/scheme/register.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/scheme/register.go index 6f8c4fdf0..573d7bcc9 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/scheme/register.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/scheme/register.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. @@ -20,6 +20,7 @@ package scheme import ( groupsnapshotv1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta1" + groupsnapshotv1beta2 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta2" snapshotv1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumesnapshot/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" @@ -33,6 +34,7 @@ var Codecs = serializer.NewCodecFactory(Scheme) var ParameterCodec = runtime.NewParameterCodec(Scheme) var localSchemeBuilder = runtime.SchemeBuilder{ groupsnapshotv1beta1.AddToScheme, + groupsnapshotv1beta2.AddToScheme, snapshotv1.AddToScheme, } diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/doc.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/doc.go index c70a3f531..5d50e29f7 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/doc.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/doc.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/doc.go index d9bd9db27..18420d452 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/doc.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/fake_volumegroupsnapshot.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/fake_volumegroupsnapshot.go index 9cb98c4ae..b108fc575 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/fake_volumegroupsnapshot.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/fake_volumegroupsnapshot.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/fake_volumegroupsnapshot_client.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/fake_volumegroupsnapshot_client.go index 47ce2cb4f..17f1e7c3b 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/fake_volumegroupsnapshot_client.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/fake_volumegroupsnapshot_client.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/fake_volumegroupsnapshotclass.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/fake_volumegroupsnapshotclass.go index 1ca15d7e0..9ae7856f2 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/fake_volumegroupsnapshotclass.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/fake_volumegroupsnapshotclass.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/fake_volumegroupsnapshotcontent.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/fake_volumegroupsnapshotcontent.go index 738f0cd4b..50cd79f37 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/fake_volumegroupsnapshotcontent.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/fake_volumegroupsnapshotcontent.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/generated_expansion.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/generated_expansion.go index 10f62712e..e1de72e99 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/generated_expansion.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/volumegroupsnapshot.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/volumegroupsnapshot.go index 8687a330f..c5ab020b3 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/volumegroupsnapshot.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/volumegroupsnapshot.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/volumegroupsnapshot_client.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/volumegroupsnapshot_client.go index 49ecc7cf5..ddd9505ea 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/volumegroupsnapshot_client.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/volumegroupsnapshot_client.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/volumegroupsnapshotclass.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/volumegroupsnapshotclass.go index 642cedd70..a76945851 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/volumegroupsnapshotclass.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/volumegroupsnapshotclass.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/volumegroupsnapshotcontent.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/volumegroupsnapshotcontent.go index eafada589..77de5fe20 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/volumegroupsnapshotcontent.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/volumegroupsnapshotcontent.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta2/doc.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta2/doc.go new file mode 100644 index 000000000..705324605 --- /dev/null +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta2/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 2025 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 client-gen. DO NOT EDIT. + +// This package has the automatically generated typed clients. +package v1beta2 diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta2/fake/doc.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta2/fake/doc.go new file mode 100644 index 000000000..18420d452 --- /dev/null +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta2/fake/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 2025 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 client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta2/fake/fake_volumegroupsnapshot.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta2/fake/fake_volumegroupsnapshot.go new file mode 100644 index 000000000..b831eb560 --- /dev/null +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta2/fake/fake_volumegroupsnapshot.go @@ -0,0 +1,141 @@ +/* +Copyright 2025 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + v1beta2 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta2" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + testing "k8s.io/client-go/testing" +) + +// FakeVolumeGroupSnapshots implements VolumeGroupSnapshotInterface +type FakeVolumeGroupSnapshots struct { + Fake *FakeGroupsnapshotV1beta2 + ns string +} + +var volumegroupsnapshotsResource = v1beta2.SchemeGroupVersion.WithResource("volumegroupsnapshots") + +var volumegroupsnapshotsKind = v1beta2.SchemeGroupVersion.WithKind("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 *v1beta2.VolumeGroupSnapshot, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(volumegroupsnapshotsResource, c.ns, name), &v1beta2.VolumeGroupSnapshot{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta2.VolumeGroupSnapshot), err +} + +// List takes label and field selectors, and returns the list of VolumeGroupSnapshots that match those selectors. +func (c *FakeVolumeGroupSnapshots) List(ctx context.Context, opts v1.ListOptions) (result *v1beta2.VolumeGroupSnapshotList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(volumegroupsnapshotsResource, volumegroupsnapshotsKind, c.ns, opts), &v1beta2.VolumeGroupSnapshotList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1beta2.VolumeGroupSnapshotList{ListMeta: obj.(*v1beta2.VolumeGroupSnapshotList).ListMeta} + for _, item := range obj.(*v1beta2.VolumeGroupSnapshotList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested volumeGroupSnapshots. +func (c *FakeVolumeGroupSnapshots) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(volumegroupsnapshotsResource, c.ns, opts)) + +} + +// Create takes the representation of a volumeGroupSnapshot and creates it. Returns the server's representation of the volumeGroupSnapshot, and an error, if there is any. +func (c *FakeVolumeGroupSnapshots) Create(ctx context.Context, volumeGroupSnapshot *v1beta2.VolumeGroupSnapshot, opts v1.CreateOptions) (result *v1beta2.VolumeGroupSnapshot, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(volumegroupsnapshotsResource, c.ns, volumeGroupSnapshot), &v1beta2.VolumeGroupSnapshot{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta2.VolumeGroupSnapshot), err +} + +// Update takes the representation of a volumeGroupSnapshot and updates it. Returns the server's representation of the volumeGroupSnapshot, and an error, if there is any. +func (c *FakeVolumeGroupSnapshots) Update(ctx context.Context, volumeGroupSnapshot *v1beta2.VolumeGroupSnapshot, opts v1.UpdateOptions) (result *v1beta2.VolumeGroupSnapshot, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(volumegroupsnapshotsResource, c.ns, volumeGroupSnapshot), &v1beta2.VolumeGroupSnapshot{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta2.VolumeGroupSnapshot), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeVolumeGroupSnapshots) UpdateStatus(ctx context.Context, volumeGroupSnapshot *v1beta2.VolumeGroupSnapshot, opts v1.UpdateOptions) (*v1beta2.VolumeGroupSnapshot, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(volumegroupsnapshotsResource, "status", c.ns, volumeGroupSnapshot), &v1beta2.VolumeGroupSnapshot{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta2.VolumeGroupSnapshot), err +} + +// Delete takes name of the volumeGroupSnapshot and deletes it. Returns an error if one occurs. +func (c *FakeVolumeGroupSnapshots) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(volumegroupsnapshotsResource, c.ns, name, opts), &v1beta2.VolumeGroupSnapshot{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeVolumeGroupSnapshots) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(volumegroupsnapshotsResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1beta2.VolumeGroupSnapshotList{}) + return err +} + +// Patch applies the patch and returns the patched volumeGroupSnapshot. +func (c *FakeVolumeGroupSnapshots) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta2.VolumeGroupSnapshot, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(volumegroupsnapshotsResource, c.ns, name, pt, data, subresources...), &v1beta2.VolumeGroupSnapshot{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta2.VolumeGroupSnapshot), err +} diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta2/fake/fake_volumegroupsnapshot_client.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta2/fake/fake_volumegroupsnapshot_client.go new file mode 100644 index 000000000..a9a0fa4c3 --- /dev/null +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta2/fake/fake_volumegroupsnapshot_client.go @@ -0,0 +1,48 @@ +/* +Copyright 2025 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 client-gen. DO NOT EDIT. + +package fake + +import ( + v1beta2 "github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta2" + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakeGroupsnapshotV1beta2 struct { + *testing.Fake +} + +func (c *FakeGroupsnapshotV1beta2) VolumeGroupSnapshots(namespace string) v1beta2.VolumeGroupSnapshotInterface { + return &FakeVolumeGroupSnapshots{c, namespace} +} + +func (c *FakeGroupsnapshotV1beta2) VolumeGroupSnapshotClasses() v1beta2.VolumeGroupSnapshotClassInterface { + return &FakeVolumeGroupSnapshotClasses{c} +} + +func (c *FakeGroupsnapshotV1beta2) VolumeGroupSnapshotContents() v1beta2.VolumeGroupSnapshotContentInterface { + return &FakeVolumeGroupSnapshotContents{c} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeGroupsnapshotV1beta2) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta2/fake/fake_volumegroupsnapshotclass.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta2/fake/fake_volumegroupsnapshotclass.go new file mode 100644 index 000000000..499575d42 --- /dev/null +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta2/fake/fake_volumegroupsnapshotclass.go @@ -0,0 +1,121 @@ +/* +Copyright 2025 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + v1beta2 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta2" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + testing "k8s.io/client-go/testing" +) + +// FakeVolumeGroupSnapshotClasses implements VolumeGroupSnapshotClassInterface +type FakeVolumeGroupSnapshotClasses struct { + Fake *FakeGroupsnapshotV1beta2 +} + +var volumegroupsnapshotclassesResource = v1beta2.SchemeGroupVersion.WithResource("volumegroupsnapshotclasses") + +var volumegroupsnapshotclassesKind = v1beta2.SchemeGroupVersion.WithKind("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 *v1beta2.VolumeGroupSnapshotClass, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(volumegroupsnapshotclassesResource, name), &v1beta2.VolumeGroupSnapshotClass{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta2.VolumeGroupSnapshotClass), err +} + +// List takes label and field selectors, and returns the list of VolumeGroupSnapshotClasses that match those selectors. +func (c *FakeVolumeGroupSnapshotClasses) List(ctx context.Context, opts v1.ListOptions) (result *v1beta2.VolumeGroupSnapshotClassList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(volumegroupsnapshotclassesResource, volumegroupsnapshotclassesKind, opts), &v1beta2.VolumeGroupSnapshotClassList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1beta2.VolumeGroupSnapshotClassList{ListMeta: obj.(*v1beta2.VolumeGroupSnapshotClassList).ListMeta} + for _, item := range obj.(*v1beta2.VolumeGroupSnapshotClassList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested volumeGroupSnapshotClasses. +func (c *FakeVolumeGroupSnapshotClasses) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(volumegroupsnapshotclassesResource, opts)) +} + +// Create takes the representation of a volumeGroupSnapshotClass and creates it. Returns the server's representation of the volumeGroupSnapshotClass, and an error, if there is any. +func (c *FakeVolumeGroupSnapshotClasses) Create(ctx context.Context, volumeGroupSnapshotClass *v1beta2.VolumeGroupSnapshotClass, opts v1.CreateOptions) (result *v1beta2.VolumeGroupSnapshotClass, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(volumegroupsnapshotclassesResource, volumeGroupSnapshotClass), &v1beta2.VolumeGroupSnapshotClass{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta2.VolumeGroupSnapshotClass), err +} + +// Update takes the representation of a volumeGroupSnapshotClass and updates it. Returns the server's representation of the volumeGroupSnapshotClass, and an error, if there is any. +func (c *FakeVolumeGroupSnapshotClasses) Update(ctx context.Context, volumeGroupSnapshotClass *v1beta2.VolumeGroupSnapshotClass, opts v1.UpdateOptions) (result *v1beta2.VolumeGroupSnapshotClass, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(volumegroupsnapshotclassesResource, volumeGroupSnapshotClass), &v1beta2.VolumeGroupSnapshotClass{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta2.VolumeGroupSnapshotClass), err +} + +// Delete takes name of the volumeGroupSnapshotClass and deletes it. Returns an error if one occurs. +func (c *FakeVolumeGroupSnapshotClasses) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteActionWithOptions(volumegroupsnapshotclassesResource, name, opts), &v1beta2.VolumeGroupSnapshotClass{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeVolumeGroupSnapshotClasses) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(volumegroupsnapshotclassesResource, listOpts) + + _, err := c.Fake.Invokes(action, &v1beta2.VolumeGroupSnapshotClassList{}) + return err +} + +// Patch applies the patch and returns the patched volumeGroupSnapshotClass. +func (c *FakeVolumeGroupSnapshotClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta2.VolumeGroupSnapshotClass, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(volumegroupsnapshotclassesResource, name, pt, data, subresources...), &v1beta2.VolumeGroupSnapshotClass{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta2.VolumeGroupSnapshotClass), err +} diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta2/fake/fake_volumegroupsnapshotcontent.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta2/fake/fake_volumegroupsnapshotcontent.go new file mode 100644 index 000000000..26e1fb533 --- /dev/null +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta2/fake/fake_volumegroupsnapshotcontent.go @@ -0,0 +1,132 @@ +/* +Copyright 2025 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + v1beta2 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta2" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + testing "k8s.io/client-go/testing" +) + +// FakeVolumeGroupSnapshotContents implements VolumeGroupSnapshotContentInterface +type FakeVolumeGroupSnapshotContents struct { + Fake *FakeGroupsnapshotV1beta2 +} + +var volumegroupsnapshotcontentsResource = v1beta2.SchemeGroupVersion.WithResource("volumegroupsnapshotcontents") + +var volumegroupsnapshotcontentsKind = v1beta2.SchemeGroupVersion.WithKind("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 *v1beta2.VolumeGroupSnapshotContent, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(volumegroupsnapshotcontentsResource, name), &v1beta2.VolumeGroupSnapshotContent{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta2.VolumeGroupSnapshotContent), err +} + +// List takes label and field selectors, and returns the list of VolumeGroupSnapshotContents that match those selectors. +func (c *FakeVolumeGroupSnapshotContents) List(ctx context.Context, opts v1.ListOptions) (result *v1beta2.VolumeGroupSnapshotContentList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(volumegroupsnapshotcontentsResource, volumegroupsnapshotcontentsKind, opts), &v1beta2.VolumeGroupSnapshotContentList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1beta2.VolumeGroupSnapshotContentList{ListMeta: obj.(*v1beta2.VolumeGroupSnapshotContentList).ListMeta} + for _, item := range obj.(*v1beta2.VolumeGroupSnapshotContentList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested volumeGroupSnapshotContents. +func (c *FakeVolumeGroupSnapshotContents) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(volumegroupsnapshotcontentsResource, opts)) +} + +// Create takes the representation of a volumeGroupSnapshotContent and creates it. Returns the server's representation of the volumeGroupSnapshotContent, and an error, if there is any. +func (c *FakeVolumeGroupSnapshotContents) Create(ctx context.Context, volumeGroupSnapshotContent *v1beta2.VolumeGroupSnapshotContent, opts v1.CreateOptions) (result *v1beta2.VolumeGroupSnapshotContent, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(volumegroupsnapshotcontentsResource, volumeGroupSnapshotContent), &v1beta2.VolumeGroupSnapshotContent{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta2.VolumeGroupSnapshotContent), err +} + +// Update takes the representation of a volumeGroupSnapshotContent and updates it. Returns the server's representation of the volumeGroupSnapshotContent, and an error, if there is any. +func (c *FakeVolumeGroupSnapshotContents) Update(ctx context.Context, volumeGroupSnapshotContent *v1beta2.VolumeGroupSnapshotContent, opts v1.UpdateOptions) (result *v1beta2.VolumeGroupSnapshotContent, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(volumegroupsnapshotcontentsResource, volumeGroupSnapshotContent), &v1beta2.VolumeGroupSnapshotContent{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta2.VolumeGroupSnapshotContent), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeVolumeGroupSnapshotContents) UpdateStatus(ctx context.Context, volumeGroupSnapshotContent *v1beta2.VolumeGroupSnapshotContent, opts v1.UpdateOptions) (*v1beta2.VolumeGroupSnapshotContent, error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateSubresourceAction(volumegroupsnapshotcontentsResource, "status", volumeGroupSnapshotContent), &v1beta2.VolumeGroupSnapshotContent{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta2.VolumeGroupSnapshotContent), err +} + +// Delete takes name of the volumeGroupSnapshotContent and deletes it. Returns an error if one occurs. +func (c *FakeVolumeGroupSnapshotContents) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteActionWithOptions(volumegroupsnapshotcontentsResource, name, opts), &v1beta2.VolumeGroupSnapshotContent{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeVolumeGroupSnapshotContents) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(volumegroupsnapshotcontentsResource, listOpts) + + _, err := c.Fake.Invokes(action, &v1beta2.VolumeGroupSnapshotContentList{}) + return err +} + +// Patch applies the patch and returns the patched volumeGroupSnapshotContent. +func (c *FakeVolumeGroupSnapshotContents) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta2.VolumeGroupSnapshotContent, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(volumegroupsnapshotcontentsResource, name, pt, data, subresources...), &v1beta2.VolumeGroupSnapshotContent{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta2.VolumeGroupSnapshotContent), err +} diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta2/generated_expansion.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta2/generated_expansion.go new file mode 100644 index 000000000..ed8318ed6 --- /dev/null +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta2/generated_expansion.go @@ -0,0 +1,25 @@ +/* +Copyright 2025 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 client-gen. DO NOT EDIT. + +package v1beta2 + +type VolumeGroupSnapshotExpansion interface{} + +type VolumeGroupSnapshotClassExpansion interface{} + +type VolumeGroupSnapshotContentExpansion interface{} diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta2/volumegroupsnapshot.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta2/volumegroupsnapshot.go new file mode 100644 index 000000000..a9b7a8f64 --- /dev/null +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta2/volumegroupsnapshot.go @@ -0,0 +1,195 @@ +/* +Copyright 2025 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 client-gen. DO NOT EDIT. + +package v1beta2 + +import ( + "context" + "time" + + v1beta2 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta2" + scheme "github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/scheme" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// VolumeGroupSnapshotsGetter has a method to return a VolumeGroupSnapshotInterface. +// A group's client should implement this interface. +type VolumeGroupSnapshotsGetter interface { + VolumeGroupSnapshots(namespace string) VolumeGroupSnapshotInterface +} + +// VolumeGroupSnapshotInterface has methods to work with VolumeGroupSnapshot resources. +type VolumeGroupSnapshotInterface interface { + Create(ctx context.Context, volumeGroupSnapshot *v1beta2.VolumeGroupSnapshot, opts v1.CreateOptions) (*v1beta2.VolumeGroupSnapshot, error) + Update(ctx context.Context, volumeGroupSnapshot *v1beta2.VolumeGroupSnapshot, opts v1.UpdateOptions) (*v1beta2.VolumeGroupSnapshot, error) + UpdateStatus(ctx context.Context, volumeGroupSnapshot *v1beta2.VolumeGroupSnapshot, opts v1.UpdateOptions) (*v1beta2.VolumeGroupSnapshot, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta2.VolumeGroupSnapshot, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta2.VolumeGroupSnapshotList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta2.VolumeGroupSnapshot, err error) + VolumeGroupSnapshotExpansion +} + +// volumeGroupSnapshots implements VolumeGroupSnapshotInterface +type volumeGroupSnapshots struct { + client rest.Interface + ns string +} + +// newVolumeGroupSnapshots returns a VolumeGroupSnapshots +func newVolumeGroupSnapshots(c *GroupsnapshotV1beta2Client, namespace string) *volumeGroupSnapshots { + return &volumeGroupSnapshots{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the volumeGroupSnapshot, and returns the corresponding volumeGroupSnapshot object, and an error if there is any. +func (c *volumeGroupSnapshots) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta2.VolumeGroupSnapshot, err error) { + result = &v1beta2.VolumeGroupSnapshot{} + err = c.client.Get(). + Namespace(c.ns). + Resource("volumegroupsnapshots"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of VolumeGroupSnapshots that match those selectors. +func (c *volumeGroupSnapshots) List(ctx context.Context, opts v1.ListOptions) (result *v1beta2.VolumeGroupSnapshotList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1beta2.VolumeGroupSnapshotList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("volumegroupsnapshots"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested volumeGroupSnapshots. +func (c *volumeGroupSnapshots) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("volumegroupsnapshots"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a volumeGroupSnapshot and creates it. Returns the server's representation of the volumeGroupSnapshot, and an error, if there is any. +func (c *volumeGroupSnapshots) Create(ctx context.Context, volumeGroupSnapshot *v1beta2.VolumeGroupSnapshot, opts v1.CreateOptions) (result *v1beta2.VolumeGroupSnapshot, err error) { + result = &v1beta2.VolumeGroupSnapshot{} + err = c.client.Post(). + Namespace(c.ns). + Resource("volumegroupsnapshots"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(volumeGroupSnapshot). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a volumeGroupSnapshot and updates it. Returns the server's representation of the volumeGroupSnapshot, and an error, if there is any. +func (c *volumeGroupSnapshots) Update(ctx context.Context, volumeGroupSnapshot *v1beta2.VolumeGroupSnapshot, opts v1.UpdateOptions) (result *v1beta2.VolumeGroupSnapshot, err error) { + result = &v1beta2.VolumeGroupSnapshot{} + err = c.client.Put(). + Namespace(c.ns). + Resource("volumegroupsnapshots"). + Name(volumeGroupSnapshot.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(volumeGroupSnapshot). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *volumeGroupSnapshots) UpdateStatus(ctx context.Context, volumeGroupSnapshot *v1beta2.VolumeGroupSnapshot, opts v1.UpdateOptions) (result *v1beta2.VolumeGroupSnapshot, err error) { + result = &v1beta2.VolumeGroupSnapshot{} + err = c.client.Put(). + Namespace(c.ns). + Resource("volumegroupsnapshots"). + Name(volumeGroupSnapshot.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(volumeGroupSnapshot). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the volumeGroupSnapshot and deletes it. Returns an error if one occurs. +func (c *volumeGroupSnapshots) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("volumegroupsnapshots"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *volumeGroupSnapshots) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("volumegroupsnapshots"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched volumeGroupSnapshot. +func (c *volumeGroupSnapshots) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta2.VolumeGroupSnapshot, err error) { + result = &v1beta2.VolumeGroupSnapshot{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("volumegroupsnapshots"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta2/volumegroupsnapshot_client.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta2/volumegroupsnapshot_client.go new file mode 100644 index 000000000..500229c0f --- /dev/null +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta2/volumegroupsnapshot_client.go @@ -0,0 +1,117 @@ +/* +Copyright 2025 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 client-gen. DO NOT EDIT. + +package v1beta2 + +import ( + "net/http" + + v1beta2 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta2" + "github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/scheme" + rest "k8s.io/client-go/rest" +) + +type GroupsnapshotV1beta2Interface interface { + RESTClient() rest.Interface + VolumeGroupSnapshotsGetter + VolumeGroupSnapshotClassesGetter + VolumeGroupSnapshotContentsGetter +} + +// GroupsnapshotV1beta2Client is used to interact with features provided by the groupsnapshot.storage.k8s.io group. +type GroupsnapshotV1beta2Client struct { + restClient rest.Interface +} + +func (c *GroupsnapshotV1beta2Client) VolumeGroupSnapshots(namespace string) VolumeGroupSnapshotInterface { + return newVolumeGroupSnapshots(c, namespace) +} + +func (c *GroupsnapshotV1beta2Client) VolumeGroupSnapshotClasses() VolumeGroupSnapshotClassInterface { + return newVolumeGroupSnapshotClasses(c) +} + +func (c *GroupsnapshotV1beta2Client) VolumeGroupSnapshotContents() VolumeGroupSnapshotContentInterface { + return newVolumeGroupSnapshotContents(c) +} + +// NewForConfig creates a new GroupsnapshotV1beta2Client for the given config. +// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), +// where httpClient was generated with rest.HTTPClientFor(c). +func NewForConfig(c *rest.Config) (*GroupsnapshotV1beta2Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + httpClient, err := rest.HTTPClientFor(&config) + if err != nil { + return nil, err + } + return NewForConfigAndClient(&config, httpClient) +} + +// NewForConfigAndClient creates a new GroupsnapshotV1beta2Client 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) (*GroupsnapshotV1beta2Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientForConfigAndClient(&config, h) + if err != nil { + return nil, err + } + return &GroupsnapshotV1beta2Client{client}, nil +} + +// NewForConfigOrDie creates a new GroupsnapshotV1beta2Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *GroupsnapshotV1beta2Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new GroupsnapshotV1beta2Client for the given RESTClient. +func New(c rest.Interface) *GroupsnapshotV1beta2Client { + return &GroupsnapshotV1beta2Client{c} +} + +func setConfigDefaults(config *rest.Config) error { + gv := v1beta2.SchemeGroupVersion + config.GroupVersion = &gv + config.APIPath = "/apis" + config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + + if config.UserAgent == "" { + config.UserAgent = rest.DefaultKubernetesUserAgent() + } + + return nil +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *GroupsnapshotV1beta2Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta2/volumegroupsnapshotclass.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta2/volumegroupsnapshotclass.go new file mode 100644 index 000000000..e03c85cfb --- /dev/null +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta2/volumegroupsnapshotclass.go @@ -0,0 +1,168 @@ +/* +Copyright 2025 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 client-gen. DO NOT EDIT. + +package v1beta2 + +import ( + "context" + "time" + + v1beta2 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta2" + scheme "github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/scheme" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// VolumeGroupSnapshotClassesGetter has a method to return a VolumeGroupSnapshotClassInterface. +// A group's client should implement this interface. +type VolumeGroupSnapshotClassesGetter interface { + VolumeGroupSnapshotClasses() VolumeGroupSnapshotClassInterface +} + +// VolumeGroupSnapshotClassInterface has methods to work with VolumeGroupSnapshotClass resources. +type VolumeGroupSnapshotClassInterface interface { + Create(ctx context.Context, volumeGroupSnapshotClass *v1beta2.VolumeGroupSnapshotClass, opts v1.CreateOptions) (*v1beta2.VolumeGroupSnapshotClass, error) + Update(ctx context.Context, volumeGroupSnapshotClass *v1beta2.VolumeGroupSnapshotClass, opts v1.UpdateOptions) (*v1beta2.VolumeGroupSnapshotClass, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta2.VolumeGroupSnapshotClass, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta2.VolumeGroupSnapshotClassList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta2.VolumeGroupSnapshotClass, err error) + VolumeGroupSnapshotClassExpansion +} + +// volumeGroupSnapshotClasses implements VolumeGroupSnapshotClassInterface +type volumeGroupSnapshotClasses struct { + client rest.Interface +} + +// newVolumeGroupSnapshotClasses returns a VolumeGroupSnapshotClasses +func newVolumeGroupSnapshotClasses(c *GroupsnapshotV1beta2Client) *volumeGroupSnapshotClasses { + return &volumeGroupSnapshotClasses{ + client: c.RESTClient(), + } +} + +// Get takes name of the volumeGroupSnapshotClass, and returns the corresponding volumeGroupSnapshotClass object, and an error if there is any. +func (c *volumeGroupSnapshotClasses) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta2.VolumeGroupSnapshotClass, err error) { + result = &v1beta2.VolumeGroupSnapshotClass{} + err = c.client.Get(). + Resource("volumegroupsnapshotclasses"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of VolumeGroupSnapshotClasses that match those selectors. +func (c *volumeGroupSnapshotClasses) List(ctx context.Context, opts v1.ListOptions) (result *v1beta2.VolumeGroupSnapshotClassList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1beta2.VolumeGroupSnapshotClassList{} + err = c.client.Get(). + Resource("volumegroupsnapshotclasses"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested volumeGroupSnapshotClasses. +func (c *volumeGroupSnapshotClasses) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("volumegroupsnapshotclasses"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a volumeGroupSnapshotClass and creates it. Returns the server's representation of the volumeGroupSnapshotClass, and an error, if there is any. +func (c *volumeGroupSnapshotClasses) Create(ctx context.Context, volumeGroupSnapshotClass *v1beta2.VolumeGroupSnapshotClass, opts v1.CreateOptions) (result *v1beta2.VolumeGroupSnapshotClass, err error) { + result = &v1beta2.VolumeGroupSnapshotClass{} + err = c.client.Post(). + Resource("volumegroupsnapshotclasses"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(volumeGroupSnapshotClass). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a volumeGroupSnapshotClass and updates it. Returns the server's representation of the volumeGroupSnapshotClass, and an error, if there is any. +func (c *volumeGroupSnapshotClasses) Update(ctx context.Context, volumeGroupSnapshotClass *v1beta2.VolumeGroupSnapshotClass, opts v1.UpdateOptions) (result *v1beta2.VolumeGroupSnapshotClass, err error) { + result = &v1beta2.VolumeGroupSnapshotClass{} + err = c.client.Put(). + Resource("volumegroupsnapshotclasses"). + Name(volumeGroupSnapshotClass.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(volumeGroupSnapshotClass). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the volumeGroupSnapshotClass and deletes it. Returns an error if one occurs. +func (c *volumeGroupSnapshotClasses) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Resource("volumegroupsnapshotclasses"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *volumeGroupSnapshotClasses) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("volumegroupsnapshotclasses"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched volumeGroupSnapshotClass. +func (c *volumeGroupSnapshotClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta2.VolumeGroupSnapshotClass, err error) { + result = &v1beta2.VolumeGroupSnapshotClass{} + err = c.client.Patch(pt). + Resource("volumegroupsnapshotclasses"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta2/volumegroupsnapshotcontent.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta2/volumegroupsnapshotcontent.go new file mode 100644 index 000000000..3168991fc --- /dev/null +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta2/volumegroupsnapshotcontent.go @@ -0,0 +1,184 @@ +/* +Copyright 2025 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 client-gen. DO NOT EDIT. + +package v1beta2 + +import ( + "context" + "time" + + v1beta2 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta2" + scheme "github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/scheme" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// VolumeGroupSnapshotContentsGetter has a method to return a VolumeGroupSnapshotContentInterface. +// A group's client should implement this interface. +type VolumeGroupSnapshotContentsGetter interface { + VolumeGroupSnapshotContents() VolumeGroupSnapshotContentInterface +} + +// VolumeGroupSnapshotContentInterface has methods to work with VolumeGroupSnapshotContent resources. +type VolumeGroupSnapshotContentInterface interface { + Create(ctx context.Context, volumeGroupSnapshotContent *v1beta2.VolumeGroupSnapshotContent, opts v1.CreateOptions) (*v1beta2.VolumeGroupSnapshotContent, error) + Update(ctx context.Context, volumeGroupSnapshotContent *v1beta2.VolumeGroupSnapshotContent, opts v1.UpdateOptions) (*v1beta2.VolumeGroupSnapshotContent, error) + UpdateStatus(ctx context.Context, volumeGroupSnapshotContent *v1beta2.VolumeGroupSnapshotContent, opts v1.UpdateOptions) (*v1beta2.VolumeGroupSnapshotContent, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta2.VolumeGroupSnapshotContent, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta2.VolumeGroupSnapshotContentList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta2.VolumeGroupSnapshotContent, err error) + VolumeGroupSnapshotContentExpansion +} + +// volumeGroupSnapshotContents implements VolumeGroupSnapshotContentInterface +type volumeGroupSnapshotContents struct { + client rest.Interface +} + +// newVolumeGroupSnapshotContents returns a VolumeGroupSnapshotContents +func newVolumeGroupSnapshotContents(c *GroupsnapshotV1beta2Client) *volumeGroupSnapshotContents { + return &volumeGroupSnapshotContents{ + client: c.RESTClient(), + } +} + +// Get takes name of the volumeGroupSnapshotContent, and returns the corresponding volumeGroupSnapshotContent object, and an error if there is any. +func (c *volumeGroupSnapshotContents) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta2.VolumeGroupSnapshotContent, err error) { + result = &v1beta2.VolumeGroupSnapshotContent{} + err = c.client.Get(). + Resource("volumegroupsnapshotcontents"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of VolumeGroupSnapshotContents that match those selectors. +func (c *volumeGroupSnapshotContents) List(ctx context.Context, opts v1.ListOptions) (result *v1beta2.VolumeGroupSnapshotContentList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1beta2.VolumeGroupSnapshotContentList{} + err = c.client.Get(). + Resource("volumegroupsnapshotcontents"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested volumeGroupSnapshotContents. +func (c *volumeGroupSnapshotContents) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("volumegroupsnapshotcontents"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a volumeGroupSnapshotContent and creates it. Returns the server's representation of the volumeGroupSnapshotContent, and an error, if there is any. +func (c *volumeGroupSnapshotContents) Create(ctx context.Context, volumeGroupSnapshotContent *v1beta2.VolumeGroupSnapshotContent, opts v1.CreateOptions) (result *v1beta2.VolumeGroupSnapshotContent, err error) { + result = &v1beta2.VolumeGroupSnapshotContent{} + err = c.client.Post(). + Resource("volumegroupsnapshotcontents"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(volumeGroupSnapshotContent). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a volumeGroupSnapshotContent and updates it. Returns the server's representation of the volumeGroupSnapshotContent, and an error, if there is any. +func (c *volumeGroupSnapshotContents) Update(ctx context.Context, volumeGroupSnapshotContent *v1beta2.VolumeGroupSnapshotContent, opts v1.UpdateOptions) (result *v1beta2.VolumeGroupSnapshotContent, err error) { + result = &v1beta2.VolumeGroupSnapshotContent{} + err = c.client.Put(). + Resource("volumegroupsnapshotcontents"). + Name(volumeGroupSnapshotContent.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(volumeGroupSnapshotContent). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *volumeGroupSnapshotContents) UpdateStatus(ctx context.Context, volumeGroupSnapshotContent *v1beta2.VolumeGroupSnapshotContent, opts v1.UpdateOptions) (result *v1beta2.VolumeGroupSnapshotContent, err error) { + result = &v1beta2.VolumeGroupSnapshotContent{} + err = c.client.Put(). + Resource("volumegroupsnapshotcontents"). + Name(volumeGroupSnapshotContent.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(volumeGroupSnapshotContent). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the volumeGroupSnapshotContent and deletes it. Returns an error if one occurs. +func (c *volumeGroupSnapshotContents) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Resource("volumegroupsnapshotcontents"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *volumeGroupSnapshotContents) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("volumegroupsnapshotcontents"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched volumeGroupSnapshotContent. +func (c *volumeGroupSnapshotContents) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta2.VolumeGroupSnapshotContent, err error) { + result = &v1beta2.VolumeGroupSnapshotContent{} + err = c.client.Patch(pt). + Resource("volumegroupsnapshotcontents"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumesnapshot/v1/doc.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumesnapshot/v1/doc.go index 03b25c753..a49aac718 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumesnapshot/v1/doc.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumesnapshot/v1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumesnapshot/v1/fake/doc.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumesnapshot/v1/fake/doc.go index d9bd9db27..18420d452 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumesnapshot/v1/fake/doc.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumesnapshot/v1/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumesnapshot/v1/fake/fake_volumesnapshot.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumesnapshot/v1/fake/fake_volumesnapshot.go index ddf1a0121..bd3fcb9b8 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumesnapshot/v1/fake/fake_volumesnapshot.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumesnapshot/v1/fake/fake_volumesnapshot.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumesnapshot/v1/fake/fake_volumesnapshot_client.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumesnapshot/v1/fake/fake_volumesnapshot_client.go index 3877e4158..efc45f429 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumesnapshot/v1/fake/fake_volumesnapshot_client.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumesnapshot/v1/fake/fake_volumesnapshot_client.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumesnapshot/v1/fake/fake_volumesnapshotclass.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumesnapshot/v1/fake/fake_volumesnapshotclass.go index 5d198af9f..613929cbb 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumesnapshot/v1/fake/fake_volumesnapshotclass.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumesnapshot/v1/fake/fake_volumesnapshotclass.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumesnapshot/v1/fake/fake_volumesnapshotcontent.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumesnapshot/v1/fake/fake_volumesnapshotcontent.go index 229e3387e..0f001d777 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumesnapshot/v1/fake/fake_volumesnapshotcontent.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumesnapshot/v1/fake/fake_volumesnapshotcontent.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumesnapshot/v1/generated_expansion.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumesnapshot/v1/generated_expansion.go index c52fe570e..731776689 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumesnapshot/v1/generated_expansion.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumesnapshot/v1/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumesnapshot/v1/volumesnapshot.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumesnapshot/v1/volumesnapshot.go index c99b49175..53fdff362 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumesnapshot/v1/volumesnapshot.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumesnapshot/v1/volumesnapshot.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumesnapshot/v1/volumesnapshot_client.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumesnapshot/v1/volumesnapshot_client.go index 877208fd6..34cfc808c 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumesnapshot/v1/volumesnapshot_client.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumesnapshot/v1/volumesnapshot_client.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumesnapshot/v1/volumesnapshotclass.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumesnapshot/v1/volumesnapshotclass.go index 5fa38735a..9f46bc5bc 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumesnapshot/v1/volumesnapshotclass.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumesnapshot/v1/volumesnapshotclass.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumesnapshot/v1/volumesnapshotcontent.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumesnapshot/v1/volumesnapshotcontent.go index d425cb3db..1fff1f232 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumesnapshot/v1/volumesnapshotcontent.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumesnapshot/v1/volumesnapshotcontent.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/factory.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/factory.go index b2b0ef72f..d13af4687 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/factory.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/factory.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/generic.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/generic.go index 3f4fb8ee5..2fb01475c 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/generic.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/generic.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. @@ -22,6 +22,7 @@ import ( "fmt" v1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta1" + v1beta2 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta2" v1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumesnapshot/v1" schema "k8s.io/apimachinery/pkg/runtime/schema" cache "k8s.io/client-go/tools/cache" @@ -61,6 +62,14 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource case v1beta1.SchemeGroupVersion.WithResource("volumegroupsnapshotcontents"): return &genericInformer{resource: resource.GroupResource(), informer: f.Groupsnapshot().V1beta1().VolumeGroupSnapshotContents().Informer()}, nil + // Group=groupsnapshot.storage.k8s.io, Version=v1beta2 + case v1beta2.SchemeGroupVersion.WithResource("volumegroupsnapshots"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Groupsnapshot().V1beta2().VolumeGroupSnapshots().Informer()}, nil + case v1beta2.SchemeGroupVersion.WithResource("volumegroupsnapshotclasses"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Groupsnapshot().V1beta2().VolumeGroupSnapshotClasses().Informer()}, nil + case v1beta2.SchemeGroupVersion.WithResource("volumegroupsnapshotcontents"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Groupsnapshot().V1beta2().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 diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/internalinterfaces/factory_interfaces.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/internalinterfaces/factory_interfaces.go index 50c56e95e..43f74471b 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/internalinterfaces/factory_interfaces.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/internalinterfaces/factory_interfaces.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumegroupsnapshot/interface.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumegroupsnapshot/interface.go index e75bc2edf..fdd82f6cf 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumegroupsnapshot/interface.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumegroupsnapshot/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. @@ -21,12 +21,15 @@ package volumegroupsnapshot import ( internalinterfaces "github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/internalinterfaces" v1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumegroupsnapshot/v1beta1" + v1beta2 "github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumegroupsnapshot/v1beta2" ) // Interface provides access to each of this group's versions. type Interface interface { // V1beta1 provides access to shared informers for resources in V1beta1. V1beta1() v1beta1.Interface + // V1beta2 provides access to shared informers for resources in V1beta2. + V1beta2() v1beta2.Interface } type group struct { @@ -44,3 +47,8 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList func (g *group) V1beta1() v1beta1.Interface { return v1beta1.New(g.factory, g.namespace, g.tweakListOptions) } + +// V1beta2 returns a new v1beta2.Interface. +func (g *group) V1beta2() v1beta2.Interface { + return v1beta2.New(g.factory, g.namespace, g.tweakListOptions) +} diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumegroupsnapshot/v1beta1/interface.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumegroupsnapshot/v1beta1/interface.go index 3bcbe139f..cc45f04fb 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumegroupsnapshot/v1beta1/interface.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumegroupsnapshot/v1beta1/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumegroupsnapshot/v1beta1/volumegroupsnapshot.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumegroupsnapshot/v1beta1/volumegroupsnapshot.go index 25343f6c1..1fb1c99b1 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumegroupsnapshot/v1beta1/volumegroupsnapshot.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumegroupsnapshot/v1beta1/volumegroupsnapshot.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumegroupsnapshot/v1beta1/volumegroupsnapshotclass.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumegroupsnapshot/v1beta1/volumegroupsnapshotclass.go index c3fa376ec..9a0d6fcff 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumegroupsnapshot/v1beta1/volumegroupsnapshotclass.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumegroupsnapshot/v1beta1/volumegroupsnapshotclass.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumegroupsnapshot/v1beta1/volumegroupsnapshotcontent.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumegroupsnapshot/v1beta1/volumegroupsnapshotcontent.go index 8d15f85cc..ed62e8c4e 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumegroupsnapshot/v1beta1/volumegroupsnapshotcontent.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumegroupsnapshot/v1beta1/volumegroupsnapshotcontent.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumegroupsnapshot/v1beta2/interface.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumegroupsnapshot/v1beta2/interface.go new file mode 100644 index 000000000..67419a8e3 --- /dev/null +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumegroupsnapshot/v1beta2/interface.go @@ -0,0 +1,59 @@ +/* +Copyright 2025 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 informer-gen. DO NOT EDIT. + +package v1beta2 + +import ( + internalinterfaces "github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/internalinterfaces" +) + +// Interface provides access to all the informers in this group version. +type Interface interface { + // VolumeGroupSnapshots returns a VolumeGroupSnapshotInformer. + VolumeGroupSnapshots() VolumeGroupSnapshotInformer + // VolumeGroupSnapshotClasses returns a VolumeGroupSnapshotClassInformer. + VolumeGroupSnapshotClasses() VolumeGroupSnapshotClassInformer + // VolumeGroupSnapshotContents returns a VolumeGroupSnapshotContentInformer. + VolumeGroupSnapshotContents() VolumeGroupSnapshotContentInformer +} + +type version struct { + factory internalinterfaces.SharedInformerFactory + namespace string + tweakListOptions internalinterfaces.TweakListOptionsFunc +} + +// New returns a new Interface. +func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { + return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} +} + +// VolumeGroupSnapshots returns a VolumeGroupSnapshotInformer. +func (v *version) VolumeGroupSnapshots() VolumeGroupSnapshotInformer { + return &volumeGroupSnapshotInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} + +// VolumeGroupSnapshotClasses returns a VolumeGroupSnapshotClassInformer. +func (v *version) VolumeGroupSnapshotClasses() VolumeGroupSnapshotClassInformer { + return &volumeGroupSnapshotClassInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} +} + +// VolumeGroupSnapshotContents returns a VolumeGroupSnapshotContentInformer. +func (v *version) VolumeGroupSnapshotContents() VolumeGroupSnapshotContentInformer { + return &volumeGroupSnapshotContentInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} +} diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumegroupsnapshot/v1beta2/volumegroupsnapshot.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumegroupsnapshot/v1beta2/volumegroupsnapshot.go new file mode 100644 index 000000000..d268d6f30 --- /dev/null +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumegroupsnapshot/v1beta2/volumegroupsnapshot.go @@ -0,0 +1,90 @@ +/* +Copyright 2025 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 informer-gen. DO NOT EDIT. + +package v1beta2 + +import ( + "context" + time "time" + + volumegroupsnapshotv1beta2 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta2" + versioned "github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned" + internalinterfaces "github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/internalinterfaces" + v1beta2 "github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1beta2" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +// VolumeGroupSnapshotInformer provides access to a shared informer and lister for +// VolumeGroupSnapshots. +type VolumeGroupSnapshotInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1beta2.VolumeGroupSnapshotLister +} + +type volumeGroupSnapshotInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc + namespace string +} + +// NewVolumeGroupSnapshotInformer constructs a new informer for VolumeGroupSnapshot type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewVolumeGroupSnapshotInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredVolumeGroupSnapshotInformer(client, namespace, resyncPeriod, indexers, nil) +} + +// NewFilteredVolumeGroupSnapshotInformer constructs a new informer for VolumeGroupSnapshot type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewFilteredVolumeGroupSnapshotInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { + return cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.GroupsnapshotV1beta2().VolumeGroupSnapshots(namespace).List(context.TODO(), options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.GroupsnapshotV1beta2().VolumeGroupSnapshots(namespace).Watch(context.TODO(), options) + }, + }, + &volumegroupsnapshotv1beta2.VolumeGroupSnapshot{}, + resyncPeriod, + indexers, + ) +} + +func (f *volumeGroupSnapshotInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredVolumeGroupSnapshotInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *volumeGroupSnapshotInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&volumegroupsnapshotv1beta2.VolumeGroupSnapshot{}, f.defaultInformer) +} + +func (f *volumeGroupSnapshotInformer) Lister() v1beta2.VolumeGroupSnapshotLister { + return v1beta2.NewVolumeGroupSnapshotLister(f.Informer().GetIndexer()) +} diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumegroupsnapshot/v1beta2/volumegroupsnapshotclass.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumegroupsnapshot/v1beta2/volumegroupsnapshotclass.go new file mode 100644 index 000000000..b5cf8d6b5 --- /dev/null +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumegroupsnapshot/v1beta2/volumegroupsnapshotclass.go @@ -0,0 +1,89 @@ +/* +Copyright 2025 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 informer-gen. DO NOT EDIT. + +package v1beta2 + +import ( + "context" + time "time" + + volumegroupsnapshotv1beta2 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta2" + versioned "github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned" + internalinterfaces "github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/internalinterfaces" + v1beta2 "github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1beta2" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +// VolumeGroupSnapshotClassInformer provides access to a shared informer and lister for +// VolumeGroupSnapshotClasses. +type VolumeGroupSnapshotClassInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1beta2.VolumeGroupSnapshotClassLister +} + +type volumeGroupSnapshotClassInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc +} + +// NewVolumeGroupSnapshotClassInformer constructs a new informer for VolumeGroupSnapshotClass type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewVolumeGroupSnapshotClassInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredVolumeGroupSnapshotClassInformer(client, resyncPeriod, indexers, nil) +} + +// NewFilteredVolumeGroupSnapshotClassInformer constructs a new informer for VolumeGroupSnapshotClass type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewFilteredVolumeGroupSnapshotClassInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { + return cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.GroupsnapshotV1beta2().VolumeGroupSnapshotClasses().List(context.TODO(), options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.GroupsnapshotV1beta2().VolumeGroupSnapshotClasses().Watch(context.TODO(), options) + }, + }, + &volumegroupsnapshotv1beta2.VolumeGroupSnapshotClass{}, + resyncPeriod, + indexers, + ) +} + +func (f *volumeGroupSnapshotClassInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredVolumeGroupSnapshotClassInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *volumeGroupSnapshotClassInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&volumegroupsnapshotv1beta2.VolumeGroupSnapshotClass{}, f.defaultInformer) +} + +func (f *volumeGroupSnapshotClassInformer) Lister() v1beta2.VolumeGroupSnapshotClassLister { + return v1beta2.NewVolumeGroupSnapshotClassLister(f.Informer().GetIndexer()) +} diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumegroupsnapshot/v1beta2/volumegroupsnapshotcontent.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumegroupsnapshot/v1beta2/volumegroupsnapshotcontent.go new file mode 100644 index 000000000..bde0a3036 --- /dev/null +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumegroupsnapshot/v1beta2/volumegroupsnapshotcontent.go @@ -0,0 +1,89 @@ +/* +Copyright 2025 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 informer-gen. DO NOT EDIT. + +package v1beta2 + +import ( + "context" + time "time" + + volumegroupsnapshotv1beta2 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta2" + versioned "github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned" + internalinterfaces "github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/internalinterfaces" + v1beta2 "github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1beta2" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +// VolumeGroupSnapshotContentInformer provides access to a shared informer and lister for +// VolumeGroupSnapshotContents. +type VolumeGroupSnapshotContentInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1beta2.VolumeGroupSnapshotContentLister +} + +type volumeGroupSnapshotContentInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc +} + +// NewVolumeGroupSnapshotContentInformer constructs a new informer for VolumeGroupSnapshotContent type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewVolumeGroupSnapshotContentInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredVolumeGroupSnapshotContentInformer(client, resyncPeriod, indexers, nil) +} + +// NewFilteredVolumeGroupSnapshotContentInformer constructs a new informer for VolumeGroupSnapshotContent type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewFilteredVolumeGroupSnapshotContentInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { + return cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.GroupsnapshotV1beta2().VolumeGroupSnapshotContents().List(context.TODO(), options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.GroupsnapshotV1beta2().VolumeGroupSnapshotContents().Watch(context.TODO(), options) + }, + }, + &volumegroupsnapshotv1beta2.VolumeGroupSnapshotContent{}, + resyncPeriod, + indexers, + ) +} + +func (f *volumeGroupSnapshotContentInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredVolumeGroupSnapshotContentInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *volumeGroupSnapshotContentInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&volumegroupsnapshotv1beta2.VolumeGroupSnapshotContent{}, f.defaultInformer) +} + +func (f *volumeGroupSnapshotContentInformer) Lister() v1beta2.VolumeGroupSnapshotContentLister { + return v1beta2.NewVolumeGroupSnapshotContentLister(f.Informer().GetIndexer()) +} diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumesnapshot/interface.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumesnapshot/interface.go index bb6c4000c..52aa45ac3 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumesnapshot/interface.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumesnapshot/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumesnapshot/v1/interface.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumesnapshot/v1/interface.go index 4b7ce9050..355976469 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumesnapshot/v1/interface.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumesnapshot/v1/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumesnapshot/v1/volumesnapshot.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumesnapshot/v1/volumesnapshot.go index fe8070b22..8822d85ed 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumesnapshot/v1/volumesnapshot.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumesnapshot/v1/volumesnapshot.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumesnapshot/v1/volumesnapshotclass.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumesnapshot/v1/volumesnapshotclass.go index 7b2d7f1c5..09595ebda 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumesnapshot/v1/volumesnapshotclass.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumesnapshot/v1/volumesnapshotclass.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumesnapshot/v1/volumesnapshotcontent.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumesnapshot/v1/volumesnapshotcontent.go index 18203f9cb..75c684100 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumesnapshot/v1/volumesnapshotcontent.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumesnapshot/v1/volumesnapshotcontent.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1beta1/expansion_generated.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1beta1/expansion_generated.go index 1b4044bbd..c08a1c659 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1beta1/expansion_generated.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1beta1/expansion_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1beta1/volumegroupsnapshot.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1beta1/volumegroupsnapshot.go index f2edc34a7..471bd1007 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1beta1/volumegroupsnapshot.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1beta1/volumegroupsnapshot.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1beta1/volumegroupsnapshotclass.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1beta1/volumegroupsnapshotclass.go index 351e37e91..166cfbdd7 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1beta1/volumegroupsnapshotclass.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1beta1/volumegroupsnapshotclass.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1beta1/volumegroupsnapshotcontent.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1beta1/volumegroupsnapshotcontent.go index 576302795..f4e1be413 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1beta1/volumegroupsnapshotcontent.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1beta1/volumegroupsnapshotcontent.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1beta2/expansion_generated.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1beta2/expansion_generated.go new file mode 100644 index 000000000..9a5a89ec2 --- /dev/null +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1beta2/expansion_generated.go @@ -0,0 +1,35 @@ +/* +Copyright 2025 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 lister-gen. DO NOT EDIT. + +package v1beta2 + +// VolumeGroupSnapshotListerExpansion allows custom methods to be added to +// VolumeGroupSnapshotLister. +type VolumeGroupSnapshotListerExpansion interface{} + +// VolumeGroupSnapshotNamespaceListerExpansion allows custom methods to be added to +// VolumeGroupSnapshotNamespaceLister. +type VolumeGroupSnapshotNamespaceListerExpansion interface{} + +// VolumeGroupSnapshotClassListerExpansion allows custom methods to be added to +// VolumeGroupSnapshotClassLister. +type VolumeGroupSnapshotClassListerExpansion interface{} + +// VolumeGroupSnapshotContentListerExpansion allows custom methods to be added to +// VolumeGroupSnapshotContentLister. +type VolumeGroupSnapshotContentListerExpansion interface{} diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1beta2/volumegroupsnapshot.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1beta2/volumegroupsnapshot.go new file mode 100644 index 000000000..cc58c9aa9 --- /dev/null +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1beta2/volumegroupsnapshot.go @@ -0,0 +1,99 @@ +/* +Copyright 2025 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 lister-gen. DO NOT EDIT. + +package v1beta2 + +import ( + v1beta2 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta2" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// VolumeGroupSnapshotLister helps list VolumeGroupSnapshots. +// All objects returned here must be treated as read-only. +type VolumeGroupSnapshotLister interface { + // List lists all VolumeGroupSnapshots in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1beta2.VolumeGroupSnapshot, err error) + // VolumeGroupSnapshots returns an object that can list and get VolumeGroupSnapshots. + VolumeGroupSnapshots(namespace string) VolumeGroupSnapshotNamespaceLister + VolumeGroupSnapshotListerExpansion +} + +// volumeGroupSnapshotLister implements the VolumeGroupSnapshotLister interface. +type volumeGroupSnapshotLister struct { + indexer cache.Indexer +} + +// NewVolumeGroupSnapshotLister returns a new VolumeGroupSnapshotLister. +func NewVolumeGroupSnapshotLister(indexer cache.Indexer) VolumeGroupSnapshotLister { + return &volumeGroupSnapshotLister{indexer: indexer} +} + +// List lists all VolumeGroupSnapshots in the indexer. +func (s *volumeGroupSnapshotLister) List(selector labels.Selector) (ret []*v1beta2.VolumeGroupSnapshot, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta2.VolumeGroupSnapshot)) + }) + return ret, err +} + +// VolumeGroupSnapshots returns an object that can list and get VolumeGroupSnapshots. +func (s *volumeGroupSnapshotLister) VolumeGroupSnapshots(namespace string) VolumeGroupSnapshotNamespaceLister { + return volumeGroupSnapshotNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// VolumeGroupSnapshotNamespaceLister helps list and get VolumeGroupSnapshots. +// All objects returned here must be treated as read-only. +type VolumeGroupSnapshotNamespaceLister interface { + // List lists all VolumeGroupSnapshots in the indexer for a given namespace. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1beta2.VolumeGroupSnapshot, err error) + // Get retrieves the VolumeGroupSnapshot from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. + Get(name string) (*v1beta2.VolumeGroupSnapshot, error) + VolumeGroupSnapshotNamespaceListerExpansion +} + +// volumeGroupSnapshotNamespaceLister implements the VolumeGroupSnapshotNamespaceLister +// interface. +type volumeGroupSnapshotNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all VolumeGroupSnapshots in the indexer for a given namespace. +func (s volumeGroupSnapshotNamespaceLister) List(selector labels.Selector) (ret []*v1beta2.VolumeGroupSnapshot, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta2.VolumeGroupSnapshot)) + }) + return ret, err +} + +// Get retrieves the VolumeGroupSnapshot from the indexer for a given namespace and name. +func (s volumeGroupSnapshotNamespaceLister) Get(name string) (*v1beta2.VolumeGroupSnapshot, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1beta2.Resource("volumegroupsnapshot"), name) + } + return obj.(*v1beta2.VolumeGroupSnapshot), nil +} diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1beta2/volumegroupsnapshotclass.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1beta2/volumegroupsnapshotclass.go new file mode 100644 index 000000000..9beb4b35c --- /dev/null +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1beta2/volumegroupsnapshotclass.go @@ -0,0 +1,68 @@ +/* +Copyright 2025 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 lister-gen. DO NOT EDIT. + +package v1beta2 + +import ( + v1beta2 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta2" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// VolumeGroupSnapshotClassLister helps list VolumeGroupSnapshotClasses. +// All objects returned here must be treated as read-only. +type VolumeGroupSnapshotClassLister interface { + // List lists all VolumeGroupSnapshotClasses in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1beta2.VolumeGroupSnapshotClass, err error) + // Get retrieves the VolumeGroupSnapshotClass from the index for a given name. + // Objects returned here must be treated as read-only. + Get(name string) (*v1beta2.VolumeGroupSnapshotClass, error) + VolumeGroupSnapshotClassListerExpansion +} + +// volumeGroupSnapshotClassLister implements the VolumeGroupSnapshotClassLister interface. +type volumeGroupSnapshotClassLister struct { + indexer cache.Indexer +} + +// NewVolumeGroupSnapshotClassLister returns a new VolumeGroupSnapshotClassLister. +func NewVolumeGroupSnapshotClassLister(indexer cache.Indexer) VolumeGroupSnapshotClassLister { + return &volumeGroupSnapshotClassLister{indexer: indexer} +} + +// List lists all VolumeGroupSnapshotClasses in the indexer. +func (s *volumeGroupSnapshotClassLister) List(selector labels.Selector) (ret []*v1beta2.VolumeGroupSnapshotClass, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta2.VolumeGroupSnapshotClass)) + }) + return ret, err +} + +// Get retrieves the VolumeGroupSnapshotClass from the index for a given name. +func (s *volumeGroupSnapshotClassLister) Get(name string) (*v1beta2.VolumeGroupSnapshotClass, error) { + obj, exists, err := s.indexer.GetByKey(name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1beta2.Resource("volumegroupsnapshotclass"), name) + } + return obj.(*v1beta2.VolumeGroupSnapshotClass), nil +} diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1beta2/volumegroupsnapshotcontent.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1beta2/volumegroupsnapshotcontent.go new file mode 100644 index 000000000..b84723390 --- /dev/null +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1beta2/volumegroupsnapshotcontent.go @@ -0,0 +1,68 @@ +/* +Copyright 2025 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 lister-gen. DO NOT EDIT. + +package v1beta2 + +import ( + v1beta2 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta2" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// VolumeGroupSnapshotContentLister helps list VolumeGroupSnapshotContents. +// All objects returned here must be treated as read-only. +type VolumeGroupSnapshotContentLister interface { + // List lists all VolumeGroupSnapshotContents in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1beta2.VolumeGroupSnapshotContent, err error) + // Get retrieves the VolumeGroupSnapshotContent from the index for a given name. + // Objects returned here must be treated as read-only. + Get(name string) (*v1beta2.VolumeGroupSnapshotContent, error) + VolumeGroupSnapshotContentListerExpansion +} + +// volumeGroupSnapshotContentLister implements the VolumeGroupSnapshotContentLister interface. +type volumeGroupSnapshotContentLister struct { + indexer cache.Indexer +} + +// NewVolumeGroupSnapshotContentLister returns a new VolumeGroupSnapshotContentLister. +func NewVolumeGroupSnapshotContentLister(indexer cache.Indexer) VolumeGroupSnapshotContentLister { + return &volumeGroupSnapshotContentLister{indexer: indexer} +} + +// List lists all VolumeGroupSnapshotContents in the indexer. +func (s *volumeGroupSnapshotContentLister) List(selector labels.Selector) (ret []*v1beta2.VolumeGroupSnapshotContent, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta2.VolumeGroupSnapshotContent)) + }) + return ret, err +} + +// Get retrieves the VolumeGroupSnapshotContent from the index for a given name. +func (s *volumeGroupSnapshotContentLister) Get(name string) (*v1beta2.VolumeGroupSnapshotContent, error) { + obj, exists, err := s.indexer.GetByKey(name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1beta2.Resource("volumegroupsnapshotcontent"), name) + } + return obj.(*v1beta2.VolumeGroupSnapshotContent), nil +} diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumesnapshot/v1/expansion_generated.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumesnapshot/v1/expansion_generated.go index 722075103..a53e1e156 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumesnapshot/v1/expansion_generated.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumesnapshot/v1/expansion_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumesnapshot/v1/volumesnapshot.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumesnapshot/v1/volumesnapshot.go index 1a2036323..64e9e6abe 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumesnapshot/v1/volumesnapshot.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumesnapshot/v1/volumesnapshot.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumesnapshot/v1/volumesnapshotclass.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumesnapshot/v1/volumesnapshotclass.go index 6eb42e736..b18e30c98 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumesnapshot/v1/volumesnapshotclass.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumesnapshot/v1/volumesnapshotclass.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumesnapshot/v1/volumesnapshotcontent.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumesnapshot/v1/volumesnapshotcontent.go index 7af231808..e2dd1c044 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumesnapshot/v1/volumesnapshotcontent.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumesnapshot/v1/volumesnapshotcontent.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 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. diff --git a/vendor/modules.txt b/vendor/modules.txt index 3e80bc0aa..11aee42e7 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -93,21 +93,26 @@ github.com/kubernetes-csi/csi-test/v5/utils # github.com/kubernetes-csi/external-snapshotter/client/v8 v8.2.0 => ./client ## explicit; go 1.22.0 github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta1 +github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta2 github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumesnapshot/v1 github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/fake github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/scheme github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1 github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake +github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta2 +github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta2/fake github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumesnapshot/v1 github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumesnapshot/v1/fake github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/internalinterfaces github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumegroupsnapshot github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumegroupsnapshot/v1beta1 +github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumegroupsnapshot/v1beta2 github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumesnapshot github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumesnapshot/v1 github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1beta1 +github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1beta2 github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumesnapshot/v1 # github.com/mailru/easyjson v0.9.0 ## explicit; go 1.20