mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-18 11:00:25 +00:00
e2e: update snapshot to v1beta1
updating the snapshot client and test to use v1beta1 client and API. Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
parent
5bfff89e04
commit
a17fef07e6
@ -18,9 +18,10 @@ package e2e
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"crypto/sha256"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
groupsnapapi "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1alpha1"
|
groupsnapapi "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta1"
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
"k8s.io/kubernetes/test/e2e/framework"
|
"k8s.io/kubernetes/test/e2e/framework"
|
||||||
)
|
)
|
||||||
@ -78,16 +79,32 @@ func (c *cephFSVolumeGroupSnapshot) ValidateResourcesForCreate(vgs *groupsnapapi
|
|||||||
return fmt.Errorf("failed getting cephFS metadata pool name: %w", err)
|
return fmt.Errorf("failed getting cephFS metadata pool name: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
sourcePVCCount := len(vgs.Status.PVCVolumeSnapshotRefList)
|
vgsc, err := c.groupclient.VolumeGroupSnapshotContents().Get(
|
||||||
|
ctx,
|
||||||
|
*vgs.Status.BoundVolumeGroupSnapshotContentName,
|
||||||
|
metav1.GetOptions{})
|
||||||
|
if err != nil {
|
||||||
|
return fmt.Errorf("failed to get VolumeGroupSnapshotContent: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
sourcePVCCount := len(vgsc.Status.VolumeSnapshotHandlePairList)
|
||||||
// we are creating clones for each source PVC
|
// we are creating clones for each source PVC
|
||||||
clonePVCCount := len(vgs.Status.PVCVolumeSnapshotRefList)
|
clonePVCCount := len(vgsc.Status.VolumeSnapshotHandlePairList)
|
||||||
totalPVCCount := sourcePVCCount + clonePVCCount
|
totalPVCCount := sourcePVCCount + clonePVCCount
|
||||||
validateSubvolumeCount(c.framework, totalPVCCount, fileSystemName, subvolumegroup)
|
validateSubvolumeCount(c.framework, totalPVCCount, fileSystemName, subvolumegroup)
|
||||||
|
|
||||||
// we are creating 1 snapshot for each source PVC, validate the snapshot count
|
// we are creating 1 snapshot for each source PVC, validate the snapshot count
|
||||||
for _, pvcSnap := range vgs.Status.PVCVolumeSnapshotRefList {
|
for _, snapshot := range vgsc.Status.VolumeSnapshotHandlePairList {
|
||||||
|
volumeHandle := snapshot.VolumeHandle
|
||||||
|
volumeSnapshotName := fmt.Sprintf("snapshot-%x", sha256.Sum256([]byte(
|
||||||
|
string(vgsc.UID)+volumeHandle)))
|
||||||
|
volumeSnapshot, err := c.snapClient.VolumeSnapshots(vgs.Namespace).Get(ctx, volumeSnapshotName, metav1.GetOptions{})
|
||||||
|
if err != nil {
|
||||||
|
return fmt.Errorf("failed to get VolumeSnapshot: %w", err)
|
||||||
|
}
|
||||||
|
pvcName := *volumeSnapshot.Spec.Source.PersistentVolumeClaimName
|
||||||
pvc, err := c.framework.ClientSet.CoreV1().PersistentVolumeClaims(vgs.Namespace).Get(ctx,
|
pvc, err := c.framework.ClientSet.CoreV1().PersistentVolumeClaims(vgs.Namespace).Get(ctx,
|
||||||
pvcSnap.PersistentVolumeClaimRef.Name,
|
pvcName,
|
||||||
metav1.GetOptions{})
|
metav1.GetOptions{})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("failed to get PVC: %w", err)
|
return fmt.Errorf("failed to get PVC: %w", err)
|
||||||
@ -165,8 +182,16 @@ func (rvgs *rbdVolumeGroupSnapshot) GetVolumeGroupSnapshotClass() (*groupsnapapi
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (rvgs *rbdVolumeGroupSnapshot) ValidateResourcesForCreate(vgs *groupsnapapi.VolumeGroupSnapshot) error {
|
func (rvgs *rbdVolumeGroupSnapshot) ValidateResourcesForCreate(vgs *groupsnapapi.VolumeGroupSnapshot) error {
|
||||||
sourcePVCCount := len(vgs.Status.PVCVolumeSnapshotRefList)
|
vgsc, err := rvgs.groupclient.VolumeGroupSnapshotContents().Get(
|
||||||
clonePVCCount := len(vgs.Status.PVCVolumeSnapshotRefList)
|
context.TODO(),
|
||||||
|
*vgs.Status.BoundVolumeGroupSnapshotContentName,
|
||||||
|
metav1.GetOptions{})
|
||||||
|
if err != nil {
|
||||||
|
return fmt.Errorf("failed to get VolumeGroupSnapshotContent: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
sourcePVCCount := len(vgsc.Status.VolumeSnapshotHandlePairList)
|
||||||
|
clonePVCCount := len(vgsc.Status.VolumeSnapshotHandlePairList)
|
||||||
totalPVCCount := sourcePVCCount + clonePVCCount
|
totalPVCCount := sourcePVCCount + clonePVCCount
|
||||||
|
|
||||||
validateOmapCount(rvgs.framework, totalPVCCount, rbdType, defaultRBDPool, volumesType)
|
validateOmapCount(rvgs.framework, totalPVCCount, rbdType, defaultRBDPool, volumesType)
|
||||||
|
@ -18,12 +18,14 @@ package e2e
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"crypto/sha256"
|
||||||
"fmt"
|
"fmt"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
groupsnapapi "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1alpha1"
|
groupsnapapi "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta1"
|
||||||
snapapi "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumesnapshot/v1"
|
snapapi "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumesnapshot/v1"
|
||||||
groupsnapclient "github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1alpha1"
|
groupsnapclient "github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1"
|
||||||
|
snapclient "github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumesnapshot/v1"
|
||||||
v1 "k8s.io/api/core/v1"
|
v1 "k8s.io/api/core/v1"
|
||||||
apierrs "k8s.io/apimachinery/pkg/api/errors"
|
apierrs "k8s.io/apimachinery/pkg/api/errors"
|
||||||
"k8s.io/apimachinery/pkg/api/resource"
|
"k8s.io/apimachinery/pkg/api/resource"
|
||||||
@ -75,7 +77,8 @@ type VolumeGroupSnapshotter interface {
|
|||||||
type volumeGroupSnapshotterBase struct {
|
type volumeGroupSnapshotterBase struct {
|
||||||
timeout int
|
timeout int
|
||||||
framework *framework.Framework
|
framework *framework.Framework
|
||||||
groupclient *groupsnapclient.GroupsnapshotV1alpha1Client
|
groupclient *groupsnapclient.GroupsnapshotV1beta1Client
|
||||||
|
snapClient *snapclient.SnapshotV1Client
|
||||||
storageClassName string
|
storageClassName string
|
||||||
blockPVC bool
|
blockPVC bool
|
||||||
totalPVCCount int
|
totalPVCCount int
|
||||||
@ -96,9 +99,15 @@ func newVolumeGroupSnapshotBase(f *framework.Framework, namespace,
|
|||||||
return nil, fmt.Errorf("error creating group snapshot client: %w", err)
|
return nil, fmt.Errorf("error creating group snapshot client: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
s, err := snapclient.NewForConfig(config)
|
||||||
|
if err != nil {
|
||||||
|
return nil, fmt.Errorf("error creating snapshot client: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
return &volumeGroupSnapshotterBase{
|
return &volumeGroupSnapshotterBase{
|
||||||
framework: f,
|
framework: f,
|
||||||
groupclient: c,
|
groupclient: c,
|
||||||
|
snapClient: s,
|
||||||
namespace: namespace,
|
namespace: namespace,
|
||||||
storageClassName: storageClass,
|
storageClassName: storageClass,
|
||||||
blockPVC: blockPVC,
|
blockPVC: blockPVC,
|
||||||
@ -160,13 +169,27 @@ func (v *volumeGroupSnapshotterBase) DeletePVCs(pvcs []*v1.PersistentVolumeClaim
|
|||||||
func (v *volumeGroupSnapshotterBase) CreatePVCClones(
|
func (v *volumeGroupSnapshotterBase) CreatePVCClones(
|
||||||
vgs *groupsnapapi.VolumeGroupSnapshot,
|
vgs *groupsnapapi.VolumeGroupSnapshot,
|
||||||
) ([]*v1.PersistentVolumeClaim, error) {
|
) ([]*v1.PersistentVolumeClaim, error) {
|
||||||
pvcSnapRef := vgs.Status.PVCVolumeSnapshotRefList
|
groupSnapshotContent, err := v.groupclient.VolumeGroupSnapshotContents().Get(
|
||||||
|
context.TODO(),
|
||||||
|
*vgs.Status.BoundVolumeGroupSnapshotContentName,
|
||||||
|
metav1.GetOptions{})
|
||||||
|
if err != nil {
|
||||||
|
return nil, fmt.Errorf("failed to get VolumeGroupSnapshotContent: %w", err)
|
||||||
|
}
|
||||||
namespace := vgs.Namespace
|
namespace := vgs.Namespace
|
||||||
ctx := context.TODO()
|
ctx := context.TODO()
|
||||||
pvcs := make([]*v1.PersistentVolumeClaim, len(pvcSnapRef))
|
pvcs := make([]*v1.PersistentVolumeClaim, len(groupSnapshotContent.Status.VolumeSnapshotHandlePairList))
|
||||||
for i, pvcSnap := range pvcSnapRef {
|
for i, snapshot := range groupSnapshotContent.Status.VolumeSnapshotHandlePairList {
|
||||||
|
volumeHandle := snapshot.VolumeHandle
|
||||||
|
volumeSnapshotName := fmt.Sprintf("snapshot-%x", sha256.Sum256([]byte(
|
||||||
|
string(groupSnapshotContent.UID)+volumeHandle)))
|
||||||
|
volumeSnapshot, err := v.snapClient.VolumeSnapshots(namespace).Get(ctx, volumeSnapshotName, metav1.GetOptions{})
|
||||||
|
if err != nil {
|
||||||
|
return nil, fmt.Errorf("failed to get VolumeSnapshot: %w", err)
|
||||||
|
}
|
||||||
|
pvcName := *volumeSnapshot.Spec.Source.PersistentVolumeClaimName
|
||||||
pvc, err := v.framework.ClientSet.CoreV1().PersistentVolumeClaims(namespace).Get(ctx,
|
pvc, err := v.framework.ClientSet.CoreV1().PersistentVolumeClaims(namespace).Get(ctx,
|
||||||
pvcSnap.PersistentVolumeClaimRef.Name,
|
pvcName,
|
||||||
metav1.GetOptions{})
|
metav1.GetOptions{})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("failed to get PVC: %w", err)
|
return nil, fmt.Errorf("failed to get PVC: %w", err)
|
||||||
@ -179,12 +202,11 @@ func (v *volumeGroupSnapshotterBase) CreatePVCClones(
|
|||||||
Spec: *pvc.Spec.DeepCopy(),
|
Spec: *pvc.Spec.DeepCopy(),
|
||||||
}
|
}
|
||||||
|
|
||||||
snap := pvcSnap.VolumeSnapshotRef
|
|
||||||
apiGroup := snapapi.GroupName
|
apiGroup := snapapi.GroupName
|
||||||
pvcs[i].Spec.DataSource = &v1.TypedLocalObjectReference{
|
pvcs[i].Spec.DataSource = &v1.TypedLocalObjectReference{
|
||||||
APIGroup: &apiGroup,
|
APIGroup: &apiGroup,
|
||||||
Kind: "VolumeSnapshot",
|
Kind: "VolumeSnapshot",
|
||||||
Name: snap.Name,
|
Name: volumeSnapshot.Name,
|
||||||
}
|
}
|
||||||
pvcs[i].Spec.StorageClassName = &v.storageClassName
|
pvcs[i].Spec.StorageClassName = &v.storageClassName
|
||||||
// cleanup the VolumeName as we are creating a new PVC
|
// cleanup the VolumeName as we are creating a new PVC
|
||||||
@ -263,7 +285,7 @@ func (v *volumeGroupSnapshotterBase) DeletePods(pods []*v1.Pod) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (v volumeGroupSnapshotterBase) CreateVolumeGroupSnapshotClass(
|
func (v *volumeGroupSnapshotterBase) CreateVolumeGroupSnapshotClass(
|
||||||
groupSnapshotClass *groupsnapapi.VolumeGroupSnapshotClass,
|
groupSnapshotClass *groupsnapapi.VolumeGroupSnapshotClass,
|
||||||
) error {
|
) error {
|
||||||
return wait.PollUntilContextTimeout(
|
return wait.PollUntilContextTimeout(
|
||||||
@ -286,7 +308,7 @@ func (v volumeGroupSnapshotterBase) CreateVolumeGroupSnapshotClass(
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
func (v volumeGroupSnapshotterBase) CreateVolumeGroupSnapshot(name,
|
func (v *volumeGroupSnapshotterBase) CreateVolumeGroupSnapshot(name,
|
||||||
volumeGroupSnapshotClassName string, labels map[string]string,
|
volumeGroupSnapshotClassName string, labels map[string]string,
|
||||||
) (*groupsnapapi.VolumeGroupSnapshot, error) {
|
) (*groupsnapapi.VolumeGroupSnapshot, error) {
|
||||||
namespace := v.namespace
|
namespace := v.namespace
|
||||||
@ -356,7 +378,7 @@ func (v volumeGroupSnapshotterBase) CreateVolumeGroupSnapshot(name,
|
|||||||
return groupSnapshot, nil
|
return groupSnapshot, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (v volumeGroupSnapshotterBase) DeleteVolumeGroupSnapshot(volumeGroupSnapshotName string) error {
|
func (v *volumeGroupSnapshotterBase) DeleteVolumeGroupSnapshot(volumeGroupSnapshotName string) error {
|
||||||
namespace := v.namespace
|
namespace := v.namespace
|
||||||
ctx := context.TODO()
|
ctx := context.TODO()
|
||||||
err := v.groupclient.VolumeGroupSnapshots(namespace).Delete(
|
err := v.groupclient.VolumeGroupSnapshots(namespace).Delete(
|
||||||
@ -395,7 +417,7 @@ func (v volumeGroupSnapshotterBase) DeleteVolumeGroupSnapshot(volumeGroupSnapsho
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
func (v volumeGroupSnapshotterBase) DeleteVolumeGroupSnapshotClass(groupSnapshotClassName string) error {
|
func (v *volumeGroupSnapshotterBase) DeleteVolumeGroupSnapshotClass(groupSnapshotClassName string) error {
|
||||||
ctx := context.TODO()
|
ctx := context.TODO()
|
||||||
err := v.groupclient.VolumeGroupSnapshotClasses().Delete(
|
err := v.groupclient.VolumeGroupSnapshotClasses().Delete(
|
||||||
ctx, groupSnapshotClassName, metav1.DeleteOptions{})
|
ctx, groupSnapshotClassName, metav1.DeleteOptions{})
|
||||||
|
2
go.mod
2
go.mod
@ -18,7 +18,7 @@ require (
|
|||||||
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect
|
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect
|
||||||
github.com/hashicorp/vault/api v1.15.0
|
github.com/hashicorp/vault/api v1.15.0
|
||||||
github.com/kubernetes-csi/csi-lib-utils v0.19.0
|
github.com/kubernetes-csi/csi-lib-utils v0.19.0
|
||||||
github.com/kubernetes-csi/external-snapshotter/client/v8 v8.0.0
|
github.com/kubernetes-csi/external-snapshotter/client/v8 v8.2.0
|
||||||
github.com/libopenstorage/secrets v0.0.0-20231011182615-5f4b25ceede1
|
github.com/libopenstorage/secrets v0.0.0-20231011182615-5f4b25ceede1
|
||||||
github.com/onsi/ginkgo/v2 v2.22.0
|
github.com/onsi/ginkgo/v2 v2.22.0
|
||||||
github.com/onsi/gomega v1.36.0
|
github.com/onsi/gomega v1.36.0
|
||||||
|
4
go.sum
4
go.sum
@ -1970,8 +1970,8 @@ github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
|||||||
github.com/kubernetes-csi/csi-lib-utils v0.19.0 h1:3sT8mL9+St2acyrEtuR7CQ5L78GR4lgsb+sfon9tGfA=
|
github.com/kubernetes-csi/csi-lib-utils v0.19.0 h1:3sT8mL9+St2acyrEtuR7CQ5L78GR4lgsb+sfon9tGfA=
|
||||||
github.com/kubernetes-csi/csi-lib-utils v0.19.0/go.mod h1:lBuMKvoyd8c3EG+itmnVWApLDHnLkU7ibxxZSPuOw0M=
|
github.com/kubernetes-csi/csi-lib-utils v0.19.0/go.mod h1:lBuMKvoyd8c3EG+itmnVWApLDHnLkU7ibxxZSPuOw0M=
|
||||||
github.com/kubernetes-csi/external-snapshotter/client/v4 v4.0.0/go.mod h1:YBCo4DoEeDndqvAn6eeu0vWM7QdXmHEeI9cFWplmBys=
|
github.com/kubernetes-csi/external-snapshotter/client/v4 v4.0.0/go.mod h1:YBCo4DoEeDndqvAn6eeu0vWM7QdXmHEeI9cFWplmBys=
|
||||||
github.com/kubernetes-csi/external-snapshotter/client/v8 v8.0.0 h1:mjQG0Vakr2h246kEDR85U8y8ZhPgT3bguTCajRa/jaw=
|
github.com/kubernetes-csi/external-snapshotter/client/v8 v8.2.0 h1:Q3jQ1NkFqv5o+F8dMmHd8SfEmlcwNeo1immFApntEwE=
|
||||||
github.com/kubernetes-csi/external-snapshotter/client/v8 v8.0.0/go.mod h1:E3vdYxHj2C2q6qo8/Da4g7P+IcwqRZyy3gJBzYybV9Y=
|
github.com/kubernetes-csi/external-snapshotter/client/v8 v8.2.0/go.mod h1:E3vdYxHj2C2q6qo8/Da4g7P+IcwqRZyy3gJBzYybV9Y=
|
||||||
github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc=
|
github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc=
|
||||||
github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=
|
github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=
|
||||||
github.com/ledongthuc/pdf v0.0.0-20220302134840-0c2507a12d80/go.mod h1:imJHygn/1yfhB7XSJJKlFZKl/J+dCPAknuiaGOshXAs=
|
github.com/ledongthuc/pdf v0.0.0-20220302134840-0c2507a12d80/go.mod h1:imJHygn/1yfhB7XSJJKlFZKl/J+dCPAknuiaGOshXAs=
|
||||||
|
@ -17,4 +17,4 @@ limitations under the License.
|
|||||||
// +k8s:deepcopy-gen=package
|
// +k8s:deepcopy-gen=package
|
||||||
// +groupName=groupsnapshot.storage.k8s.io
|
// +groupName=groupsnapshot.storage.k8s.io
|
||||||
|
|
||||||
package v1alpha1
|
package v1beta1
|
@ -11,7 +11,7 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package v1alpha1
|
package v1beta1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
@ -28,7 +28,7 @@ var (
|
|||||||
// AddToScheme adds to scheme
|
// AddToScheme adds to scheme
|
||||||
AddToScheme = SchemeBuilder.AddToScheme
|
AddToScheme = SchemeBuilder.AddToScheme
|
||||||
// SchemeGroupVersion is the group version used to register these objects.
|
// SchemeGroupVersion is the group version used to register these objects.
|
||||||
SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"}
|
SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta1"}
|
||||||
)
|
)
|
||||||
|
|
||||||
func Resource(resource string) schema.GroupResource {
|
func Resource(resource string) schema.GroupResource {
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
// +kubebuilder:object:generate=true
|
// +kubebuilder:object:generate=true
|
||||||
package v1alpha1
|
package v1beta1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
core_v1 "k8s.io/api/core/v1"
|
core_v1 "k8s.io/api/core/v1"
|
||||||
@ -90,6 +90,7 @@ type VolumeGroupSnapshotStatus struct {
|
|||||||
// The format of this field is a Unix nanoseconds time encoded as an int64.
|
// 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
|
// On Unix, the command date +%s%N returns the current time in nanoseconds
|
||||||
// since 1970-01-01 00:00:00 UTC.
|
// since 1970-01-01 00:00:00 UTC.
|
||||||
|
// This field is updated based on the CreationTime field in VolumeGroupSnapshotContentStatus
|
||||||
// +optional
|
// +optional
|
||||||
CreationTime *metav1.Time `json:"creationTime,omitempty" protobuf:"bytes,2,opt,name=creationTime"`
|
CreationTime *metav1.Time `json:"creationTime,omitempty" protobuf:"bytes,2,opt,name=creationTime"`
|
||||||
|
|
||||||
@ -108,21 +109,6 @@ type VolumeGroupSnapshotStatus struct {
|
|||||||
// group snapshot creation. Upon success, this error field will be cleared.
|
// group snapshot creation. Upon success, this error field will be cleared.
|
||||||
// +optional
|
// +optional
|
||||||
Error *snapshotv1.VolumeSnapshotError `json:"error,omitempty" protobuf:"bytes,4,opt,name=error,casttype=VolumeSnapshotError"`
|
Error *snapshotv1.VolumeSnapshotError `json:"error,omitempty" protobuf:"bytes,4,opt,name=error,casttype=VolumeSnapshotError"`
|
||||||
|
|
||||||
// VolumeSnapshotRefList is the list of PVC and VolumeSnapshot pairs that
|
|
||||||
// is part of this group snapshot.
|
|
||||||
// The maximum number of allowed snapshots in the group is 100.
|
|
||||||
// +optional
|
|
||||||
PVCVolumeSnapshotRefList []PVCVolumeSnapshotPair `json:"pvcVolumeSnapshotRefList,omitempty" protobuf:"bytes,5,opt,name=pvcVolumeSnapshotRefList"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// PVCVolumeSnapshotPair defines a pair of a PVC reference and a Volume Snapshot Reference
|
|
||||||
type PVCVolumeSnapshotPair struct {
|
|
||||||
// PersistentVolumeClaimRef is a reference to the PVC this pair is referring to
|
|
||||||
PersistentVolumeClaimRef core_v1.LocalObjectReference `json:"persistentVolumeClaimRef,omitempty" protobuf:"bytes,1,opt,name=persistentVolumeClaimRef"`
|
|
||||||
|
|
||||||
// VolumeSnapshotRef is a reference to the VolumeSnapshot this pair is referring to
|
|
||||||
VolumeSnapshotRef core_v1.LocalObjectReference `json:"volumeSnapshotRef,omitempty" protobuf:"bytes,2,opt,name=volumeSnapshotRef"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//+genclient
|
//+genclient
|
||||||
@ -281,7 +267,6 @@ type VolumeGroupSnapshotContentSpec struct {
|
|||||||
// This field is immutable after creation.
|
// This field is immutable after creation.
|
||||||
// Required.
|
// Required.
|
||||||
// +kubebuilder:validation:XValidation:rule="has(self.name) && has(self.__namespace__)",message="both volumeGroupSnapshotRef.name and volumeGroupSnapshotRef.namespace must be set"
|
// +kubebuilder:validation:XValidation:rule="has(self.name) && has(self.__namespace__)",message="both volumeGroupSnapshotRef.name and volumeGroupSnapshotRef.namespace must be set"
|
||||||
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="volumeGroupSnapshotRef is immutable"
|
|
||||||
VolumeGroupSnapshotRef core_v1.ObjectReference `json:"volumeGroupSnapshotRef" protobuf:"bytes,1,opt,name=volumeGroupSnapshotRef"`
|
VolumeGroupSnapshotRef core_v1.ObjectReference `json:"volumeGroupSnapshotRef" protobuf:"bytes,1,opt,name=volumeGroupSnapshotRef"`
|
||||||
|
|
||||||
// DeletionPolicy determines whether this VolumeGroupSnapshotContent and the
|
// DeletionPolicy determines whether this VolumeGroupSnapshotContent and the
|
||||||
@ -340,8 +325,9 @@ type VolumeGroupSnapshotContentStatus struct {
|
|||||||
// The format of this field is a Unix nanoseconds time encoded as an int64.
|
// 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
|
// On Unix, the command date +%s%N returns the current time in nanoseconds
|
||||||
// since 1970-01-01 00:00:00 UTC.
|
// since 1970-01-01 00:00:00 UTC.
|
||||||
|
// This field is the source for the CreationTime field in VolumeGroupSnapshotStatus
|
||||||
// +optional
|
// +optional
|
||||||
CreationTime *int64 `json:"creationTime,omitempty" protobuf:"varint,2,opt,name=creationTime"`
|
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
|
// ReadyToUse indicates if all the individual snapshots in the group are ready to be
|
||||||
// used to restore a group of volumes.
|
// used to restore a group of volumes.
|
||||||
@ -354,21 +340,11 @@ type VolumeGroupSnapshotContentStatus struct {
|
|||||||
// +optional
|
// +optional
|
||||||
Error *snapshotv1.VolumeSnapshotError `json:"error,omitempty" protobuf:"bytes,4,opt,name=error,casttype=VolumeSnapshotError"`
|
Error *snapshotv1.VolumeSnapshotError `json:"error,omitempty" protobuf:"bytes,4,opt,name=error,casttype=VolumeSnapshotError"`
|
||||||
|
|
||||||
// PVVolumeSnapshotContentList is the list of pairs of PV and
|
// VolumeSnapshotHandlePairList is a list of CSI "volume_id" and "snapshot_id"
|
||||||
// VolumeSnapshotContent for this group snapshot
|
// pair returned by the CSI driver to identify snapshots and their source volumes
|
||||||
// The maximum number of allowed snapshots in the group is 100.
|
// on the storage system.
|
||||||
// +optional
|
// +optional
|
||||||
PVVolumeSnapshotContentList []PVVolumeSnapshotContentPair `json:"pvVolumeSnapshotContentList,omitempty" protobuf:"bytes,5,opt,name=pvVolumeSnapshotContentRefList"`
|
VolumeSnapshotHandlePairList []VolumeSnapshotHandlePair `json:"volumeSnapshotHandlePairList,omitempty" protobuf:"bytes,6,opt,name=volumeSnapshotHandlePairList"`
|
||||||
}
|
|
||||||
|
|
||||||
// PVVolumeSnapshotContentPair represent a pair of PV names and
|
|
||||||
// VolumeSnapshotContent names
|
|
||||||
type PVVolumeSnapshotContentPair struct {
|
|
||||||
// PersistentVolumeRef is a reference to the persistent volume resource
|
|
||||||
PersistentVolumeRef core_v1.LocalObjectReference `json:"persistentVolumeRef,omitempty" protobuf:"bytes,1,opt,name=persistentVolumeRef"`
|
|
||||||
|
|
||||||
// VolumeSnapshotContentRef is a reference to the volume snapshot content resource
|
|
||||||
VolumeSnapshotContentRef core_v1.LocalObjectReference `json:"volumeSnapshotContentRef,omitempty" protobuf:"bytes,2,opt,name=volumeSnapshotContentRef"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// VolumeGroupSnapshotContentSource represents the CSI source of a group snapshot.
|
// VolumeGroupSnapshotContentSource represents the CSI source of a group snapshot.
|
||||||
@ -410,3 +386,16 @@ type GroupSnapshotHandles struct {
|
|||||||
// Required.
|
// Required.
|
||||||
VolumeSnapshotHandles []string `json:"volumeSnapshotHandles" protobuf:"bytes,2,opt,name=volumeSnapshotHandles"`
|
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"`
|
||||||
|
}
|
@ -19,7 +19,7 @@ limitations under the License.
|
|||||||
|
|
||||||
// Code generated by deepcopy-gen. DO NOT EDIT.
|
// Code generated by deepcopy-gen. DO NOT EDIT.
|
||||||
|
|
||||||
package v1alpha1
|
package v1beta1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
v1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumesnapshot/v1"
|
v1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumesnapshot/v1"
|
||||||
@ -48,42 +48,6 @@ func (in *GroupSnapshotHandles) DeepCopy() *GroupSnapshotHandles {
|
|||||||
return out
|
return out
|
||||||
}
|
}
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *PVCVolumeSnapshotPair) DeepCopyInto(out *PVCVolumeSnapshotPair) {
|
|
||||||
*out = *in
|
|
||||||
out.PersistentVolumeClaimRef = in.PersistentVolumeClaimRef
|
|
||||||
out.VolumeSnapshotRef = in.VolumeSnapshotRef
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PVCVolumeSnapshotPair.
|
|
||||||
func (in *PVCVolumeSnapshotPair) DeepCopy() *PVCVolumeSnapshotPair {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(PVCVolumeSnapshotPair)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *PVVolumeSnapshotContentPair) DeepCopyInto(out *PVVolumeSnapshotContentPair) {
|
|
||||||
*out = *in
|
|
||||||
out.PersistentVolumeRef = in.PersistentVolumeRef
|
|
||||||
out.VolumeSnapshotContentRef = in.VolumeSnapshotContentRef
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PVVolumeSnapshotContentPair.
|
|
||||||
func (in *PVVolumeSnapshotContentPair) DeepCopy() *PVVolumeSnapshotContentPair {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(PVVolumeSnapshotContentPair)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||||
func (in *VolumeGroupSnapshot) DeepCopyInto(out *VolumeGroupSnapshot) {
|
func (in *VolumeGroupSnapshot) DeepCopyInto(out *VolumeGroupSnapshot) {
|
||||||
*out = *in
|
*out = *in
|
||||||
@ -306,8 +270,7 @@ func (in *VolumeGroupSnapshotContentStatus) DeepCopyInto(out *VolumeGroupSnapsho
|
|||||||
}
|
}
|
||||||
if in.CreationTime != nil {
|
if in.CreationTime != nil {
|
||||||
in, out := &in.CreationTime, &out.CreationTime
|
in, out := &in.CreationTime, &out.CreationTime
|
||||||
*out = new(int64)
|
*out = (*in).DeepCopy()
|
||||||
**out = **in
|
|
||||||
}
|
}
|
||||||
if in.ReadyToUse != nil {
|
if in.ReadyToUse != nil {
|
||||||
in, out := &in.ReadyToUse, &out.ReadyToUse
|
in, out := &in.ReadyToUse, &out.ReadyToUse
|
||||||
@ -319,9 +282,9 @@ func (in *VolumeGroupSnapshotContentStatus) DeepCopyInto(out *VolumeGroupSnapsho
|
|||||||
*out = new(v1.VolumeSnapshotError)
|
*out = new(v1.VolumeSnapshotError)
|
||||||
(*in).DeepCopyInto(*out)
|
(*in).DeepCopyInto(*out)
|
||||||
}
|
}
|
||||||
if in.PVVolumeSnapshotContentList != nil {
|
if in.VolumeSnapshotHandlePairList != nil {
|
||||||
in, out := &in.PVVolumeSnapshotContentList, &out.PVVolumeSnapshotContentList
|
in, out := &in.VolumeSnapshotHandlePairList, &out.VolumeSnapshotHandlePairList
|
||||||
*out = make([]PVVolumeSnapshotContentPair, len(*in))
|
*out = make([]VolumeSnapshotHandlePair, len(*in))
|
||||||
copy(*out, *in)
|
copy(*out, *in)
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
@ -440,11 +403,6 @@ func (in *VolumeGroupSnapshotStatus) DeepCopyInto(out *VolumeGroupSnapshotStatus
|
|||||||
*out = new(v1.VolumeSnapshotError)
|
*out = new(v1.VolumeSnapshotError)
|
||||||
(*in).DeepCopyInto(*out)
|
(*in).DeepCopyInto(*out)
|
||||||
}
|
}
|
||||||
if in.PVCVolumeSnapshotRefList != nil {
|
|
||||||
in, out := &in.PVCVolumeSnapshotRefList, &out.PVCVolumeSnapshotRefList
|
|
||||||
*out = make([]PVCVolumeSnapshotPair, len(*in))
|
|
||||||
copy(*out, *in)
|
|
||||||
}
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -457,3 +415,19 @@ func (in *VolumeGroupSnapshotStatus) DeepCopy() *VolumeGroupSnapshotStatus {
|
|||||||
in.DeepCopyInto(out)
|
in.DeepCopyInto(out)
|
||||||
return 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
|
||||||
|
}
|
@ -19,7 +19,7 @@ limitations under the License.
|
|||||||
package scheme
|
package scheme
|
||||||
|
|
||||||
import (
|
import (
|
||||||
groupsnapshotv1alpha1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1alpha1"
|
groupsnapshotv1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta1"
|
||||||
snapshotv1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumesnapshot/v1"
|
snapshotv1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumesnapshot/v1"
|
||||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
@ -32,7 +32,7 @@ var Scheme = runtime.NewScheme()
|
|||||||
var Codecs = serializer.NewCodecFactory(Scheme)
|
var Codecs = serializer.NewCodecFactory(Scheme)
|
||||||
var ParameterCodec = runtime.NewParameterCodec(Scheme)
|
var ParameterCodec = runtime.NewParameterCodec(Scheme)
|
||||||
var localSchemeBuilder = runtime.SchemeBuilder{
|
var localSchemeBuilder = runtime.SchemeBuilder{
|
||||||
groupsnapshotv1alpha1.AddToScheme,
|
groupsnapshotv1beta1.AddToScheme,
|
||||||
snapshotv1.AddToScheme,
|
snapshotv1.AddToScheme,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -17,4 +17,4 @@ limitations under the License.
|
|||||||
// Code generated by client-gen. DO NOT EDIT.
|
// Code generated by client-gen. DO NOT EDIT.
|
||||||
|
|
||||||
// This package has the automatically generated typed clients.
|
// This package has the automatically generated typed clients.
|
||||||
package v1alpha1
|
package v1beta1
|
@ -16,7 +16,7 @@ limitations under the License.
|
|||||||
|
|
||||||
// Code generated by client-gen. DO NOT EDIT.
|
// Code generated by client-gen. DO NOT EDIT.
|
||||||
|
|
||||||
package v1alpha1
|
package v1beta1
|
||||||
|
|
||||||
type VolumeGroupSnapshotExpansion interface{}
|
type VolumeGroupSnapshotExpansion interface{}
|
||||||
|
|
@ -16,13 +16,13 @@ limitations under the License.
|
|||||||
|
|
||||||
// Code generated by client-gen. DO NOT EDIT.
|
// Code generated by client-gen. DO NOT EDIT.
|
||||||
|
|
||||||
package v1alpha1
|
package v1beta1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
v1alpha1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1alpha1"
|
v1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta1"
|
||||||
scheme "github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/scheme"
|
scheme "github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/scheme"
|
||||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
types "k8s.io/apimachinery/pkg/types"
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
@ -38,15 +38,15 @@ type VolumeGroupSnapshotsGetter interface {
|
|||||||
|
|
||||||
// VolumeGroupSnapshotInterface has methods to work with VolumeGroupSnapshot resources.
|
// VolumeGroupSnapshotInterface has methods to work with VolumeGroupSnapshot resources.
|
||||||
type VolumeGroupSnapshotInterface interface {
|
type VolumeGroupSnapshotInterface interface {
|
||||||
Create(ctx context.Context, volumeGroupSnapshot *v1alpha1.VolumeGroupSnapshot, opts v1.CreateOptions) (*v1alpha1.VolumeGroupSnapshot, error)
|
Create(ctx context.Context, volumeGroupSnapshot *v1beta1.VolumeGroupSnapshot, opts v1.CreateOptions) (*v1beta1.VolumeGroupSnapshot, error)
|
||||||
Update(ctx context.Context, volumeGroupSnapshot *v1alpha1.VolumeGroupSnapshot, opts v1.UpdateOptions) (*v1alpha1.VolumeGroupSnapshot, error)
|
Update(ctx context.Context, volumeGroupSnapshot *v1beta1.VolumeGroupSnapshot, opts v1.UpdateOptions) (*v1beta1.VolumeGroupSnapshot, error)
|
||||||
UpdateStatus(ctx context.Context, volumeGroupSnapshot *v1alpha1.VolumeGroupSnapshot, opts v1.UpdateOptions) (*v1alpha1.VolumeGroupSnapshot, error)
|
UpdateStatus(ctx context.Context, volumeGroupSnapshot *v1beta1.VolumeGroupSnapshot, opts v1.UpdateOptions) (*v1beta1.VolumeGroupSnapshot, error)
|
||||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
||||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.VolumeGroupSnapshot, error)
|
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.VolumeGroupSnapshot, error)
|
||||||
List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.VolumeGroupSnapshotList, error)
|
List(ctx context.Context, opts v1.ListOptions) (*v1beta1.VolumeGroupSnapshotList, error)
|
||||||
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, 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 *v1alpha1.VolumeGroupSnapshot, err error)
|
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.VolumeGroupSnapshot, err error)
|
||||||
VolumeGroupSnapshotExpansion
|
VolumeGroupSnapshotExpansion
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -57,7 +57,7 @@ type volumeGroupSnapshots struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// newVolumeGroupSnapshots returns a VolumeGroupSnapshots
|
// newVolumeGroupSnapshots returns a VolumeGroupSnapshots
|
||||||
func newVolumeGroupSnapshots(c *GroupsnapshotV1alpha1Client, namespace string) *volumeGroupSnapshots {
|
func newVolumeGroupSnapshots(c *GroupsnapshotV1beta1Client, namespace string) *volumeGroupSnapshots {
|
||||||
return &volumeGroupSnapshots{
|
return &volumeGroupSnapshots{
|
||||||
client: c.RESTClient(),
|
client: c.RESTClient(),
|
||||||
ns: namespace,
|
ns: namespace,
|
||||||
@ -65,8 +65,8 @@ func newVolumeGroupSnapshots(c *GroupsnapshotV1alpha1Client, namespace string) *
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Get takes name of the volumeGroupSnapshot, and returns the corresponding volumeGroupSnapshot object, and an error if there is any.
|
// 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 *v1alpha1.VolumeGroupSnapshot, err error) {
|
func (c *volumeGroupSnapshots) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.VolumeGroupSnapshot, err error) {
|
||||||
result = &v1alpha1.VolumeGroupSnapshot{}
|
result = &v1beta1.VolumeGroupSnapshot{}
|
||||||
err = c.client.Get().
|
err = c.client.Get().
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("volumegroupsnapshots").
|
Resource("volumegroupsnapshots").
|
||||||
@ -78,12 +78,12 @@ func (c *volumeGroupSnapshots) Get(ctx context.Context, name string, options v1.
|
|||||||
}
|
}
|
||||||
|
|
||||||
// List takes label and field selectors, and returns the list of VolumeGroupSnapshots that match those selectors.
|
// 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 *v1alpha1.VolumeGroupSnapshotList, err error) {
|
func (c *volumeGroupSnapshots) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.VolumeGroupSnapshotList, err error) {
|
||||||
var timeout time.Duration
|
var timeout time.Duration
|
||||||
if opts.TimeoutSeconds != nil {
|
if opts.TimeoutSeconds != nil {
|
||||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||||
}
|
}
|
||||||
result = &v1alpha1.VolumeGroupSnapshotList{}
|
result = &v1beta1.VolumeGroupSnapshotList{}
|
||||||
err = c.client.Get().
|
err = c.client.Get().
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("volumegroupsnapshots").
|
Resource("volumegroupsnapshots").
|
||||||
@ -110,8 +110,8 @@ func (c *volumeGroupSnapshots) Watch(ctx context.Context, opts v1.ListOptions) (
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 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.
|
// 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 *v1alpha1.VolumeGroupSnapshot, opts v1.CreateOptions) (result *v1alpha1.VolumeGroupSnapshot, err error) {
|
func (c *volumeGroupSnapshots) Create(ctx context.Context, volumeGroupSnapshot *v1beta1.VolumeGroupSnapshot, opts v1.CreateOptions) (result *v1beta1.VolumeGroupSnapshot, err error) {
|
||||||
result = &v1alpha1.VolumeGroupSnapshot{}
|
result = &v1beta1.VolumeGroupSnapshot{}
|
||||||
err = c.client.Post().
|
err = c.client.Post().
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("volumegroupsnapshots").
|
Resource("volumegroupsnapshots").
|
||||||
@ -123,8 +123,8 @@ func (c *volumeGroupSnapshots) Create(ctx context.Context, volumeGroupSnapshot *
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 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.
|
// 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 *v1alpha1.VolumeGroupSnapshot, opts v1.UpdateOptions) (result *v1alpha1.VolumeGroupSnapshot, err error) {
|
func (c *volumeGroupSnapshots) Update(ctx context.Context, volumeGroupSnapshot *v1beta1.VolumeGroupSnapshot, opts v1.UpdateOptions) (result *v1beta1.VolumeGroupSnapshot, err error) {
|
||||||
result = &v1alpha1.VolumeGroupSnapshot{}
|
result = &v1beta1.VolumeGroupSnapshot{}
|
||||||
err = c.client.Put().
|
err = c.client.Put().
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("volumegroupsnapshots").
|
Resource("volumegroupsnapshots").
|
||||||
@ -138,8 +138,8 @@ func (c *volumeGroupSnapshots) Update(ctx context.Context, volumeGroupSnapshot *
|
|||||||
|
|
||||||
// UpdateStatus was generated because the type contains a Status member.
|
// UpdateStatus was generated because the type contains a Status member.
|
||||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||||
func (c *volumeGroupSnapshots) UpdateStatus(ctx context.Context, volumeGroupSnapshot *v1alpha1.VolumeGroupSnapshot, opts v1.UpdateOptions) (result *v1alpha1.VolumeGroupSnapshot, err error) {
|
func (c *volumeGroupSnapshots) UpdateStatus(ctx context.Context, volumeGroupSnapshot *v1beta1.VolumeGroupSnapshot, opts v1.UpdateOptions) (result *v1beta1.VolumeGroupSnapshot, err error) {
|
||||||
result = &v1alpha1.VolumeGroupSnapshot{}
|
result = &v1beta1.VolumeGroupSnapshot{}
|
||||||
err = c.client.Put().
|
err = c.client.Put().
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("volumegroupsnapshots").
|
Resource("volumegroupsnapshots").
|
||||||
@ -180,8 +180,8 @@ func (c *volumeGroupSnapshots) DeleteCollection(ctx context.Context, opts v1.Del
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Patch applies the patch and returns the patched volumeGroupSnapshot.
|
// 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 *v1alpha1.VolumeGroupSnapshot, err error) {
|
func (c *volumeGroupSnapshots) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.VolumeGroupSnapshot, err error) {
|
||||||
result = &v1alpha1.VolumeGroupSnapshot{}
|
result = &v1beta1.VolumeGroupSnapshot{}
|
||||||
err = c.client.Patch(pt).
|
err = c.client.Patch(pt).
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("volumegroupsnapshots").
|
Resource("volumegroupsnapshots").
|
@ -16,44 +16,44 @@ limitations under the License.
|
|||||||
|
|
||||||
// Code generated by client-gen. DO NOT EDIT.
|
// Code generated by client-gen. DO NOT EDIT.
|
||||||
|
|
||||||
package v1alpha1
|
package v1beta1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
v1alpha1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1alpha1"
|
v1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta1"
|
||||||
"github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/scheme"
|
"github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/scheme"
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
)
|
)
|
||||||
|
|
||||||
type GroupsnapshotV1alpha1Interface interface {
|
type GroupsnapshotV1beta1Interface interface {
|
||||||
RESTClient() rest.Interface
|
RESTClient() rest.Interface
|
||||||
VolumeGroupSnapshotsGetter
|
VolumeGroupSnapshotsGetter
|
||||||
VolumeGroupSnapshotClassesGetter
|
VolumeGroupSnapshotClassesGetter
|
||||||
VolumeGroupSnapshotContentsGetter
|
VolumeGroupSnapshotContentsGetter
|
||||||
}
|
}
|
||||||
|
|
||||||
// GroupsnapshotV1alpha1Client is used to interact with features provided by the groupsnapshot.storage.k8s.io group.
|
// GroupsnapshotV1beta1Client is used to interact with features provided by the groupsnapshot.storage.k8s.io group.
|
||||||
type GroupsnapshotV1alpha1Client struct {
|
type GroupsnapshotV1beta1Client struct {
|
||||||
restClient rest.Interface
|
restClient rest.Interface
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *GroupsnapshotV1alpha1Client) VolumeGroupSnapshots(namespace string) VolumeGroupSnapshotInterface {
|
func (c *GroupsnapshotV1beta1Client) VolumeGroupSnapshots(namespace string) VolumeGroupSnapshotInterface {
|
||||||
return newVolumeGroupSnapshots(c, namespace)
|
return newVolumeGroupSnapshots(c, namespace)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *GroupsnapshotV1alpha1Client) VolumeGroupSnapshotClasses() VolumeGroupSnapshotClassInterface {
|
func (c *GroupsnapshotV1beta1Client) VolumeGroupSnapshotClasses() VolumeGroupSnapshotClassInterface {
|
||||||
return newVolumeGroupSnapshotClasses(c)
|
return newVolumeGroupSnapshotClasses(c)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *GroupsnapshotV1alpha1Client) VolumeGroupSnapshotContents() VolumeGroupSnapshotContentInterface {
|
func (c *GroupsnapshotV1beta1Client) VolumeGroupSnapshotContents() VolumeGroupSnapshotContentInterface {
|
||||||
return newVolumeGroupSnapshotContents(c)
|
return newVolumeGroupSnapshotContents(c)
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewForConfig creates a new GroupsnapshotV1alpha1Client for the given config.
|
// NewForConfig creates a new GroupsnapshotV1beta1Client for the given config.
|
||||||
// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient),
|
// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient),
|
||||||
// where httpClient was generated with rest.HTTPClientFor(c).
|
// where httpClient was generated with rest.HTTPClientFor(c).
|
||||||
func NewForConfig(c *rest.Config) (*GroupsnapshotV1alpha1Client, error) {
|
func NewForConfig(c *rest.Config) (*GroupsnapshotV1beta1Client, error) {
|
||||||
config := *c
|
config := *c
|
||||||
if err := setConfigDefaults(&config); err != nil {
|
if err := setConfigDefaults(&config); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
@ -65,9 +65,9 @@ func NewForConfig(c *rest.Config) (*GroupsnapshotV1alpha1Client, error) {
|
|||||||
return NewForConfigAndClient(&config, httpClient)
|
return NewForConfigAndClient(&config, httpClient)
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewForConfigAndClient creates a new GroupsnapshotV1alpha1Client for the given config and http client.
|
// NewForConfigAndClient creates a new GroupsnapshotV1beta1Client for the given config and http client.
|
||||||
// Note the http client provided takes precedence over the configured transport values.
|
// Note the http client provided takes precedence over the configured transport values.
|
||||||
func NewForConfigAndClient(c *rest.Config, h *http.Client) (*GroupsnapshotV1alpha1Client, error) {
|
func NewForConfigAndClient(c *rest.Config, h *http.Client) (*GroupsnapshotV1beta1Client, error) {
|
||||||
config := *c
|
config := *c
|
||||||
if err := setConfigDefaults(&config); err != nil {
|
if err := setConfigDefaults(&config); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
@ -76,12 +76,12 @@ func NewForConfigAndClient(c *rest.Config, h *http.Client) (*GroupsnapshotV1alph
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return &GroupsnapshotV1alpha1Client{client}, nil
|
return &GroupsnapshotV1beta1Client{client}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewForConfigOrDie creates a new GroupsnapshotV1alpha1Client for the given config and
|
// NewForConfigOrDie creates a new GroupsnapshotV1beta1Client for the given config and
|
||||||
// panics if there is an error in the config.
|
// panics if there is an error in the config.
|
||||||
func NewForConfigOrDie(c *rest.Config) *GroupsnapshotV1alpha1Client {
|
func NewForConfigOrDie(c *rest.Config) *GroupsnapshotV1beta1Client {
|
||||||
client, err := NewForConfig(c)
|
client, err := NewForConfig(c)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
@ -89,13 +89,13 @@ func NewForConfigOrDie(c *rest.Config) *GroupsnapshotV1alpha1Client {
|
|||||||
return client
|
return client
|
||||||
}
|
}
|
||||||
|
|
||||||
// New creates a new GroupsnapshotV1alpha1Client for the given RESTClient.
|
// New creates a new GroupsnapshotV1beta1Client for the given RESTClient.
|
||||||
func New(c rest.Interface) *GroupsnapshotV1alpha1Client {
|
func New(c rest.Interface) *GroupsnapshotV1beta1Client {
|
||||||
return &GroupsnapshotV1alpha1Client{c}
|
return &GroupsnapshotV1beta1Client{c}
|
||||||
}
|
}
|
||||||
|
|
||||||
func setConfigDefaults(config *rest.Config) error {
|
func setConfigDefaults(config *rest.Config) error {
|
||||||
gv := v1alpha1.SchemeGroupVersion
|
gv := v1beta1.SchemeGroupVersion
|
||||||
config.GroupVersion = &gv
|
config.GroupVersion = &gv
|
||||||
config.APIPath = "/apis"
|
config.APIPath = "/apis"
|
||||||
config.NegotiatedSerializer = scheme.Codecs.WithoutConversion()
|
config.NegotiatedSerializer = scheme.Codecs.WithoutConversion()
|
||||||
@ -109,7 +109,7 @@ func setConfigDefaults(config *rest.Config) error {
|
|||||||
|
|
||||||
// RESTClient returns a RESTClient that is used to communicate
|
// RESTClient returns a RESTClient that is used to communicate
|
||||||
// with API server by this client implementation.
|
// with API server by this client implementation.
|
||||||
func (c *GroupsnapshotV1alpha1Client) RESTClient() rest.Interface {
|
func (c *GroupsnapshotV1beta1Client) RESTClient() rest.Interface {
|
||||||
if c == nil {
|
if c == nil {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
@ -16,13 +16,13 @@ limitations under the License.
|
|||||||
|
|
||||||
// Code generated by client-gen. DO NOT EDIT.
|
// Code generated by client-gen. DO NOT EDIT.
|
||||||
|
|
||||||
package v1alpha1
|
package v1beta1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
v1alpha1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1alpha1"
|
v1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta1"
|
||||||
scheme "github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/scheme"
|
scheme "github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/scheme"
|
||||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
types "k8s.io/apimachinery/pkg/types"
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
@ -38,14 +38,14 @@ type VolumeGroupSnapshotClassesGetter interface {
|
|||||||
|
|
||||||
// VolumeGroupSnapshotClassInterface has methods to work with VolumeGroupSnapshotClass resources.
|
// VolumeGroupSnapshotClassInterface has methods to work with VolumeGroupSnapshotClass resources.
|
||||||
type VolumeGroupSnapshotClassInterface interface {
|
type VolumeGroupSnapshotClassInterface interface {
|
||||||
Create(ctx context.Context, volumeGroupSnapshotClass *v1alpha1.VolumeGroupSnapshotClass, opts v1.CreateOptions) (*v1alpha1.VolumeGroupSnapshotClass, error)
|
Create(ctx context.Context, volumeGroupSnapshotClass *v1beta1.VolumeGroupSnapshotClass, opts v1.CreateOptions) (*v1beta1.VolumeGroupSnapshotClass, error)
|
||||||
Update(ctx context.Context, volumeGroupSnapshotClass *v1alpha1.VolumeGroupSnapshotClass, opts v1.UpdateOptions) (*v1alpha1.VolumeGroupSnapshotClass, error)
|
Update(ctx context.Context, volumeGroupSnapshotClass *v1beta1.VolumeGroupSnapshotClass, opts v1.UpdateOptions) (*v1beta1.VolumeGroupSnapshotClass, error)
|
||||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
||||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.VolumeGroupSnapshotClass, error)
|
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.VolumeGroupSnapshotClass, error)
|
||||||
List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.VolumeGroupSnapshotClassList, error)
|
List(ctx context.Context, opts v1.ListOptions) (*v1beta1.VolumeGroupSnapshotClassList, error)
|
||||||
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, 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 *v1alpha1.VolumeGroupSnapshotClass, err error)
|
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.VolumeGroupSnapshotClass, err error)
|
||||||
VolumeGroupSnapshotClassExpansion
|
VolumeGroupSnapshotClassExpansion
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -55,15 +55,15 @@ type volumeGroupSnapshotClasses struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// newVolumeGroupSnapshotClasses returns a VolumeGroupSnapshotClasses
|
// newVolumeGroupSnapshotClasses returns a VolumeGroupSnapshotClasses
|
||||||
func newVolumeGroupSnapshotClasses(c *GroupsnapshotV1alpha1Client) *volumeGroupSnapshotClasses {
|
func newVolumeGroupSnapshotClasses(c *GroupsnapshotV1beta1Client) *volumeGroupSnapshotClasses {
|
||||||
return &volumeGroupSnapshotClasses{
|
return &volumeGroupSnapshotClasses{
|
||||||
client: c.RESTClient(),
|
client: c.RESTClient(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get takes name of the volumeGroupSnapshotClass, and returns the corresponding volumeGroupSnapshotClass object, and an error if there is any.
|
// 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 *v1alpha1.VolumeGroupSnapshotClass, err error) {
|
func (c *volumeGroupSnapshotClasses) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.VolumeGroupSnapshotClass, err error) {
|
||||||
result = &v1alpha1.VolumeGroupSnapshotClass{}
|
result = &v1beta1.VolumeGroupSnapshotClass{}
|
||||||
err = c.client.Get().
|
err = c.client.Get().
|
||||||
Resource("volumegroupsnapshotclasses").
|
Resource("volumegroupsnapshotclasses").
|
||||||
Name(name).
|
Name(name).
|
||||||
@ -74,12 +74,12 @@ func (c *volumeGroupSnapshotClasses) Get(ctx context.Context, name string, optio
|
|||||||
}
|
}
|
||||||
|
|
||||||
// List takes label and field selectors, and returns the list of VolumeGroupSnapshotClasses that match those selectors.
|
// 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 *v1alpha1.VolumeGroupSnapshotClassList, err error) {
|
func (c *volumeGroupSnapshotClasses) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.VolumeGroupSnapshotClassList, err error) {
|
||||||
var timeout time.Duration
|
var timeout time.Duration
|
||||||
if opts.TimeoutSeconds != nil {
|
if opts.TimeoutSeconds != nil {
|
||||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||||
}
|
}
|
||||||
result = &v1alpha1.VolumeGroupSnapshotClassList{}
|
result = &v1beta1.VolumeGroupSnapshotClassList{}
|
||||||
err = c.client.Get().
|
err = c.client.Get().
|
||||||
Resource("volumegroupsnapshotclasses").
|
Resource("volumegroupsnapshotclasses").
|
||||||
VersionedParams(&opts, scheme.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
@ -104,8 +104,8 @@ func (c *volumeGroupSnapshotClasses) Watch(ctx context.Context, opts v1.ListOpti
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 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.
|
// 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 *v1alpha1.VolumeGroupSnapshotClass, opts v1.CreateOptions) (result *v1alpha1.VolumeGroupSnapshotClass, err error) {
|
func (c *volumeGroupSnapshotClasses) Create(ctx context.Context, volumeGroupSnapshotClass *v1beta1.VolumeGroupSnapshotClass, opts v1.CreateOptions) (result *v1beta1.VolumeGroupSnapshotClass, err error) {
|
||||||
result = &v1alpha1.VolumeGroupSnapshotClass{}
|
result = &v1beta1.VolumeGroupSnapshotClass{}
|
||||||
err = c.client.Post().
|
err = c.client.Post().
|
||||||
Resource("volumegroupsnapshotclasses").
|
Resource("volumegroupsnapshotclasses").
|
||||||
VersionedParams(&opts, scheme.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
@ -116,8 +116,8 @@ func (c *volumeGroupSnapshotClasses) Create(ctx context.Context, volumeGroupSnap
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 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.
|
// 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 *v1alpha1.VolumeGroupSnapshotClass, opts v1.UpdateOptions) (result *v1alpha1.VolumeGroupSnapshotClass, err error) {
|
func (c *volumeGroupSnapshotClasses) Update(ctx context.Context, volumeGroupSnapshotClass *v1beta1.VolumeGroupSnapshotClass, opts v1.UpdateOptions) (result *v1beta1.VolumeGroupSnapshotClass, err error) {
|
||||||
result = &v1alpha1.VolumeGroupSnapshotClass{}
|
result = &v1beta1.VolumeGroupSnapshotClass{}
|
||||||
err = c.client.Put().
|
err = c.client.Put().
|
||||||
Resource("volumegroupsnapshotclasses").
|
Resource("volumegroupsnapshotclasses").
|
||||||
Name(volumeGroupSnapshotClass.Name).
|
Name(volumeGroupSnapshotClass.Name).
|
||||||
@ -154,8 +154,8 @@ func (c *volumeGroupSnapshotClasses) DeleteCollection(ctx context.Context, opts
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Patch applies the patch and returns the patched volumeGroupSnapshotClass.
|
// 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 *v1alpha1.VolumeGroupSnapshotClass, err error) {
|
func (c *volumeGroupSnapshotClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.VolumeGroupSnapshotClass, err error) {
|
||||||
result = &v1alpha1.VolumeGroupSnapshotClass{}
|
result = &v1beta1.VolumeGroupSnapshotClass{}
|
||||||
err = c.client.Patch(pt).
|
err = c.client.Patch(pt).
|
||||||
Resource("volumegroupsnapshotclasses").
|
Resource("volumegroupsnapshotclasses").
|
||||||
Name(name).
|
Name(name).
|
@ -16,13 +16,13 @@ limitations under the License.
|
|||||||
|
|
||||||
// Code generated by client-gen. DO NOT EDIT.
|
// Code generated by client-gen. DO NOT EDIT.
|
||||||
|
|
||||||
package v1alpha1
|
package v1beta1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
v1alpha1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1alpha1"
|
v1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta1"
|
||||||
scheme "github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/scheme"
|
scheme "github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/scheme"
|
||||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
types "k8s.io/apimachinery/pkg/types"
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
@ -38,15 +38,15 @@ type VolumeGroupSnapshotContentsGetter interface {
|
|||||||
|
|
||||||
// VolumeGroupSnapshotContentInterface has methods to work with VolumeGroupSnapshotContent resources.
|
// VolumeGroupSnapshotContentInterface has methods to work with VolumeGroupSnapshotContent resources.
|
||||||
type VolumeGroupSnapshotContentInterface interface {
|
type VolumeGroupSnapshotContentInterface interface {
|
||||||
Create(ctx context.Context, volumeGroupSnapshotContent *v1alpha1.VolumeGroupSnapshotContent, opts v1.CreateOptions) (*v1alpha1.VolumeGroupSnapshotContent, error)
|
Create(ctx context.Context, volumeGroupSnapshotContent *v1beta1.VolumeGroupSnapshotContent, opts v1.CreateOptions) (*v1beta1.VolumeGroupSnapshotContent, error)
|
||||||
Update(ctx context.Context, volumeGroupSnapshotContent *v1alpha1.VolumeGroupSnapshotContent, opts v1.UpdateOptions) (*v1alpha1.VolumeGroupSnapshotContent, error)
|
Update(ctx context.Context, volumeGroupSnapshotContent *v1beta1.VolumeGroupSnapshotContent, opts v1.UpdateOptions) (*v1beta1.VolumeGroupSnapshotContent, error)
|
||||||
UpdateStatus(ctx context.Context, volumeGroupSnapshotContent *v1alpha1.VolumeGroupSnapshotContent, opts v1.UpdateOptions) (*v1alpha1.VolumeGroupSnapshotContent, error)
|
UpdateStatus(ctx context.Context, volumeGroupSnapshotContent *v1beta1.VolumeGroupSnapshotContent, opts v1.UpdateOptions) (*v1beta1.VolumeGroupSnapshotContent, error)
|
||||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
||||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.VolumeGroupSnapshotContent, error)
|
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.VolumeGroupSnapshotContent, error)
|
||||||
List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.VolumeGroupSnapshotContentList, error)
|
List(ctx context.Context, opts v1.ListOptions) (*v1beta1.VolumeGroupSnapshotContentList, error)
|
||||||
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, 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 *v1alpha1.VolumeGroupSnapshotContent, err error)
|
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.VolumeGroupSnapshotContent, err error)
|
||||||
VolumeGroupSnapshotContentExpansion
|
VolumeGroupSnapshotContentExpansion
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -56,15 +56,15 @@ type volumeGroupSnapshotContents struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// newVolumeGroupSnapshotContents returns a VolumeGroupSnapshotContents
|
// newVolumeGroupSnapshotContents returns a VolumeGroupSnapshotContents
|
||||||
func newVolumeGroupSnapshotContents(c *GroupsnapshotV1alpha1Client) *volumeGroupSnapshotContents {
|
func newVolumeGroupSnapshotContents(c *GroupsnapshotV1beta1Client) *volumeGroupSnapshotContents {
|
||||||
return &volumeGroupSnapshotContents{
|
return &volumeGroupSnapshotContents{
|
||||||
client: c.RESTClient(),
|
client: c.RESTClient(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get takes name of the volumeGroupSnapshotContent, and returns the corresponding volumeGroupSnapshotContent object, and an error if there is any.
|
// 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 *v1alpha1.VolumeGroupSnapshotContent, err error) {
|
func (c *volumeGroupSnapshotContents) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.VolumeGroupSnapshotContent, err error) {
|
||||||
result = &v1alpha1.VolumeGroupSnapshotContent{}
|
result = &v1beta1.VolumeGroupSnapshotContent{}
|
||||||
err = c.client.Get().
|
err = c.client.Get().
|
||||||
Resource("volumegroupsnapshotcontents").
|
Resource("volumegroupsnapshotcontents").
|
||||||
Name(name).
|
Name(name).
|
||||||
@ -75,12 +75,12 @@ func (c *volumeGroupSnapshotContents) Get(ctx context.Context, name string, opti
|
|||||||
}
|
}
|
||||||
|
|
||||||
// List takes label and field selectors, and returns the list of VolumeGroupSnapshotContents that match those selectors.
|
// 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 *v1alpha1.VolumeGroupSnapshotContentList, err error) {
|
func (c *volumeGroupSnapshotContents) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.VolumeGroupSnapshotContentList, err error) {
|
||||||
var timeout time.Duration
|
var timeout time.Duration
|
||||||
if opts.TimeoutSeconds != nil {
|
if opts.TimeoutSeconds != nil {
|
||||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||||
}
|
}
|
||||||
result = &v1alpha1.VolumeGroupSnapshotContentList{}
|
result = &v1beta1.VolumeGroupSnapshotContentList{}
|
||||||
err = c.client.Get().
|
err = c.client.Get().
|
||||||
Resource("volumegroupsnapshotcontents").
|
Resource("volumegroupsnapshotcontents").
|
||||||
VersionedParams(&opts, scheme.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
@ -105,8 +105,8 @@ func (c *volumeGroupSnapshotContents) Watch(ctx context.Context, opts v1.ListOpt
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 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.
|
// 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 *v1alpha1.VolumeGroupSnapshotContent, opts v1.CreateOptions) (result *v1alpha1.VolumeGroupSnapshotContent, err error) {
|
func (c *volumeGroupSnapshotContents) Create(ctx context.Context, volumeGroupSnapshotContent *v1beta1.VolumeGroupSnapshotContent, opts v1.CreateOptions) (result *v1beta1.VolumeGroupSnapshotContent, err error) {
|
||||||
result = &v1alpha1.VolumeGroupSnapshotContent{}
|
result = &v1beta1.VolumeGroupSnapshotContent{}
|
||||||
err = c.client.Post().
|
err = c.client.Post().
|
||||||
Resource("volumegroupsnapshotcontents").
|
Resource("volumegroupsnapshotcontents").
|
||||||
VersionedParams(&opts, scheme.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
@ -117,8 +117,8 @@ func (c *volumeGroupSnapshotContents) Create(ctx context.Context, volumeGroupSna
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 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.
|
// 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 *v1alpha1.VolumeGroupSnapshotContent, opts v1.UpdateOptions) (result *v1alpha1.VolumeGroupSnapshotContent, err error) {
|
func (c *volumeGroupSnapshotContents) Update(ctx context.Context, volumeGroupSnapshotContent *v1beta1.VolumeGroupSnapshotContent, opts v1.UpdateOptions) (result *v1beta1.VolumeGroupSnapshotContent, err error) {
|
||||||
result = &v1alpha1.VolumeGroupSnapshotContent{}
|
result = &v1beta1.VolumeGroupSnapshotContent{}
|
||||||
err = c.client.Put().
|
err = c.client.Put().
|
||||||
Resource("volumegroupsnapshotcontents").
|
Resource("volumegroupsnapshotcontents").
|
||||||
Name(volumeGroupSnapshotContent.Name).
|
Name(volumeGroupSnapshotContent.Name).
|
||||||
@ -131,8 +131,8 @@ func (c *volumeGroupSnapshotContents) Update(ctx context.Context, volumeGroupSna
|
|||||||
|
|
||||||
// UpdateStatus was generated because the type contains a Status member.
|
// UpdateStatus was generated because the type contains a Status member.
|
||||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||||
func (c *volumeGroupSnapshotContents) UpdateStatus(ctx context.Context, volumeGroupSnapshotContent *v1alpha1.VolumeGroupSnapshotContent, opts v1.UpdateOptions) (result *v1alpha1.VolumeGroupSnapshotContent, err error) {
|
func (c *volumeGroupSnapshotContents) UpdateStatus(ctx context.Context, volumeGroupSnapshotContent *v1beta1.VolumeGroupSnapshotContent, opts v1.UpdateOptions) (result *v1beta1.VolumeGroupSnapshotContent, err error) {
|
||||||
result = &v1alpha1.VolumeGroupSnapshotContent{}
|
result = &v1beta1.VolumeGroupSnapshotContent{}
|
||||||
err = c.client.Put().
|
err = c.client.Put().
|
||||||
Resource("volumegroupsnapshotcontents").
|
Resource("volumegroupsnapshotcontents").
|
||||||
Name(volumeGroupSnapshotContent.Name).
|
Name(volumeGroupSnapshotContent.Name).
|
||||||
@ -170,8 +170,8 @@ func (c *volumeGroupSnapshotContents) DeleteCollection(ctx context.Context, opts
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Patch applies the patch and returns the patched volumeGroupSnapshotContent.
|
// 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 *v1alpha1.VolumeGroupSnapshotContent, err error) {
|
func (c *volumeGroupSnapshotContents) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.VolumeGroupSnapshotContent, err error) {
|
||||||
result = &v1alpha1.VolumeGroupSnapshotContent{}
|
result = &v1beta1.VolumeGroupSnapshotContent{}
|
||||||
err = c.client.Patch(pt).
|
err = c.client.Patch(pt).
|
||||||
Resource("volumegroupsnapshotcontents").
|
Resource("volumegroupsnapshotcontents").
|
||||||
Name(name).
|
Name(name).
|
6
vendor/modules.txt
vendored
6
vendor/modules.txt
vendored
@ -470,12 +470,12 @@ github.com/kubernetes-csi/csi-lib-utils/connection
|
|||||||
github.com/kubernetes-csi/csi-lib-utils/metrics
|
github.com/kubernetes-csi/csi-lib-utils/metrics
|
||||||
github.com/kubernetes-csi/csi-lib-utils/protosanitizer
|
github.com/kubernetes-csi/csi-lib-utils/protosanitizer
|
||||||
github.com/kubernetes-csi/csi-lib-utils/rpc
|
github.com/kubernetes-csi/csi-lib-utils/rpc
|
||||||
# github.com/kubernetes-csi/external-snapshotter/client/v8 v8.0.0
|
# github.com/kubernetes-csi/external-snapshotter/client/v8 v8.2.0
|
||||||
## explicit; go 1.22.0
|
## explicit; go 1.22.0
|
||||||
github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1alpha1
|
github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta1
|
||||||
github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumesnapshot/v1
|
github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumesnapshot/v1
|
||||||
github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/scheme
|
github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/scheme
|
||||||
github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1alpha1
|
github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1
|
||||||
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
|
||||||
# github.com/kylelemons/godebug v1.1.0
|
# github.com/kylelemons/godebug v1.1.0
|
||||||
## explicit; go 1.11
|
## explicit; go 1.11
|
||||||
|
Loading…
Reference in New Issue
Block a user