diff --git a/client/apis/volumegroupsnapshot/v1alpha1/doc.go b/client/apis/volumegroupsnapshot/v1beta1/doc.go similarity index 97% rename from client/apis/volumegroupsnapshot/v1alpha1/doc.go rename to client/apis/volumegroupsnapshot/v1beta1/doc.go index f3b8d19ef..f2fdf6b8b 100644 --- a/client/apis/volumegroupsnapshot/v1alpha1/doc.go +++ b/client/apis/volumegroupsnapshot/v1beta1/doc.go @@ -17,4 +17,4 @@ limitations under the License. // +k8s:deepcopy-gen=package // +groupName=groupsnapshot.storage.k8s.io -package v1alpha1 +package v1beta1 diff --git a/client/apis/volumegroupsnapshot/v1alpha1/register.go b/client/apis/volumegroupsnapshot/v1beta1/register.go similarity index 98% rename from client/apis/volumegroupsnapshot/v1alpha1/register.go rename to client/apis/volumegroupsnapshot/v1beta1/register.go index 42b82aaee..22cebf945 100644 --- a/client/apis/volumegroupsnapshot/v1alpha1/register.go +++ b/client/apis/volumegroupsnapshot/v1beta1/register.go @@ -11,7 +11,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha1 +package v1beta1 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -28,7 +28,7 @@ var ( // AddToScheme adds to scheme AddToScheme = SchemeBuilder.AddToScheme // 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 { diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1alpha1/types.go b/client/apis/volumegroupsnapshot/v1beta1/types.go similarity index 99% rename from vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1alpha1/types.go rename to client/apis/volumegroupsnapshot/v1beta1/types.go index c620440d2..909789cae 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1alpha1/types.go +++ b/client/apis/volumegroupsnapshot/v1beta1/types.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ // +kubebuilder:object:generate=true -package v1alpha1 +package v1beta1 import ( core_v1 "k8s.io/api/core/v1" diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1alpha1/zz_generated.deepcopy.go b/client/apis/volumegroupsnapshot/v1beta1/zz_generated.deepcopy.go similarity index 99% rename from vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1alpha1/zz_generated.deepcopy.go rename to client/apis/volumegroupsnapshot/v1beta1/zz_generated.deepcopy.go index 82895edea..966ac4559 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1alpha1/zz_generated.deepcopy.go +++ b/client/apis/volumegroupsnapshot/v1beta1/zz_generated.deepcopy.go @@ -19,7 +19,7 @@ limitations under the License. // Code generated by deepcopy-gen. DO NOT EDIT. -package v1alpha1 +package v1beta1 import ( v1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumesnapshot/v1" diff --git a/client/clientset/versioned/clientset.go b/client/clientset/versioned/clientset.go index f4e8bf3d0..050de3b87 100644 --- a/client/clientset/versioned/clientset.go +++ b/client/clientset/versioned/clientset.go @@ -22,7 +22,7 @@ import ( "fmt" "net/http" - groupsnapshotv1alpha1 "github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1alpha1" + groupsnapshotv1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1" 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" @@ -31,20 +31,20 @@ import ( type Interface interface { Discovery() discovery.DiscoveryInterface - GroupsnapshotV1alpha1() groupsnapshotv1alpha1.GroupsnapshotV1alpha1Interface + GroupsnapshotV1beta1() groupsnapshotv1beta1.GroupsnapshotV1beta1Interface SnapshotV1() snapshotv1.SnapshotV1Interface } // Clientset contains the clients for groups. type Clientset struct { *discovery.DiscoveryClient - groupsnapshotV1alpha1 *groupsnapshotv1alpha1.GroupsnapshotV1alpha1Client - snapshotV1 *snapshotv1.SnapshotV1Client + groupsnapshotV1beta1 *groupsnapshotv1beta1.GroupsnapshotV1beta1Client + snapshotV1 *snapshotv1.SnapshotV1Client } -// GroupsnapshotV1alpha1 retrieves the GroupsnapshotV1alpha1Client -func (c *Clientset) GroupsnapshotV1alpha1() groupsnapshotv1alpha1.GroupsnapshotV1alpha1Interface { - return c.groupsnapshotV1alpha1 +// GroupsnapshotV1beta1 retrieves the GroupsnapshotV1beta1Client +func (c *Clientset) GroupsnapshotV1beta1() groupsnapshotv1beta1.GroupsnapshotV1beta1Interface { + return c.groupsnapshotV1beta1 } // SnapshotV1 retrieves the SnapshotV1Client @@ -96,7 +96,7 @@ func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset, var cs Clientset var err error - cs.groupsnapshotV1alpha1, err = groupsnapshotv1alpha1.NewForConfigAndClient(&configShallowCopy, httpClient) + cs.groupsnapshotV1beta1, err = groupsnapshotv1beta1.NewForConfigAndClient(&configShallowCopy, httpClient) if err != nil { return nil, err } @@ -125,7 +125,7 @@ func NewForConfigOrDie(c *rest.Config) *Clientset { // New creates a new Clientset for the given RESTClient. func New(c rest.Interface) *Clientset { var cs Clientset - cs.groupsnapshotV1alpha1 = groupsnapshotv1alpha1.New(c) + cs.groupsnapshotV1beta1 = groupsnapshotv1beta1.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 4a6f63b23..637c89f34 100644 --- a/client/clientset/versioned/fake/clientset_generated.go +++ b/client/clientset/versioned/fake/clientset_generated.go @@ -20,8 +20,8 @@ package fake import ( clientset "github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned" - groupsnapshotv1alpha1 "github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1alpha1" - fakegroupsnapshotv1alpha1 "github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/fake" + 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" 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" @@ -81,9 +81,9 @@ var ( _ testing.FakeClient = &Clientset{} ) -// GroupsnapshotV1alpha1 retrieves the GroupsnapshotV1alpha1Client -func (c *Clientset) GroupsnapshotV1alpha1() groupsnapshotv1alpha1.GroupsnapshotV1alpha1Interface { - return &fakegroupsnapshotv1alpha1.FakeGroupsnapshotV1alpha1{Fake: &c.Fake} +// GroupsnapshotV1beta1 retrieves the GroupsnapshotV1beta1Client +func (c *Clientset) GroupsnapshotV1beta1() groupsnapshotv1beta1.GroupsnapshotV1beta1Interface { + return &fakegroupsnapshotv1beta1.FakeGroupsnapshotV1beta1{Fake: &c.Fake} } // SnapshotV1 retrieves the SnapshotV1Client diff --git a/client/clientset/versioned/fake/register.go b/client/clientset/versioned/fake/register.go index bb5a6212c..c1e1e26d0 100644 --- a/client/clientset/versioned/fake/register.go +++ b/client/clientset/versioned/fake/register.go @@ -19,7 +19,7 @@ limitations under the License. package fake 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" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" @@ -32,7 +32,7 @@ var scheme = runtime.NewScheme() var codecs = serializer.NewCodecFactory(scheme) var localSchemeBuilder = runtime.SchemeBuilder{ - groupsnapshotv1alpha1.AddToScheme, + groupsnapshotv1beta1.AddToScheme, snapshotv1.AddToScheme, } diff --git a/client/clientset/versioned/scheme/register.go b/client/clientset/versioned/scheme/register.go index 7ecf08084..6f8c4fdf0 100644 --- a/client/clientset/versioned/scheme/register.go +++ b/client/clientset/versioned/scheme/register.go @@ -19,7 +19,7 @@ limitations under the License. package scheme 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" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" @@ -32,7 +32,7 @@ var Scheme = runtime.NewScheme() var Codecs = serializer.NewCodecFactory(Scheme) var ParameterCodec = runtime.NewParameterCodec(Scheme) var localSchemeBuilder = runtime.SchemeBuilder{ - groupsnapshotv1alpha1.AddToScheme, + groupsnapshotv1beta1.AddToScheme, snapshotv1.AddToScheme, } diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/doc.go b/client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/doc.go similarity index 97% rename from vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/doc.go rename to client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/doc.go index ecc546221..c70a3f531 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/doc.go +++ b/client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/doc.go @@ -17,4 +17,4 @@ limitations under the License. // Code generated by client-gen. DO NOT EDIT. // This package has the automatically generated typed clients. -package v1alpha1 +package v1beta1 diff --git a/client/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/fake/doc.go b/client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/doc.go similarity index 100% rename from client/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/fake/doc.go rename to client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/doc.go diff --git a/client/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/fake/fake_volumegroupsnapshot.go b/client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/fake_volumegroupsnapshot.go similarity index 68% rename from client/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/fake/fake_volumegroupsnapshot.go rename to client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/fake_volumegroupsnapshot.go index 355335e5f..9cb98c4ae 100644 --- a/client/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/fake/fake_volumegroupsnapshot.go +++ b/client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/fake_volumegroupsnapshot.go @@ -21,7 +21,7 @@ package fake import ( "context" - v1alpha1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1alpha1" + v1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" types "k8s.io/apimachinery/pkg/types" @@ -31,29 +31,29 @@ import ( // FakeVolumeGroupSnapshots implements VolumeGroupSnapshotInterface type FakeVolumeGroupSnapshots struct { - Fake *FakeGroupsnapshotV1alpha1 + Fake *FakeGroupsnapshotV1beta1 ns string } -var volumegroupsnapshotsResource = v1alpha1.SchemeGroupVersion.WithResource("volumegroupsnapshots") +var volumegroupsnapshotsResource = v1beta1.SchemeGroupVersion.WithResource("volumegroupsnapshots") -var volumegroupsnapshotsKind = v1alpha1.SchemeGroupVersion.WithKind("VolumeGroupSnapshot") +var volumegroupsnapshotsKind = v1beta1.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 *v1alpha1.VolumeGroupSnapshot, err error) { +func (c *FakeVolumeGroupSnapshots) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.VolumeGroupSnapshot, err error) { obj, err := c.Fake. - Invokes(testing.NewGetAction(volumegroupsnapshotsResource, c.ns, name), &v1alpha1.VolumeGroupSnapshot{}) + Invokes(testing.NewGetAction(volumegroupsnapshotsResource, c.ns, name), &v1beta1.VolumeGroupSnapshot{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.VolumeGroupSnapshot), err + return obj.(*v1beta1.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 *v1alpha1.VolumeGroupSnapshotList, err error) { +func (c *FakeVolumeGroupSnapshots) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.VolumeGroupSnapshotList, err error) { obj, err := c.Fake. - Invokes(testing.NewListAction(volumegroupsnapshotsResource, volumegroupsnapshotsKind, c.ns, opts), &v1alpha1.VolumeGroupSnapshotList{}) + Invokes(testing.NewListAction(volumegroupsnapshotsResource, volumegroupsnapshotsKind, c.ns, opts), &v1beta1.VolumeGroupSnapshotList{}) if obj == nil { return nil, err @@ -63,8 +63,8 @@ func (c *FakeVolumeGroupSnapshots) List(ctx context.Context, opts v1.ListOptions if label == nil { label = labels.Everything() } - list := &v1alpha1.VolumeGroupSnapshotList{ListMeta: obj.(*v1alpha1.VolumeGroupSnapshotList).ListMeta} - for _, item := range obj.(*v1alpha1.VolumeGroupSnapshotList).Items { + list := &v1beta1.VolumeGroupSnapshotList{ListMeta: obj.(*v1beta1.VolumeGroupSnapshotList).ListMeta} + for _, item := range obj.(*v1beta1.VolumeGroupSnapshotList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -80,43 +80,43 @@ func (c *FakeVolumeGroupSnapshots) Watch(ctx context.Context, opts v1.ListOption } // 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 *v1alpha1.VolumeGroupSnapshot, opts v1.CreateOptions) (result *v1alpha1.VolumeGroupSnapshot, err error) { +func (c *FakeVolumeGroupSnapshots) Create(ctx context.Context, volumeGroupSnapshot *v1beta1.VolumeGroupSnapshot, opts v1.CreateOptions) (result *v1beta1.VolumeGroupSnapshot, err error) { obj, err := c.Fake. - Invokes(testing.NewCreateAction(volumegroupsnapshotsResource, c.ns, volumeGroupSnapshot), &v1alpha1.VolumeGroupSnapshot{}) + Invokes(testing.NewCreateAction(volumegroupsnapshotsResource, c.ns, volumeGroupSnapshot), &v1beta1.VolumeGroupSnapshot{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.VolumeGroupSnapshot), err + return obj.(*v1beta1.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 *v1alpha1.VolumeGroupSnapshot, opts v1.UpdateOptions) (result *v1alpha1.VolumeGroupSnapshot, err error) { +func (c *FakeVolumeGroupSnapshots) Update(ctx context.Context, volumeGroupSnapshot *v1beta1.VolumeGroupSnapshot, opts v1.UpdateOptions) (result *v1beta1.VolumeGroupSnapshot, err error) { obj, err := c.Fake. - Invokes(testing.NewUpdateAction(volumegroupsnapshotsResource, c.ns, volumeGroupSnapshot), &v1alpha1.VolumeGroupSnapshot{}) + Invokes(testing.NewUpdateAction(volumegroupsnapshotsResource, c.ns, volumeGroupSnapshot), &v1beta1.VolumeGroupSnapshot{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.VolumeGroupSnapshot), err + return obj.(*v1beta1.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 *v1alpha1.VolumeGroupSnapshot, opts v1.UpdateOptions) (*v1alpha1.VolumeGroupSnapshot, error) { +func (c *FakeVolumeGroupSnapshots) UpdateStatus(ctx context.Context, volumeGroupSnapshot *v1beta1.VolumeGroupSnapshot, opts v1.UpdateOptions) (*v1beta1.VolumeGroupSnapshot, error) { obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(volumegroupsnapshotsResource, "status", c.ns, volumeGroupSnapshot), &v1alpha1.VolumeGroupSnapshot{}) + Invokes(testing.NewUpdateSubresourceAction(volumegroupsnapshotsResource, "status", c.ns, volumeGroupSnapshot), &v1beta1.VolumeGroupSnapshot{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.VolumeGroupSnapshot), err + return obj.(*v1beta1.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), &v1alpha1.VolumeGroupSnapshot{}) + Invokes(testing.NewDeleteActionWithOptions(volumegroupsnapshotsResource, c.ns, name, opts), &v1beta1.VolumeGroupSnapshot{}) return err } @@ -125,17 +125,17 @@ func (c *FakeVolumeGroupSnapshots) Delete(ctx context.Context, name string, opts 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, &v1alpha1.VolumeGroupSnapshotList{}) + _, err := c.Fake.Invokes(action, &v1beta1.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 *v1alpha1.VolumeGroupSnapshot, err error) { +func (c *FakeVolumeGroupSnapshots) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.VolumeGroupSnapshot, err error) { obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(volumegroupsnapshotsResource, c.ns, name, pt, data, subresources...), &v1alpha1.VolumeGroupSnapshot{}) + Invokes(testing.NewPatchSubresourceAction(volumegroupsnapshotsResource, c.ns, name, pt, data, subresources...), &v1beta1.VolumeGroupSnapshot{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.VolumeGroupSnapshot), err + return obj.(*v1beta1.VolumeGroupSnapshot), err } diff --git a/client/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/fake/fake_volumegroupsnapshot_client.go b/client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/fake_volumegroupsnapshot_client.go similarity index 64% rename from client/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/fake/fake_volumegroupsnapshot_client.go rename to client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/fake_volumegroupsnapshot_client.go index f8e247dcf..47ce2cb4f 100644 --- a/client/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/fake/fake_volumegroupsnapshot_client.go +++ b/client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/fake_volumegroupsnapshot_client.go @@ -19,30 +19,30 @@ limitations under the License. package fake import ( - v1alpha1 "github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1alpha1" + v1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1" rest "k8s.io/client-go/rest" testing "k8s.io/client-go/testing" ) -type FakeGroupsnapshotV1alpha1 struct { +type FakeGroupsnapshotV1beta1 struct { *testing.Fake } -func (c *FakeGroupsnapshotV1alpha1) VolumeGroupSnapshots(namespace string) v1alpha1.VolumeGroupSnapshotInterface { +func (c *FakeGroupsnapshotV1beta1) VolumeGroupSnapshots(namespace string) v1beta1.VolumeGroupSnapshotInterface { return &FakeVolumeGroupSnapshots{c, namespace} } -func (c *FakeGroupsnapshotV1alpha1) VolumeGroupSnapshotClasses() v1alpha1.VolumeGroupSnapshotClassInterface { +func (c *FakeGroupsnapshotV1beta1) VolumeGroupSnapshotClasses() v1beta1.VolumeGroupSnapshotClassInterface { return &FakeVolumeGroupSnapshotClasses{c} } -func (c *FakeGroupsnapshotV1alpha1) VolumeGroupSnapshotContents() v1alpha1.VolumeGroupSnapshotContentInterface { +func (c *FakeGroupsnapshotV1beta1) VolumeGroupSnapshotContents() v1beta1.VolumeGroupSnapshotContentInterface { return &FakeVolumeGroupSnapshotContents{c} } // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeGroupsnapshotV1alpha1) RESTClient() rest.Interface { +func (c *FakeGroupsnapshotV1beta1) 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/v1alpha1/fake/fake_volumegroupsnapshotclass.go b/client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/fake_volumegroupsnapshotclass.go similarity index 67% rename from vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/fake/fake_volumegroupsnapshotclass.go rename to client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/fake_volumegroupsnapshotclass.go index 99577cd89..1ca15d7e0 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/fake/fake_volumegroupsnapshotclass.go +++ b/client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/fake_volumegroupsnapshotclass.go @@ -21,7 +21,7 @@ package fake import ( "context" - v1alpha1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1alpha1" + v1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" types "k8s.io/apimachinery/pkg/types" @@ -31,27 +31,27 @@ import ( // FakeVolumeGroupSnapshotClasses implements VolumeGroupSnapshotClassInterface type FakeVolumeGroupSnapshotClasses struct { - Fake *FakeGroupsnapshotV1alpha1 + Fake *FakeGroupsnapshotV1beta1 } -var volumegroupsnapshotclassesResource = v1alpha1.SchemeGroupVersion.WithResource("volumegroupsnapshotclasses") +var volumegroupsnapshotclassesResource = v1beta1.SchemeGroupVersion.WithResource("volumegroupsnapshotclasses") -var volumegroupsnapshotclassesKind = v1alpha1.SchemeGroupVersion.WithKind("VolumeGroupSnapshotClass") +var volumegroupsnapshotclassesKind = v1beta1.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 *v1alpha1.VolumeGroupSnapshotClass, err error) { +func (c *FakeVolumeGroupSnapshotClasses) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.VolumeGroupSnapshotClass, err error) { obj, err := c.Fake. - Invokes(testing.NewRootGetAction(volumegroupsnapshotclassesResource, name), &v1alpha1.VolumeGroupSnapshotClass{}) + Invokes(testing.NewRootGetAction(volumegroupsnapshotclassesResource, name), &v1beta1.VolumeGroupSnapshotClass{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.VolumeGroupSnapshotClass), err + return obj.(*v1beta1.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 *v1alpha1.VolumeGroupSnapshotClassList, err error) { +func (c *FakeVolumeGroupSnapshotClasses) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.VolumeGroupSnapshotClassList, err error) { obj, err := c.Fake. - Invokes(testing.NewRootListAction(volumegroupsnapshotclassesResource, volumegroupsnapshotclassesKind, opts), &v1alpha1.VolumeGroupSnapshotClassList{}) + Invokes(testing.NewRootListAction(volumegroupsnapshotclassesResource, volumegroupsnapshotclassesKind, opts), &v1beta1.VolumeGroupSnapshotClassList{}) if obj == nil { return nil, err } @@ -60,8 +60,8 @@ func (c *FakeVolumeGroupSnapshotClasses) List(ctx context.Context, opts v1.ListO if label == nil { label = labels.Everything() } - list := &v1alpha1.VolumeGroupSnapshotClassList{ListMeta: obj.(*v1alpha1.VolumeGroupSnapshotClassList).ListMeta} - for _, item := range obj.(*v1alpha1.VolumeGroupSnapshotClassList).Items { + list := &v1beta1.VolumeGroupSnapshotClassList{ListMeta: obj.(*v1beta1.VolumeGroupSnapshotClassList).ListMeta} + for _, item := range obj.(*v1beta1.VolumeGroupSnapshotClassList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -76,29 +76,29 @@ func (c *FakeVolumeGroupSnapshotClasses) Watch(ctx context.Context, opts v1.List } // 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 *v1alpha1.VolumeGroupSnapshotClass, opts v1.CreateOptions) (result *v1alpha1.VolumeGroupSnapshotClass, err error) { +func (c *FakeVolumeGroupSnapshotClasses) Create(ctx context.Context, volumeGroupSnapshotClass *v1beta1.VolumeGroupSnapshotClass, opts v1.CreateOptions) (result *v1beta1.VolumeGroupSnapshotClass, err error) { obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(volumegroupsnapshotclassesResource, volumeGroupSnapshotClass), &v1alpha1.VolumeGroupSnapshotClass{}) + Invokes(testing.NewRootCreateAction(volumegroupsnapshotclassesResource, volumeGroupSnapshotClass), &v1beta1.VolumeGroupSnapshotClass{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.VolumeGroupSnapshotClass), err + return obj.(*v1beta1.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 *v1alpha1.VolumeGroupSnapshotClass, opts v1.UpdateOptions) (result *v1alpha1.VolumeGroupSnapshotClass, err error) { +func (c *FakeVolumeGroupSnapshotClasses) Update(ctx context.Context, volumeGroupSnapshotClass *v1beta1.VolumeGroupSnapshotClass, opts v1.UpdateOptions) (result *v1beta1.VolumeGroupSnapshotClass, err error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(volumegroupsnapshotclassesResource, volumeGroupSnapshotClass), &v1alpha1.VolumeGroupSnapshotClass{}) + Invokes(testing.NewRootUpdateAction(volumegroupsnapshotclassesResource, volumeGroupSnapshotClass), &v1beta1.VolumeGroupSnapshotClass{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.VolumeGroupSnapshotClass), err + return obj.(*v1beta1.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), &v1alpha1.VolumeGroupSnapshotClass{}) + Invokes(testing.NewRootDeleteActionWithOptions(volumegroupsnapshotclassesResource, name, opts), &v1beta1.VolumeGroupSnapshotClass{}) return err } @@ -106,16 +106,16 @@ func (c *FakeVolumeGroupSnapshotClasses) Delete(ctx context.Context, name string func (c *FakeVolumeGroupSnapshotClasses) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { action := testing.NewRootDeleteCollectionAction(volumegroupsnapshotclassesResource, listOpts) - _, err := c.Fake.Invokes(action, &v1alpha1.VolumeGroupSnapshotClassList{}) + _, err := c.Fake.Invokes(action, &v1beta1.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 *v1alpha1.VolumeGroupSnapshotClass, err error) { +func (c *FakeVolumeGroupSnapshotClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.VolumeGroupSnapshotClass, err error) { obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(volumegroupsnapshotclassesResource, name, pt, data, subresources...), &v1alpha1.VolumeGroupSnapshotClass{}) + Invokes(testing.NewRootPatchSubresourceAction(volumegroupsnapshotclassesResource, name, pt, data, subresources...), &v1beta1.VolumeGroupSnapshotClass{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.VolumeGroupSnapshotClass), err + return obj.(*v1beta1.VolumeGroupSnapshotClass), err } diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/fake/fake_volumegroupsnapshotcontent.go b/client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/fake_volumegroupsnapshotcontent.go similarity index 66% rename from vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/fake/fake_volumegroupsnapshotcontent.go rename to client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/fake_volumegroupsnapshotcontent.go index 159e246e4..738f0cd4b 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/fake/fake_volumegroupsnapshotcontent.go +++ b/client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/fake_volumegroupsnapshotcontent.go @@ -21,7 +21,7 @@ package fake import ( "context" - v1alpha1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1alpha1" + v1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" types "k8s.io/apimachinery/pkg/types" @@ -31,27 +31,27 @@ import ( // FakeVolumeGroupSnapshotContents implements VolumeGroupSnapshotContentInterface type FakeVolumeGroupSnapshotContents struct { - Fake *FakeGroupsnapshotV1alpha1 + Fake *FakeGroupsnapshotV1beta1 } -var volumegroupsnapshotcontentsResource = v1alpha1.SchemeGroupVersion.WithResource("volumegroupsnapshotcontents") +var volumegroupsnapshotcontentsResource = v1beta1.SchemeGroupVersion.WithResource("volumegroupsnapshotcontents") -var volumegroupsnapshotcontentsKind = v1alpha1.SchemeGroupVersion.WithKind("VolumeGroupSnapshotContent") +var volumegroupsnapshotcontentsKind = v1beta1.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 *v1alpha1.VolumeGroupSnapshotContent, err error) { +func (c *FakeVolumeGroupSnapshotContents) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.VolumeGroupSnapshotContent, err error) { obj, err := c.Fake. - Invokes(testing.NewRootGetAction(volumegroupsnapshotcontentsResource, name), &v1alpha1.VolumeGroupSnapshotContent{}) + Invokes(testing.NewRootGetAction(volumegroupsnapshotcontentsResource, name), &v1beta1.VolumeGroupSnapshotContent{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.VolumeGroupSnapshotContent), err + return obj.(*v1beta1.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 *v1alpha1.VolumeGroupSnapshotContentList, err error) { +func (c *FakeVolumeGroupSnapshotContents) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.VolumeGroupSnapshotContentList, err error) { obj, err := c.Fake. - Invokes(testing.NewRootListAction(volumegroupsnapshotcontentsResource, volumegroupsnapshotcontentsKind, opts), &v1alpha1.VolumeGroupSnapshotContentList{}) + Invokes(testing.NewRootListAction(volumegroupsnapshotcontentsResource, volumegroupsnapshotcontentsKind, opts), &v1beta1.VolumeGroupSnapshotContentList{}) if obj == nil { return nil, err } @@ -60,8 +60,8 @@ func (c *FakeVolumeGroupSnapshotContents) List(ctx context.Context, opts v1.List if label == nil { label = labels.Everything() } - list := &v1alpha1.VolumeGroupSnapshotContentList{ListMeta: obj.(*v1alpha1.VolumeGroupSnapshotContentList).ListMeta} - for _, item := range obj.(*v1alpha1.VolumeGroupSnapshotContentList).Items { + list := &v1beta1.VolumeGroupSnapshotContentList{ListMeta: obj.(*v1beta1.VolumeGroupSnapshotContentList).ListMeta} + for _, item := range obj.(*v1beta1.VolumeGroupSnapshotContentList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -76,40 +76,40 @@ func (c *FakeVolumeGroupSnapshotContents) Watch(ctx context.Context, opts v1.Lis } // 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 *v1alpha1.VolumeGroupSnapshotContent, opts v1.CreateOptions) (result *v1alpha1.VolumeGroupSnapshotContent, err error) { +func (c *FakeVolumeGroupSnapshotContents) Create(ctx context.Context, volumeGroupSnapshotContent *v1beta1.VolumeGroupSnapshotContent, opts v1.CreateOptions) (result *v1beta1.VolumeGroupSnapshotContent, err error) { obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(volumegroupsnapshotcontentsResource, volumeGroupSnapshotContent), &v1alpha1.VolumeGroupSnapshotContent{}) + Invokes(testing.NewRootCreateAction(volumegroupsnapshotcontentsResource, volumeGroupSnapshotContent), &v1beta1.VolumeGroupSnapshotContent{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.VolumeGroupSnapshotContent), err + return obj.(*v1beta1.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 *v1alpha1.VolumeGroupSnapshotContent, opts v1.UpdateOptions) (result *v1alpha1.VolumeGroupSnapshotContent, err error) { +func (c *FakeVolumeGroupSnapshotContents) Update(ctx context.Context, volumeGroupSnapshotContent *v1beta1.VolumeGroupSnapshotContent, opts v1.UpdateOptions) (result *v1beta1.VolumeGroupSnapshotContent, err error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(volumegroupsnapshotcontentsResource, volumeGroupSnapshotContent), &v1alpha1.VolumeGroupSnapshotContent{}) + Invokes(testing.NewRootUpdateAction(volumegroupsnapshotcontentsResource, volumeGroupSnapshotContent), &v1beta1.VolumeGroupSnapshotContent{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.VolumeGroupSnapshotContent), err + return obj.(*v1beta1.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 *v1alpha1.VolumeGroupSnapshotContent, opts v1.UpdateOptions) (*v1alpha1.VolumeGroupSnapshotContent, error) { +func (c *FakeVolumeGroupSnapshotContents) UpdateStatus(ctx context.Context, volumeGroupSnapshotContent *v1beta1.VolumeGroupSnapshotContent, opts v1.UpdateOptions) (*v1beta1.VolumeGroupSnapshotContent, error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(volumegroupsnapshotcontentsResource, "status", volumeGroupSnapshotContent), &v1alpha1.VolumeGroupSnapshotContent{}) + Invokes(testing.NewRootUpdateSubresourceAction(volumegroupsnapshotcontentsResource, "status", volumeGroupSnapshotContent), &v1beta1.VolumeGroupSnapshotContent{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.VolumeGroupSnapshotContent), err + return obj.(*v1beta1.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), &v1alpha1.VolumeGroupSnapshotContent{}) + Invokes(testing.NewRootDeleteActionWithOptions(volumegroupsnapshotcontentsResource, name, opts), &v1beta1.VolumeGroupSnapshotContent{}) return err } @@ -117,16 +117,16 @@ func (c *FakeVolumeGroupSnapshotContents) Delete(ctx context.Context, name strin func (c *FakeVolumeGroupSnapshotContents) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { action := testing.NewRootDeleteCollectionAction(volumegroupsnapshotcontentsResource, listOpts) - _, err := c.Fake.Invokes(action, &v1alpha1.VolumeGroupSnapshotContentList{}) + _, err := c.Fake.Invokes(action, &v1beta1.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 *v1alpha1.VolumeGroupSnapshotContent, err error) { +func (c *FakeVolumeGroupSnapshotContents) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.VolumeGroupSnapshotContent, err error) { obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(volumegroupsnapshotcontentsResource, name, pt, data, subresources...), &v1alpha1.VolumeGroupSnapshotContent{}) + Invokes(testing.NewRootPatchSubresourceAction(volumegroupsnapshotcontentsResource, name, pt, data, subresources...), &v1beta1.VolumeGroupSnapshotContent{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.VolumeGroupSnapshotContent), err + return obj.(*v1beta1.VolumeGroupSnapshotContent), err } diff --git a/client/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/generated_expansion.go b/client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/generated_expansion.go similarity index 97% rename from client/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/generated_expansion.go rename to client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/generated_expansion.go index 76c6ee96a..10f62712e 100644 --- a/client/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/generated_expansion.go +++ b/client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/generated_expansion.go @@ -16,7 +16,7 @@ limitations under the License. // Code generated by client-gen. DO NOT EDIT. -package v1alpha1 +package v1beta1 type VolumeGroupSnapshotExpansion interface{} diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/volumegroupsnapshot.go b/client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/volumegroupsnapshot.go similarity index 77% rename from vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/volumegroupsnapshot.go rename to client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/volumegroupsnapshot.go index 413d6bcac..8687a330f 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/volumegroupsnapshot.go +++ b/client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/volumegroupsnapshot.go @@ -16,13 +16,13 @@ limitations under the License. // Code generated by client-gen. DO NOT EDIT. -package v1alpha1 +package v1beta1 import ( "context" "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" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -38,15 +38,15 @@ type VolumeGroupSnapshotsGetter interface { // VolumeGroupSnapshotInterface has methods to work with VolumeGroupSnapshot resources. type VolumeGroupSnapshotInterface interface { - Create(ctx context.Context, volumeGroupSnapshot *v1alpha1.VolumeGroupSnapshot, opts v1.CreateOptions) (*v1alpha1.VolumeGroupSnapshot, error) - Update(ctx context.Context, volumeGroupSnapshot *v1alpha1.VolumeGroupSnapshot, opts v1.UpdateOptions) (*v1alpha1.VolumeGroupSnapshot, error) - UpdateStatus(ctx context.Context, volumeGroupSnapshot *v1alpha1.VolumeGroupSnapshot, opts v1.UpdateOptions) (*v1alpha1.VolumeGroupSnapshot, error) + Create(ctx context.Context, volumeGroupSnapshot *v1beta1.VolumeGroupSnapshot, opts v1.CreateOptions) (*v1beta1.VolumeGroupSnapshot, error) + Update(ctx context.Context, volumeGroupSnapshot *v1beta1.VolumeGroupSnapshot, opts v1.UpdateOptions) (*v1beta1.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 DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.VolumeGroupSnapshot, error) - List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.VolumeGroupSnapshotList, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.VolumeGroupSnapshot, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta1.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 *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 } @@ -57,7 +57,7 @@ type volumeGroupSnapshots struct { } // newVolumeGroupSnapshots returns a VolumeGroupSnapshots -func newVolumeGroupSnapshots(c *GroupsnapshotV1alpha1Client, namespace string) *volumeGroupSnapshots { +func newVolumeGroupSnapshots(c *GroupsnapshotV1beta1Client, namespace string) *volumeGroupSnapshots { return &volumeGroupSnapshots{ client: c.RESTClient(), 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. -func (c *volumeGroupSnapshots) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.VolumeGroupSnapshot, err error) { - result = &v1alpha1.VolumeGroupSnapshot{} +func (c *volumeGroupSnapshots) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.VolumeGroupSnapshot, err error) { + result = &v1beta1.VolumeGroupSnapshot{} err = c.client.Get(). Namespace(c.ns). 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. -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 if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second } - result = &v1alpha1.VolumeGroupSnapshotList{} + result = &v1beta1.VolumeGroupSnapshotList{} err = c.client.Get(). Namespace(c.ns). 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. -func (c *volumeGroupSnapshots) Create(ctx context.Context, volumeGroupSnapshot *v1alpha1.VolumeGroupSnapshot, opts v1.CreateOptions) (result *v1alpha1.VolumeGroupSnapshot, err error) { - result = &v1alpha1.VolumeGroupSnapshot{} +func (c *volumeGroupSnapshots) Create(ctx context.Context, volumeGroupSnapshot *v1beta1.VolumeGroupSnapshot, opts v1.CreateOptions) (result *v1beta1.VolumeGroupSnapshot, err error) { + result = &v1beta1.VolumeGroupSnapshot{} err = c.client.Post(). Namespace(c.ns). 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. -func (c *volumeGroupSnapshots) Update(ctx context.Context, volumeGroupSnapshot *v1alpha1.VolumeGroupSnapshot, opts v1.UpdateOptions) (result *v1alpha1.VolumeGroupSnapshot, err error) { - result = &v1alpha1.VolumeGroupSnapshot{} +func (c *volumeGroupSnapshots) Update(ctx context.Context, volumeGroupSnapshot *v1beta1.VolumeGroupSnapshot, opts v1.UpdateOptions) (result *v1beta1.VolumeGroupSnapshot, err error) { + result = &v1beta1.VolumeGroupSnapshot{} err = c.client.Put(). Namespace(c.ns). Resource("volumegroupsnapshots"). @@ -138,8 +138,8 @@ func (c *volumeGroupSnapshots) Update(ctx context.Context, volumeGroupSnapshot * // 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 *v1alpha1.VolumeGroupSnapshot, opts v1.UpdateOptions) (result *v1alpha1.VolumeGroupSnapshot, err error) { - result = &v1alpha1.VolumeGroupSnapshot{} +func (c *volumeGroupSnapshots) UpdateStatus(ctx context.Context, volumeGroupSnapshot *v1beta1.VolumeGroupSnapshot, opts v1.UpdateOptions) (result *v1beta1.VolumeGroupSnapshot, err error) { + result = &v1beta1.VolumeGroupSnapshot{} err = c.client.Put(). Namespace(c.ns). 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. -func (c *volumeGroupSnapshots) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.VolumeGroupSnapshot, err error) { - result = &v1alpha1.VolumeGroupSnapshot{} +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 = &v1beta1.VolumeGroupSnapshot{} err = c.client.Patch(pt). Namespace(c.ns). Resource("volumegroupsnapshots"). diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/volumegroupsnapshot_client.go b/client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/volumegroupsnapshot_client.go similarity index 62% rename from vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/volumegroupsnapshot_client.go rename to client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/volumegroupsnapshot_client.go index 14cf7707d..49ecc7cf5 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/volumegroupsnapshot_client.go +++ b/client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/volumegroupsnapshot_client.go @@ -16,44 +16,44 @@ limitations under the License. // Code generated by client-gen. DO NOT EDIT. -package v1alpha1 +package v1beta1 import ( "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" rest "k8s.io/client-go/rest" ) -type GroupsnapshotV1alpha1Interface interface { +type GroupsnapshotV1beta1Interface interface { RESTClient() rest.Interface VolumeGroupSnapshotsGetter VolumeGroupSnapshotClassesGetter VolumeGroupSnapshotContentsGetter } -// GroupsnapshotV1alpha1Client is used to interact with features provided by the groupsnapshot.storage.k8s.io group. -type GroupsnapshotV1alpha1Client struct { +// GroupsnapshotV1beta1Client is used to interact with features provided by the groupsnapshot.storage.k8s.io group. +type GroupsnapshotV1beta1Client struct { restClient rest.Interface } -func (c *GroupsnapshotV1alpha1Client) VolumeGroupSnapshots(namespace string) VolumeGroupSnapshotInterface { +func (c *GroupsnapshotV1beta1Client) VolumeGroupSnapshots(namespace string) VolumeGroupSnapshotInterface { return newVolumeGroupSnapshots(c, namespace) } -func (c *GroupsnapshotV1alpha1Client) VolumeGroupSnapshotClasses() VolumeGroupSnapshotClassInterface { +func (c *GroupsnapshotV1beta1Client) VolumeGroupSnapshotClasses() VolumeGroupSnapshotClassInterface { return newVolumeGroupSnapshotClasses(c) } -func (c *GroupsnapshotV1alpha1Client) VolumeGroupSnapshotContents() VolumeGroupSnapshotContentInterface { +func (c *GroupsnapshotV1beta1Client) VolumeGroupSnapshotContents() VolumeGroupSnapshotContentInterface { 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), // where httpClient was generated with rest.HTTPClientFor(c). -func NewForConfig(c *rest.Config) (*GroupsnapshotV1alpha1Client, error) { +func NewForConfig(c *rest.Config) (*GroupsnapshotV1beta1Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err @@ -65,9 +65,9 @@ func NewForConfig(c *rest.Config) (*GroupsnapshotV1alpha1Client, error) { 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. -func NewForConfigAndClient(c *rest.Config, h *http.Client) (*GroupsnapshotV1alpha1Client, error) { +func NewForConfigAndClient(c *rest.Config, h *http.Client) (*GroupsnapshotV1beta1Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err @@ -76,12 +76,12 @@ func NewForConfigAndClient(c *rest.Config, h *http.Client) (*GroupsnapshotV1alph if err != nil { 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. -func NewForConfigOrDie(c *rest.Config) *GroupsnapshotV1alpha1Client { +func NewForConfigOrDie(c *rest.Config) *GroupsnapshotV1beta1Client { client, err := NewForConfig(c) if err != nil { panic(err) @@ -89,13 +89,13 @@ func NewForConfigOrDie(c *rest.Config) *GroupsnapshotV1alpha1Client { return client } -// New creates a new GroupsnapshotV1alpha1Client for the given RESTClient. -func New(c rest.Interface) *GroupsnapshotV1alpha1Client { - return &GroupsnapshotV1alpha1Client{c} +// New creates a new GroupsnapshotV1beta1Client for the given RESTClient. +func New(c rest.Interface) *GroupsnapshotV1beta1Client { + return &GroupsnapshotV1beta1Client{c} } func setConfigDefaults(config *rest.Config) error { - gv := v1alpha1.SchemeGroupVersion + gv := v1beta1.SchemeGroupVersion config.GroupVersion = &gv config.APIPath = "/apis" config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() @@ -109,7 +109,7 @@ func setConfigDefaults(config *rest.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *GroupsnapshotV1alpha1Client) RESTClient() rest.Interface { +func (c *GroupsnapshotV1beta1Client) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/client/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/volumegroupsnapshotclass.go b/client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/volumegroupsnapshotclass.go similarity index 77% rename from client/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/volumegroupsnapshotclass.go rename to client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/volumegroupsnapshotclass.go index 7abdf2c6b..642cedd70 100644 --- a/client/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/volumegroupsnapshotclass.go +++ b/client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/volumegroupsnapshotclass.go @@ -16,13 +16,13 @@ limitations under the License. // Code generated by client-gen. DO NOT EDIT. -package v1alpha1 +package v1beta1 import ( "context" "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" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -38,14 +38,14 @@ type VolumeGroupSnapshotClassesGetter interface { // VolumeGroupSnapshotClassInterface has methods to work with VolumeGroupSnapshotClass resources. type VolumeGroupSnapshotClassInterface interface { - Create(ctx context.Context, volumeGroupSnapshotClass *v1alpha1.VolumeGroupSnapshotClass, opts v1.CreateOptions) (*v1alpha1.VolumeGroupSnapshotClass, error) - Update(ctx context.Context, volumeGroupSnapshotClass *v1alpha1.VolumeGroupSnapshotClass, opts v1.UpdateOptions) (*v1alpha1.VolumeGroupSnapshotClass, error) + Create(ctx context.Context, volumeGroupSnapshotClass *v1beta1.VolumeGroupSnapshotClass, opts v1.CreateOptions) (*v1beta1.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 DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.VolumeGroupSnapshotClass, error) - List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.VolumeGroupSnapshotClassList, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.VolumeGroupSnapshotClass, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta1.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 *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 } @@ -55,15 +55,15 @@ type volumeGroupSnapshotClasses struct { } // newVolumeGroupSnapshotClasses returns a VolumeGroupSnapshotClasses -func newVolumeGroupSnapshotClasses(c *GroupsnapshotV1alpha1Client) *volumeGroupSnapshotClasses { +func newVolumeGroupSnapshotClasses(c *GroupsnapshotV1beta1Client) *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 *v1alpha1.VolumeGroupSnapshotClass, err error) { - result = &v1alpha1.VolumeGroupSnapshotClass{} +func (c *volumeGroupSnapshotClasses) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.VolumeGroupSnapshotClass, err error) { + result = &v1beta1.VolumeGroupSnapshotClass{} err = c.client.Get(). Resource("volumegroupsnapshotclasses"). 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. -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 if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second } - result = &v1alpha1.VolumeGroupSnapshotClassList{} + result = &v1beta1.VolumeGroupSnapshotClassList{} err = c.client.Get(). Resource("volumegroupsnapshotclasses"). 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. -func (c *volumeGroupSnapshotClasses) Create(ctx context.Context, volumeGroupSnapshotClass *v1alpha1.VolumeGroupSnapshotClass, opts v1.CreateOptions) (result *v1alpha1.VolumeGroupSnapshotClass, err error) { - result = &v1alpha1.VolumeGroupSnapshotClass{} +func (c *volumeGroupSnapshotClasses) Create(ctx context.Context, volumeGroupSnapshotClass *v1beta1.VolumeGroupSnapshotClass, opts v1.CreateOptions) (result *v1beta1.VolumeGroupSnapshotClass, err error) { + result = &v1beta1.VolumeGroupSnapshotClass{} err = c.client.Post(). Resource("volumegroupsnapshotclasses"). 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. -func (c *volumeGroupSnapshotClasses) Update(ctx context.Context, volumeGroupSnapshotClass *v1alpha1.VolumeGroupSnapshotClass, opts v1.UpdateOptions) (result *v1alpha1.VolumeGroupSnapshotClass, err error) { - result = &v1alpha1.VolumeGroupSnapshotClass{} +func (c *volumeGroupSnapshotClasses) Update(ctx context.Context, volumeGroupSnapshotClass *v1beta1.VolumeGroupSnapshotClass, opts v1.UpdateOptions) (result *v1beta1.VolumeGroupSnapshotClass, err error) { + result = &v1beta1.VolumeGroupSnapshotClass{} err = c.client.Put(). Resource("volumegroupsnapshotclasses"). Name(volumeGroupSnapshotClass.Name). @@ -154,8 +154,8 @@ func (c *volumeGroupSnapshotClasses) DeleteCollection(ctx context.Context, opts } // 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) { - result = &v1alpha1.VolumeGroupSnapshotClass{} +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 = &v1beta1.VolumeGroupSnapshotClass{} err = c.client.Patch(pt). Resource("volumegroupsnapshotclasses"). Name(name). diff --git a/client/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/volumegroupsnapshotcontent.go b/client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/volumegroupsnapshotcontent.go similarity index 76% rename from client/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/volumegroupsnapshotcontent.go rename to client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/volumegroupsnapshotcontent.go index e27f3d092..eafada589 100644 --- a/client/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/volumegroupsnapshotcontent.go +++ b/client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/volumegroupsnapshotcontent.go @@ -16,13 +16,13 @@ limitations under the License. // Code generated by client-gen. DO NOT EDIT. -package v1alpha1 +package v1beta1 import ( "context" "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" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -38,15 +38,15 @@ type VolumeGroupSnapshotContentsGetter interface { // VolumeGroupSnapshotContentInterface has methods to work with VolumeGroupSnapshotContent resources. type VolumeGroupSnapshotContentInterface interface { - Create(ctx context.Context, volumeGroupSnapshotContent *v1alpha1.VolumeGroupSnapshotContent, opts v1.CreateOptions) (*v1alpha1.VolumeGroupSnapshotContent, error) - Update(ctx context.Context, volumeGroupSnapshotContent *v1alpha1.VolumeGroupSnapshotContent, opts v1.UpdateOptions) (*v1alpha1.VolumeGroupSnapshotContent, error) - UpdateStatus(ctx context.Context, volumeGroupSnapshotContent *v1alpha1.VolumeGroupSnapshotContent, opts v1.UpdateOptions) (*v1alpha1.VolumeGroupSnapshotContent, error) + Create(ctx context.Context, volumeGroupSnapshotContent *v1beta1.VolumeGroupSnapshotContent, opts v1.CreateOptions) (*v1beta1.VolumeGroupSnapshotContent, error) + Update(ctx context.Context, volumeGroupSnapshotContent *v1beta1.VolumeGroupSnapshotContent, opts v1.UpdateOptions) (*v1beta1.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 DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.VolumeGroupSnapshotContent, error) - List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.VolumeGroupSnapshotContentList, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.VolumeGroupSnapshotContent, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta1.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 *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 } @@ -56,15 +56,15 @@ type volumeGroupSnapshotContents struct { } // newVolumeGroupSnapshotContents returns a VolumeGroupSnapshotContents -func newVolumeGroupSnapshotContents(c *GroupsnapshotV1alpha1Client) *volumeGroupSnapshotContents { +func newVolumeGroupSnapshotContents(c *GroupsnapshotV1beta1Client) *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 *v1alpha1.VolumeGroupSnapshotContent, err error) { - result = &v1alpha1.VolumeGroupSnapshotContent{} +func (c *volumeGroupSnapshotContents) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.VolumeGroupSnapshotContent, err error) { + result = &v1beta1.VolumeGroupSnapshotContent{} err = c.client.Get(). Resource("volumegroupsnapshotcontents"). 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. -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 if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second } - result = &v1alpha1.VolumeGroupSnapshotContentList{} + result = &v1beta1.VolumeGroupSnapshotContentList{} err = c.client.Get(). Resource("volumegroupsnapshotcontents"). 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. -func (c *volumeGroupSnapshotContents) Create(ctx context.Context, volumeGroupSnapshotContent *v1alpha1.VolumeGroupSnapshotContent, opts v1.CreateOptions) (result *v1alpha1.VolumeGroupSnapshotContent, err error) { - result = &v1alpha1.VolumeGroupSnapshotContent{} +func (c *volumeGroupSnapshotContents) Create(ctx context.Context, volumeGroupSnapshotContent *v1beta1.VolumeGroupSnapshotContent, opts v1.CreateOptions) (result *v1beta1.VolumeGroupSnapshotContent, err error) { + result = &v1beta1.VolumeGroupSnapshotContent{} err = c.client.Post(). Resource("volumegroupsnapshotcontents"). 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. -func (c *volumeGroupSnapshotContents) Update(ctx context.Context, volumeGroupSnapshotContent *v1alpha1.VolumeGroupSnapshotContent, opts v1.UpdateOptions) (result *v1alpha1.VolumeGroupSnapshotContent, err error) { - result = &v1alpha1.VolumeGroupSnapshotContent{} +func (c *volumeGroupSnapshotContents) Update(ctx context.Context, volumeGroupSnapshotContent *v1beta1.VolumeGroupSnapshotContent, opts v1.UpdateOptions) (result *v1beta1.VolumeGroupSnapshotContent, err error) { + result = &v1beta1.VolumeGroupSnapshotContent{} err = c.client.Put(). Resource("volumegroupsnapshotcontents"). 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. // 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) { - result = &v1alpha1.VolumeGroupSnapshotContent{} +func (c *volumeGroupSnapshotContents) UpdateStatus(ctx context.Context, volumeGroupSnapshotContent *v1beta1.VolumeGroupSnapshotContent, opts v1.UpdateOptions) (result *v1beta1.VolumeGroupSnapshotContent, err error) { + result = &v1beta1.VolumeGroupSnapshotContent{} err = c.client.Put(). Resource("volumegroupsnapshotcontents"). Name(volumeGroupSnapshotContent.Name). @@ -170,8 +170,8 @@ func (c *volumeGroupSnapshotContents) DeleteCollection(ctx context.Context, opts } // 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) { - result = &v1alpha1.VolumeGroupSnapshotContent{} +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 = &v1beta1.VolumeGroupSnapshotContent{} err = c.client.Patch(pt). Resource("volumegroupsnapshotcontents"). Name(name). diff --git a/client/config/crd/groupsnapshot.storage.k8s.io_volumegroupsnapshotclasses.yaml b/client/config/crd/groupsnapshot.storage.k8s.io_volumegroupsnapshotclasses.yaml index aff3a5719..d31a1222e 100644 --- a/client/config/crd/groupsnapshot.storage.k8s.io_volumegroupsnapshotclasses.yaml +++ b/client/config/crd/groupsnapshot.storage.k8s.io_volumegroupsnapshotclasses.yaml @@ -31,7 +31,7 @@ spec: - jsonPath: .metadata.creationTimestamp name: Age type: date - name: v1alpha1 + name: v1beta1 schema: openAPIV3Schema: description: |- @@ -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: v1alpha1 + 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 438ed8fd1..5472ef845 100644 --- a/client/config/crd/groupsnapshot.storage.k8s.io_volumegroupsnapshotcontents.yaml +++ b/client/config/crd/groupsnapshot.storage.k8s.io_volumegroupsnapshotcontents.yaml @@ -53,7 +53,7 @@ spec: - jsonPath: .metadata.creationTimestamp name: Age type: date - name: v1alpha1 + name: v1beta1 schema: openAPIV3Schema: description: |- @@ -355,3 +355,340 @@ 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: v1alpha1 + 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. + format: int64 + type: integer + 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 + pvVolumeSnapshotContentList: + description: |- + PVVolumeSnapshotContentList is the list of pairs of PV and + VolumeSnapshotContent for this group snapshot + The maximum number of allowed snapshots in the group is 100. + items: + description: |- + PVVolumeSnapshotContentPair represent a pair of PV names and + VolumeSnapshotContent names + properties: + persistentVolumeRef: + description: PersistentVolumeRef is a reference to the persistent + volume resource + properties: + name: + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? + type: string + type: object + x-kubernetes-map-type: atomic + volumeSnapshotContentRef: + description: VolumeSnapshotContentRef is a reference to the + volume snapshot content resource + properties: + name: + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? + type: string + type: object + x-kubernetes-map-type: atomic + type: object + type: array + 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 + volumeSnapshotHandlePairList: + description: |- + 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. + items: + description: VolumeSnapshotHandlePair defines a pair of a source + volume handle and a snapshot handle + properties: + 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 + required: + - snapshotHandle + - volumeHandle + 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 3d9a771de..2dbcebb5f 100644 --- a/client/config/crd/groupsnapshot.storage.k8s.io_volumegroupsnapshots.yaml +++ b/client/config/crd/groupsnapshot.storage.k8s.io_volumegroupsnapshots.yaml @@ -43,7 +43,7 @@ spec: - jsonPath: .metadata.creationTimestamp name: Age type: date - name: v1alpha1 + name: v1beta1 schema: openAPIV3Schema: description: |- @@ -271,3 +271,257 @@ 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: v1alpha1 + 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. + 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 + pvcVolumeSnapshotRefList: + description: |- + 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. + items: + description: PVCVolumeSnapshotPair defines a pair of a PVC reference + and a Volume Snapshot Reference + properties: + persistentVolumeClaimRef: + description: PersistentVolumeClaimRef is a reference to the + PVC this pair is referring to + properties: + name: + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? + type: string + type: object + x-kubernetes-map-type: atomic + volumeSnapshotRef: + description: VolumeSnapshotRef is a reference to the VolumeSnapshot + this pair is referring to + properties: + name: + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? + type: string + type: object + x-kubernetes-map-type: atomic + type: object + type: array + 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/hack/README.md b/client/hack/README.md index d3fc58442..1246280ae 100644 --- a/client/hack/README.md +++ b/client/hack/README.md @@ -44,7 +44,7 @@ Update generated client code in external-snapshotter ./hack/update-generated-code.sh ``` -Once you run the script, the code will be generated for volumesnapshot:v1 and volumegroupsnapshot:v1alpha1, and you will get an output as follows: +Once you run the script, the code will be generated for volumesnapshot:v1 and volumegroupsnapshot:v1beta1, and you will get an output as follows: ```bash Generating deepcopy code for 2 targets diff --git a/client/hack/cel-tests/volumegroupsnapshot/vgs-class-empty-string.yaml b/client/hack/cel-tests/volumegroupsnapshot/vgs-class-empty-string.yaml index dcbbcc51f..854634fb3 100644 --- a/client/hack/cel-tests/volumegroupsnapshot/vgs-class-empty-string.yaml +++ b/client/hack/cel-tests/volumegroupsnapshot/vgs-class-empty-string.yaml @@ -1,5 +1,5 @@ --- -apiVersion: groupsnapshot.storage.k8s.io/v1alpha1 +apiVersion: groupsnapshot.storage.k8s.io/v1beta1 kind: VolumeGroupSnapshot metadata: name: new-groupsnapshot-demo diff --git a/client/hack/cel-tests/volumegroupsnapshot/vgs-content-immutable.post.yaml b/client/hack/cel-tests/volumegroupsnapshot/vgs-content-immutable.post.yaml index 41ae422cc..722f46700 100644 --- a/client/hack/cel-tests/volumegroupsnapshot/vgs-content-immutable.post.yaml +++ b/client/hack/cel-tests/volumegroupsnapshot/vgs-content-immutable.post.yaml @@ -1,5 +1,5 @@ --- -apiVersion: groupsnapshot.storage.k8s.io/v1alpha1 +apiVersion: groupsnapshot.storage.k8s.io/v1beta1 kind: VolumeGroupSnapshot metadata: name: new-groupsnapshot-demo diff --git a/client/hack/cel-tests/volumegroupsnapshot/vgs-content-immutable.pre.yaml b/client/hack/cel-tests/volumegroupsnapshot/vgs-content-immutable.pre.yaml index 396d765b2..01416b5fe 100644 --- a/client/hack/cel-tests/volumegroupsnapshot/vgs-content-immutable.pre.yaml +++ b/client/hack/cel-tests/volumegroupsnapshot/vgs-content-immutable.pre.yaml @@ -1,5 +1,5 @@ --- -apiVersion: groupsnapshot.storage.k8s.io/v1alpha1 +apiVersion: groupsnapshot.storage.k8s.io/v1beta1 kind: VolumeGroupSnapshot metadata: name: new-groupsnapshot-demo diff --git a/client/hack/cel-tests/volumegroupsnapshot/vgs-content-to-selector.post.yaml b/client/hack/cel-tests/volumegroupsnapshot/vgs-content-to-selector.post.yaml index 61f3de05c..a6177b87e 100644 --- a/client/hack/cel-tests/volumegroupsnapshot/vgs-content-to-selector.post.yaml +++ b/client/hack/cel-tests/volumegroupsnapshot/vgs-content-to-selector.post.yaml @@ -1,5 +1,5 @@ --- -apiVersion: groupsnapshot.storage.k8s.io/v1alpha1 +apiVersion: groupsnapshot.storage.k8s.io/v1beta1 kind: VolumeGroupSnapshot metadata: name: new-groupsnapshot-demo diff --git a/client/hack/cel-tests/volumegroupsnapshot/vgs-content-to-selector.pre.yaml b/client/hack/cel-tests/volumegroupsnapshot/vgs-content-to-selector.pre.yaml index 396d765b2..01416b5fe 100644 --- a/client/hack/cel-tests/volumegroupsnapshot/vgs-content-to-selector.pre.yaml +++ b/client/hack/cel-tests/volumegroupsnapshot/vgs-content-to-selector.pre.yaml @@ -1,5 +1,5 @@ --- -apiVersion: groupsnapshot.storage.k8s.io/v1alpha1 +apiVersion: groupsnapshot.storage.k8s.io/v1beta1 kind: VolumeGroupSnapshot metadata: name: new-groupsnapshot-demo diff --git a/client/hack/cel-tests/volumegroupsnapshot/vgs-no-class.yaml b/client/hack/cel-tests/volumegroupsnapshot/vgs-no-class.yaml index 058e3eca5..ee4213770 100644 --- a/client/hack/cel-tests/volumegroupsnapshot/vgs-no-class.yaml +++ b/client/hack/cel-tests/volumegroupsnapshot/vgs-no-class.yaml @@ -1,5 +1,5 @@ --- -apiVersion: groupsnapshot.storage.k8s.io/v1alpha1 +apiVersion: groupsnapshot.storage.k8s.io/v1beta1 kind: VolumeGroupSnapshot metadata: name: new-groupsnapshot-demo diff --git a/client/hack/cel-tests/volumegroupsnapshot/vgs-selector-immutable.post.yaml b/client/hack/cel-tests/volumegroupsnapshot/vgs-selector-immutable.post.yaml index e2ae3a0e9..9f92303a2 100644 --- a/client/hack/cel-tests/volumegroupsnapshot/vgs-selector-immutable.post.yaml +++ b/client/hack/cel-tests/volumegroupsnapshot/vgs-selector-immutable.post.yaml @@ -1,5 +1,5 @@ --- -apiVersion: groupsnapshot.storage.k8s.io/v1alpha1 +apiVersion: groupsnapshot.storage.k8s.io/v1beta1 kind: VolumeGroupSnapshot metadata: name: new-groupsnapshot-demo diff --git a/client/hack/cel-tests/volumegroupsnapshot/vgs-selector-immutable.pre.yaml b/client/hack/cel-tests/volumegroupsnapshot/vgs-selector-immutable.pre.yaml index 61f3de05c..a6177b87e 100644 --- a/client/hack/cel-tests/volumegroupsnapshot/vgs-selector-immutable.pre.yaml +++ b/client/hack/cel-tests/volumegroupsnapshot/vgs-selector-immutable.pre.yaml @@ -1,5 +1,5 @@ --- -apiVersion: groupsnapshot.storage.k8s.io/v1alpha1 +apiVersion: groupsnapshot.storage.k8s.io/v1beta1 kind: VolumeGroupSnapshot metadata: name: new-groupsnapshot-demo diff --git a/client/hack/cel-tests/volumegroupsnapshot/vgs-selector-to-content.post.yaml b/client/hack/cel-tests/volumegroupsnapshot/vgs-selector-to-content.post.yaml index 396d765b2..01416b5fe 100644 --- a/client/hack/cel-tests/volumegroupsnapshot/vgs-selector-to-content.post.yaml +++ b/client/hack/cel-tests/volumegroupsnapshot/vgs-selector-to-content.post.yaml @@ -1,5 +1,5 @@ --- -apiVersion: groupsnapshot.storage.k8s.io/v1alpha1 +apiVersion: groupsnapshot.storage.k8s.io/v1beta1 kind: VolumeGroupSnapshot metadata: name: new-groupsnapshot-demo diff --git a/client/hack/cel-tests/volumegroupsnapshot/vgs-selector-to-content.pre.yaml b/client/hack/cel-tests/volumegroupsnapshot/vgs-selector-to-content.pre.yaml index 61f3de05c..a6177b87e 100644 --- a/client/hack/cel-tests/volumegroupsnapshot/vgs-selector-to-content.pre.yaml +++ b/client/hack/cel-tests/volumegroupsnapshot/vgs-selector-to-content.pre.yaml @@ -1,5 +1,5 @@ --- -apiVersion: groupsnapshot.storage.k8s.io/v1alpha1 +apiVersion: groupsnapshot.storage.k8s.io/v1beta1 kind: VolumeGroupSnapshot metadata: name: new-groupsnapshot-demo diff --git a/client/hack/cel-tests/volumegroupsnapshot/vgs-with-content.yaml b/client/hack/cel-tests/volumegroupsnapshot/vgs-with-content.yaml index 396d765b2..01416b5fe 100644 --- a/client/hack/cel-tests/volumegroupsnapshot/vgs-with-content.yaml +++ b/client/hack/cel-tests/volumegroupsnapshot/vgs-with-content.yaml @@ -1,5 +1,5 @@ --- -apiVersion: groupsnapshot.storage.k8s.io/v1alpha1 +apiVersion: groupsnapshot.storage.k8s.io/v1beta1 kind: VolumeGroupSnapshot metadata: name: new-groupsnapshot-demo diff --git a/client/hack/cel-tests/volumegroupsnapshot/vgs-with-no-selector-no-content.yaml b/client/hack/cel-tests/volumegroupsnapshot/vgs-with-no-selector-no-content.yaml index dc1dd43f4..c10d3ca3d 100644 --- a/client/hack/cel-tests/volumegroupsnapshot/vgs-with-no-selector-no-content.yaml +++ b/client/hack/cel-tests/volumegroupsnapshot/vgs-with-no-selector-no-content.yaml @@ -1,5 +1,5 @@ --- -apiVersion: groupsnapshot.storage.k8s.io/v1alpha1 +apiVersion: groupsnapshot.storage.k8s.io/v1beta1 kind: VolumeGroupSnapshot metadata: name: new-groupsnapshot-demo diff --git a/client/hack/cel-tests/volumegroupsnapshot/vgs-with-selector-and-content.yaml b/client/hack/cel-tests/volumegroupsnapshot/vgs-with-selector-and-content.yaml index 9f8071bc9..ffee8cd4f 100644 --- a/client/hack/cel-tests/volumegroupsnapshot/vgs-with-selector-and-content.yaml +++ b/client/hack/cel-tests/volumegroupsnapshot/vgs-with-selector-and-content.yaml @@ -1,5 +1,5 @@ --- -apiVersion: groupsnapshot.storage.k8s.io/v1alpha1 +apiVersion: groupsnapshot.storage.k8s.io/v1beta1 kind: VolumeGroupSnapshot metadata: name: new-groupsnapshot-demo diff --git a/client/hack/cel-tests/volumegroupsnapshot/vgs-with-selector.yaml b/client/hack/cel-tests/volumegroupsnapshot/vgs-with-selector.yaml index 61f3de05c..a6177b87e 100644 --- a/client/hack/cel-tests/volumegroupsnapshot/vgs-with-selector.yaml +++ b/client/hack/cel-tests/volumegroupsnapshot/vgs-with-selector.yaml @@ -1,5 +1,5 @@ --- -apiVersion: groupsnapshot.storage.k8s.io/v1alpha1 +apiVersion: groupsnapshot.storage.k8s.io/v1beta1 kind: VolumeGroupSnapshot metadata: name: new-groupsnapshot-demo diff --git a/client/hack/cel-tests/volumegroupsnapshotcontent/vgsc-change-ref-name.post.yaml b/client/hack/cel-tests/volumegroupsnapshotcontent/vgsc-change-ref-name.post.yaml index 2a693aadd..3afd1f51b 100644 --- a/client/hack/cel-tests/volumegroupsnapshotcontent/vgsc-change-ref-name.post.yaml +++ b/client/hack/cel-tests/volumegroupsnapshotcontent/vgsc-change-ref-name.post.yaml @@ -1,5 +1,5 @@ --- -apiVersion: groupsnapshot.storage.k8s.io/v1alpha1 +apiVersion: groupsnapshot.storage.k8s.io/v1beta1 kind: VolumeGroupSnapshotContent metadata: name: new-groupsnapshotcontent-demo diff --git a/client/hack/cel-tests/volumegroupsnapshotcontent/vgsc-change-ref-name.pre.yaml b/client/hack/cel-tests/volumegroupsnapshotcontent/vgsc-change-ref-name.pre.yaml index 00fd3f2e9..ee1ff2d91 100644 --- a/client/hack/cel-tests/volumegroupsnapshotcontent/vgsc-change-ref-name.pre.yaml +++ b/client/hack/cel-tests/volumegroupsnapshotcontent/vgsc-change-ref-name.pre.yaml @@ -1,5 +1,5 @@ --- -apiVersion: groupsnapshot.storage.k8s.io/v1alpha1 +apiVersion: groupsnapshot.storage.k8s.io/v1beta1 kind: VolumeGroupSnapshotContent metadata: name: new-groupsnapshotcontent-demo diff --git a/client/hack/cel-tests/volumegroupsnapshotcontent/vgsc-change-ref-namespace.post.yaml b/client/hack/cel-tests/volumegroupsnapshotcontent/vgsc-change-ref-namespace.post.yaml index 31d2a2f1b..602fb5ea2 100644 --- a/client/hack/cel-tests/volumegroupsnapshotcontent/vgsc-change-ref-namespace.post.yaml +++ b/client/hack/cel-tests/volumegroupsnapshotcontent/vgsc-change-ref-namespace.post.yaml @@ -1,5 +1,5 @@ --- -apiVersion: groupsnapshot.storage.k8s.io/v1alpha1 +apiVersion: groupsnapshot.storage.k8s.io/v1beta1 kind: VolumeGroupSnapshotContent metadata: name: new-groupsnapshotcontent-demo diff --git a/client/hack/cel-tests/volumegroupsnapshotcontent/vgsc-change-ref-namespace.pre.yaml b/client/hack/cel-tests/volumegroupsnapshotcontent/vgsc-change-ref-namespace.pre.yaml index 00fd3f2e9..ee1ff2d91 100644 --- a/client/hack/cel-tests/volumegroupsnapshotcontent/vgsc-change-ref-namespace.pre.yaml +++ b/client/hack/cel-tests/volumegroupsnapshotcontent/vgsc-change-ref-namespace.pre.yaml @@ -1,5 +1,5 @@ --- -apiVersion: groupsnapshot.storage.k8s.io/v1alpha1 +apiVersion: groupsnapshot.storage.k8s.io/v1beta1 kind: VolumeGroupSnapshotContent metadata: name: new-groupsnapshotcontent-demo diff --git a/client/hack/cel-tests/volumegroupsnapshotcontent/vgsc-ok.yaml b/client/hack/cel-tests/volumegroupsnapshotcontent/vgsc-ok.yaml index 00fd3f2e9..ee1ff2d91 100644 --- a/client/hack/cel-tests/volumegroupsnapshotcontent/vgsc-ok.yaml +++ b/client/hack/cel-tests/volumegroupsnapshotcontent/vgsc-ok.yaml @@ -1,5 +1,5 @@ --- -apiVersion: groupsnapshot.storage.k8s.io/v1alpha1 +apiVersion: groupsnapshot.storage.k8s.io/v1beta1 kind: VolumeGroupSnapshotContent metadata: name: new-groupsnapshotcontent-demo diff --git a/client/hack/cel-tests/volumegroupsnapshotcontent/vgsc-ref-only-name.yaml b/client/hack/cel-tests/volumegroupsnapshotcontent/vgsc-ref-only-name.yaml index 8720f5e55..77fb4a0c1 100644 --- a/client/hack/cel-tests/volumegroupsnapshotcontent/vgsc-ref-only-name.yaml +++ b/client/hack/cel-tests/volumegroupsnapshotcontent/vgsc-ref-only-name.yaml @@ -1,5 +1,5 @@ --- -apiVersion: groupsnapshot.storage.k8s.io/v1alpha1 +apiVersion: groupsnapshot.storage.k8s.io/v1beta1 kind: VolumeGroupSnapshotContent metadata: name: new-groupsnapshotcontent-demo diff --git a/client/hack/cel-tests/volumegroupsnapshotcontent/vgsc-ref-only-namespace.yaml b/client/hack/cel-tests/volumegroupsnapshotcontent/vgsc-ref-only-namespace.yaml index b50849738..4b8429665 100644 --- a/client/hack/cel-tests/volumegroupsnapshotcontent/vgsc-ref-only-namespace.yaml +++ b/client/hack/cel-tests/volumegroupsnapshotcontent/vgsc-ref-only-namespace.yaml @@ -1,5 +1,5 @@ --- -apiVersion: groupsnapshot.storage.k8s.io/v1alpha1 +apiVersion: groupsnapshot.storage.k8s.io/v1beta1 kind: VolumeGroupSnapshotContent metadata: name: new-groupsnapshotcontent-demo diff --git a/client/hack/cel-tests/volumegroupsnapshotcontent/vgsc-source-both-volume-and-groupsnapshot.yaml b/client/hack/cel-tests/volumegroupsnapshotcontent/vgsc-source-both-volume-and-groupsnapshot.yaml index efd0a0aca..28dae401a 100644 --- a/client/hack/cel-tests/volumegroupsnapshotcontent/vgsc-source-both-volume-and-groupsnapshot.yaml +++ b/client/hack/cel-tests/volumegroupsnapshotcontent/vgsc-source-both-volume-and-groupsnapshot.yaml @@ -1,5 +1,5 @@ --- -apiVersion: groupsnapshot.storage.k8s.io/v1alpha1 +apiVersion: groupsnapshot.storage.k8s.io/v1beta1 kind: VolumeGroupSnapshotContent metadata: name: new-groupsnapshotcontent-demo diff --git a/client/hack/cel-tests/volumegroupsnapshotcontent/vgsc-source-empty.yaml b/client/hack/cel-tests/volumegroupsnapshotcontent/vgsc-source-empty.yaml index 768bd82f8..4c62db7dc 100644 --- a/client/hack/cel-tests/volumegroupsnapshotcontent/vgsc-source-empty.yaml +++ b/client/hack/cel-tests/volumegroupsnapshotcontent/vgsc-source-empty.yaml @@ -1,5 +1,5 @@ --- -apiVersion: groupsnapshot.storage.k8s.io/v1alpha1 +apiVersion: groupsnapshot.storage.k8s.io/v1beta1 kind: VolumeGroupSnapshotContent metadata: name: new-groupsnapshotcontent-demo diff --git a/client/hack/cel-tests/volumegroupsnapshotcontent/vgsc-source-groupsnapshot-immutable.post.yaml b/client/hack/cel-tests/volumegroupsnapshotcontent/vgsc-source-groupsnapshot-immutable.post.yaml index 066092c2f..52dd8ba61 100644 --- a/client/hack/cel-tests/volumegroupsnapshotcontent/vgsc-source-groupsnapshot-immutable.post.yaml +++ b/client/hack/cel-tests/volumegroupsnapshotcontent/vgsc-source-groupsnapshot-immutable.post.yaml @@ -1,5 +1,5 @@ --- -apiVersion: groupsnapshot.storage.k8s.io/v1alpha1 +apiVersion: groupsnapshot.storage.k8s.io/v1beta1 kind: VolumeGroupSnapshotContent metadata: name: new-groupsnapshotcontent-demo diff --git a/client/hack/cel-tests/volumegroupsnapshotcontent/vgsc-source-groupsnapshot-immutable.pre.yaml b/client/hack/cel-tests/volumegroupsnapshotcontent/vgsc-source-groupsnapshot-immutable.pre.yaml index 5dc5b48fb..10ff343b3 100644 --- a/client/hack/cel-tests/volumegroupsnapshotcontent/vgsc-source-groupsnapshot-immutable.pre.yaml +++ b/client/hack/cel-tests/volumegroupsnapshotcontent/vgsc-source-groupsnapshot-immutable.pre.yaml @@ -1,5 +1,5 @@ --- -apiVersion: groupsnapshot.storage.k8s.io/v1alpha1 +apiVersion: groupsnapshot.storage.k8s.io/v1beta1 kind: VolumeGroupSnapshotContent metadata: name: new-groupsnapshotcontent-demo diff --git a/client/hack/cel-tests/volumegroupsnapshotcontent/vgsc-source-groupsnapshot-to-volume.post.yaml b/client/hack/cel-tests/volumegroupsnapshotcontent/vgsc-source-groupsnapshot-to-volume.post.yaml index 00fd3f2e9..ee1ff2d91 100644 --- a/client/hack/cel-tests/volumegroupsnapshotcontent/vgsc-source-groupsnapshot-to-volume.post.yaml +++ b/client/hack/cel-tests/volumegroupsnapshotcontent/vgsc-source-groupsnapshot-to-volume.post.yaml @@ -1,5 +1,5 @@ --- -apiVersion: groupsnapshot.storage.k8s.io/v1alpha1 +apiVersion: groupsnapshot.storage.k8s.io/v1beta1 kind: VolumeGroupSnapshotContent metadata: name: new-groupsnapshotcontent-demo diff --git a/client/hack/cel-tests/volumegroupsnapshotcontent/vgsc-source-groupsnapshot-to-volume.pre.yaml b/client/hack/cel-tests/volumegroupsnapshotcontent/vgsc-source-groupsnapshot-to-volume.pre.yaml index 5dc5b48fb..10ff343b3 100644 --- a/client/hack/cel-tests/volumegroupsnapshotcontent/vgsc-source-groupsnapshot-to-volume.pre.yaml +++ b/client/hack/cel-tests/volumegroupsnapshotcontent/vgsc-source-groupsnapshot-to-volume.pre.yaml @@ -1,5 +1,5 @@ --- -apiVersion: groupsnapshot.storage.k8s.io/v1alpha1 +apiVersion: groupsnapshot.storage.k8s.io/v1beta1 kind: VolumeGroupSnapshotContent metadata: name: new-groupsnapshotcontent-demo diff --git a/client/hack/cel-tests/volumegroupsnapshotcontent/vgsc-source-volume-immutable.post.yaml b/client/hack/cel-tests/volumegroupsnapshotcontent/vgsc-source-volume-immutable.post.yaml index 4c642a5b0..6d8630662 100644 --- a/client/hack/cel-tests/volumegroupsnapshotcontent/vgsc-source-volume-immutable.post.yaml +++ b/client/hack/cel-tests/volumegroupsnapshotcontent/vgsc-source-volume-immutable.post.yaml @@ -1,5 +1,5 @@ --- -apiVersion: groupsnapshot.storage.k8s.io/v1alpha1 +apiVersion: groupsnapshot.storage.k8s.io/v1beta1 kind: VolumeGroupSnapshotContent metadata: name: new-groupsnapshotcontent-demo diff --git a/client/hack/cel-tests/volumegroupsnapshotcontent/vgsc-source-volume-immutable.pre.yaml b/client/hack/cel-tests/volumegroupsnapshotcontent/vgsc-source-volume-immutable.pre.yaml index 00fd3f2e9..ee1ff2d91 100644 --- a/client/hack/cel-tests/volumegroupsnapshotcontent/vgsc-source-volume-immutable.pre.yaml +++ b/client/hack/cel-tests/volumegroupsnapshotcontent/vgsc-source-volume-immutable.pre.yaml @@ -1,5 +1,5 @@ --- -apiVersion: groupsnapshot.storage.k8s.io/v1alpha1 +apiVersion: groupsnapshot.storage.k8s.io/v1beta1 kind: VolumeGroupSnapshotContent metadata: name: new-groupsnapshotcontent-demo diff --git a/client/hack/cel-tests/volumegroupsnapshotcontent/vgsc-source-volume-to-groupsnapshot.post.yaml b/client/hack/cel-tests/volumegroupsnapshotcontent/vgsc-source-volume-to-groupsnapshot.post.yaml index 5dc5b48fb..10ff343b3 100644 --- a/client/hack/cel-tests/volumegroupsnapshotcontent/vgsc-source-volume-to-groupsnapshot.post.yaml +++ b/client/hack/cel-tests/volumegroupsnapshotcontent/vgsc-source-volume-to-groupsnapshot.post.yaml @@ -1,5 +1,5 @@ --- -apiVersion: groupsnapshot.storage.k8s.io/v1alpha1 +apiVersion: groupsnapshot.storage.k8s.io/v1beta1 kind: VolumeGroupSnapshotContent metadata: name: new-groupsnapshotcontent-demo diff --git a/client/hack/cel-tests/volumegroupsnapshotcontent/vgsc-source-volume-to-groupsnapshot.pre.yaml b/client/hack/cel-tests/volumegroupsnapshotcontent/vgsc-source-volume-to-groupsnapshot.pre.yaml index 00fd3f2e9..ee1ff2d91 100644 --- a/client/hack/cel-tests/volumegroupsnapshotcontent/vgsc-source-volume-to-groupsnapshot.pre.yaml +++ b/client/hack/cel-tests/volumegroupsnapshotcontent/vgsc-source-volume-to-groupsnapshot.pre.yaml @@ -1,5 +1,5 @@ --- -apiVersion: groupsnapshot.storage.k8s.io/v1alpha1 +apiVersion: groupsnapshot.storage.k8s.io/v1beta1 kind: VolumeGroupSnapshotContent metadata: name: new-groupsnapshotcontent-demo diff --git a/client/informers/externalversions/generic.go b/client/informers/externalversions/generic.go index c29dc0574..3f4fb8ee5 100644 --- a/client/informers/externalversions/generic.go +++ b/client/informers/externalversions/generic.go @@ -21,7 +21,7 @@ package externalversions import ( "fmt" - v1alpha1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1alpha1" + v1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta1" 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" @@ -53,13 +53,13 @@ func (f *genericInformer) Lister() cache.GenericLister { // TODO extend this to unknown resources with a client pool func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource) (GenericInformer, error) { switch resource { - // Group=groupsnapshot.storage.k8s.io, Version=v1alpha1 - case v1alpha1.SchemeGroupVersion.WithResource("volumegroupsnapshots"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Groupsnapshot().V1alpha1().VolumeGroupSnapshots().Informer()}, nil - case v1alpha1.SchemeGroupVersion.WithResource("volumegroupsnapshotclasses"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Groupsnapshot().V1alpha1().VolumeGroupSnapshotClasses().Informer()}, nil - case v1alpha1.SchemeGroupVersion.WithResource("volumegroupsnapshotcontents"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Groupsnapshot().V1alpha1().VolumeGroupSnapshotContents().Informer()}, nil + // Group=groupsnapshot.storage.k8s.io, Version=v1beta1 + case v1beta1.SchemeGroupVersion.WithResource("volumegroupsnapshots"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Groupsnapshot().V1beta1().VolumeGroupSnapshots().Informer()}, nil + case v1beta1.SchemeGroupVersion.WithResource("volumegroupsnapshotclasses"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Groupsnapshot().V1beta1().VolumeGroupSnapshotClasses().Informer()}, nil + case v1beta1.SchemeGroupVersion.WithResource("volumegroupsnapshotcontents"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Groupsnapshot().V1beta1().VolumeGroupSnapshotContents().Informer()}, nil // Group=snapshot.storage.k8s.io, Version=v1 case v1.SchemeGroupVersion.WithResource("volumesnapshots"): diff --git a/client/informers/externalversions/volumegroupsnapshot/interface.go b/client/informers/externalversions/volumegroupsnapshot/interface.go index f3843d5d0..e75bc2edf 100644 --- a/client/informers/externalversions/volumegroupsnapshot/interface.go +++ b/client/informers/externalversions/volumegroupsnapshot/interface.go @@ -20,13 +20,13 @@ package volumegroupsnapshot import ( internalinterfaces "github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/internalinterfaces" - v1alpha1 "github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumegroupsnapshot/v1alpha1" + v1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumegroupsnapshot/v1beta1" ) // Interface provides access to each of this group's versions. type Interface interface { - // V1alpha1 provides access to shared informers for resources in V1alpha1. - V1alpha1() v1alpha1.Interface + // V1beta1 provides access to shared informers for resources in V1beta1. + V1beta1() v1beta1.Interface } type group struct { @@ -40,7 +40,7 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} } -// V1alpha1 returns a new v1alpha1.Interface. -func (g *group) V1alpha1() v1alpha1.Interface { - return v1alpha1.New(g.factory, g.namespace, g.tweakListOptions) +// V1beta1 returns a new v1beta1.Interface. +func (g *group) V1beta1() v1beta1.Interface { + return v1beta1.New(g.factory, g.namespace, g.tweakListOptions) } diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumegroupsnapshot/v1alpha1/interface.go b/client/informers/externalversions/volumegroupsnapshot/v1beta1/interface.go similarity index 99% rename from vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumegroupsnapshot/v1alpha1/interface.go rename to client/informers/externalversions/volumegroupsnapshot/v1beta1/interface.go index 500e17ba3..3bcbe139f 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumegroupsnapshot/v1alpha1/interface.go +++ b/client/informers/externalversions/volumegroupsnapshot/v1beta1/interface.go @@ -16,7 +16,7 @@ limitations under the License. // Code generated by informer-gen. DO NOT EDIT. -package v1alpha1 +package v1beta1 import ( internalinterfaces "github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/internalinterfaces" diff --git a/client/informers/externalversions/volumegroupsnapshot/v1alpha1/volumegroupsnapshot.go b/client/informers/externalversions/volumegroupsnapshot/v1beta1/volumegroupsnapshot.go similarity index 79% rename from client/informers/externalversions/volumegroupsnapshot/v1alpha1/volumegroupsnapshot.go rename to client/informers/externalversions/volumegroupsnapshot/v1beta1/volumegroupsnapshot.go index 765d0c71d..25343f6c1 100644 --- a/client/informers/externalversions/volumegroupsnapshot/v1alpha1/volumegroupsnapshot.go +++ b/client/informers/externalversions/volumegroupsnapshot/v1beta1/volumegroupsnapshot.go @@ -16,16 +16,16 @@ limitations under the License. // Code generated by informer-gen. DO NOT EDIT. -package v1alpha1 +package v1beta1 import ( "context" time "time" - volumegroupsnapshotv1alpha1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1alpha1" + volumegroupsnapshotv1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta1" versioned "github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned" internalinterfaces "github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/internalinterfaces" - v1alpha1 "github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1alpha1" + v1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -36,7 +36,7 @@ import ( // VolumeGroupSnapshots. type VolumeGroupSnapshotInformer interface { Informer() cache.SharedIndexInformer - Lister() v1alpha1.VolumeGroupSnapshotLister + Lister() v1beta1.VolumeGroupSnapshotLister } type volumeGroupSnapshotInformer struct { @@ -62,16 +62,16 @@ func NewFilteredVolumeGroupSnapshotInformer(client versioned.Interface, namespac if tweakListOptions != nil { tweakListOptions(&options) } - return client.GroupsnapshotV1alpha1().VolumeGroupSnapshots(namespace).List(context.TODO(), options) + return client.GroupsnapshotV1beta1().VolumeGroupSnapshots(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.GroupsnapshotV1alpha1().VolumeGroupSnapshots(namespace).Watch(context.TODO(), options) + return client.GroupsnapshotV1beta1().VolumeGroupSnapshots(namespace).Watch(context.TODO(), options) }, }, - &volumegroupsnapshotv1alpha1.VolumeGroupSnapshot{}, + &volumegroupsnapshotv1beta1.VolumeGroupSnapshot{}, resyncPeriod, indexers, ) @@ -82,9 +82,9 @@ func (f *volumeGroupSnapshotInformer) defaultInformer(client versioned.Interface } func (f *volumeGroupSnapshotInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&volumegroupsnapshotv1alpha1.VolumeGroupSnapshot{}, f.defaultInformer) + return f.factory.InformerFor(&volumegroupsnapshotv1beta1.VolumeGroupSnapshot{}, f.defaultInformer) } -func (f *volumeGroupSnapshotInformer) Lister() v1alpha1.VolumeGroupSnapshotLister { - return v1alpha1.NewVolumeGroupSnapshotLister(f.Informer().GetIndexer()) +func (f *volumeGroupSnapshotInformer) Lister() v1beta1.VolumeGroupSnapshotLister { + return v1beta1.NewVolumeGroupSnapshotLister(f.Informer().GetIndexer()) } diff --git a/client/informers/externalversions/volumegroupsnapshot/v1alpha1/volumegroupsnapshotclass.go b/client/informers/externalversions/volumegroupsnapshot/v1beta1/volumegroupsnapshotclass.go similarity index 79% rename from client/informers/externalversions/volumegroupsnapshot/v1alpha1/volumegroupsnapshotclass.go rename to client/informers/externalversions/volumegroupsnapshot/v1beta1/volumegroupsnapshotclass.go index 2491efe71..c3fa376ec 100644 --- a/client/informers/externalversions/volumegroupsnapshot/v1alpha1/volumegroupsnapshotclass.go +++ b/client/informers/externalversions/volumegroupsnapshot/v1beta1/volumegroupsnapshotclass.go @@ -16,16 +16,16 @@ limitations under the License. // Code generated by informer-gen. DO NOT EDIT. -package v1alpha1 +package v1beta1 import ( "context" time "time" - volumegroupsnapshotv1alpha1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1alpha1" + volumegroupsnapshotv1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta1" versioned "github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned" internalinterfaces "github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/internalinterfaces" - v1alpha1 "github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1alpha1" + v1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -36,7 +36,7 @@ import ( // VolumeGroupSnapshotClasses. type VolumeGroupSnapshotClassInformer interface { Informer() cache.SharedIndexInformer - Lister() v1alpha1.VolumeGroupSnapshotClassLister + Lister() v1beta1.VolumeGroupSnapshotClassLister } type volumeGroupSnapshotClassInformer struct { @@ -61,16 +61,16 @@ func NewFilteredVolumeGroupSnapshotClassInformer(client versioned.Interface, res if tweakListOptions != nil { tweakListOptions(&options) } - return client.GroupsnapshotV1alpha1().VolumeGroupSnapshotClasses().List(context.TODO(), options) + return client.GroupsnapshotV1beta1().VolumeGroupSnapshotClasses().List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.GroupsnapshotV1alpha1().VolumeGroupSnapshotClasses().Watch(context.TODO(), options) + return client.GroupsnapshotV1beta1().VolumeGroupSnapshotClasses().Watch(context.TODO(), options) }, }, - &volumegroupsnapshotv1alpha1.VolumeGroupSnapshotClass{}, + &volumegroupsnapshotv1beta1.VolumeGroupSnapshotClass{}, resyncPeriod, indexers, ) @@ -81,9 +81,9 @@ func (f *volumeGroupSnapshotClassInformer) defaultInformer(client versioned.Inte } func (f *volumeGroupSnapshotClassInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&volumegroupsnapshotv1alpha1.VolumeGroupSnapshotClass{}, f.defaultInformer) + return f.factory.InformerFor(&volumegroupsnapshotv1beta1.VolumeGroupSnapshotClass{}, f.defaultInformer) } -func (f *volumeGroupSnapshotClassInformer) Lister() v1alpha1.VolumeGroupSnapshotClassLister { - return v1alpha1.NewVolumeGroupSnapshotClassLister(f.Informer().GetIndexer()) +func (f *volumeGroupSnapshotClassInformer) Lister() v1beta1.VolumeGroupSnapshotClassLister { + return v1beta1.NewVolumeGroupSnapshotClassLister(f.Informer().GetIndexer()) } diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumegroupsnapshot/v1alpha1/volumegroupsnapshotcontent.go b/client/informers/externalversions/volumegroupsnapshot/v1beta1/volumegroupsnapshotcontent.go similarity index 79% rename from vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumegroupsnapshot/v1alpha1/volumegroupsnapshotcontent.go rename to client/informers/externalversions/volumegroupsnapshot/v1beta1/volumegroupsnapshotcontent.go index 256b59d4d..8d15f85cc 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumegroupsnapshot/v1alpha1/volumegroupsnapshotcontent.go +++ b/client/informers/externalversions/volumegroupsnapshot/v1beta1/volumegroupsnapshotcontent.go @@ -16,16 +16,16 @@ limitations under the License. // Code generated by informer-gen. DO NOT EDIT. -package v1alpha1 +package v1beta1 import ( "context" time "time" - volumegroupsnapshotv1alpha1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1alpha1" + volumegroupsnapshotv1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta1" versioned "github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned" internalinterfaces "github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/internalinterfaces" - v1alpha1 "github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1alpha1" + v1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -36,7 +36,7 @@ import ( // VolumeGroupSnapshotContents. type VolumeGroupSnapshotContentInformer interface { Informer() cache.SharedIndexInformer - Lister() v1alpha1.VolumeGroupSnapshotContentLister + Lister() v1beta1.VolumeGroupSnapshotContentLister } type volumeGroupSnapshotContentInformer struct { @@ -61,16 +61,16 @@ func NewFilteredVolumeGroupSnapshotContentInformer(client versioned.Interface, r if tweakListOptions != nil { tweakListOptions(&options) } - return client.GroupsnapshotV1alpha1().VolumeGroupSnapshotContents().List(context.TODO(), options) + return client.GroupsnapshotV1beta1().VolumeGroupSnapshotContents().List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.GroupsnapshotV1alpha1().VolumeGroupSnapshotContents().Watch(context.TODO(), options) + return client.GroupsnapshotV1beta1().VolumeGroupSnapshotContents().Watch(context.TODO(), options) }, }, - &volumegroupsnapshotv1alpha1.VolumeGroupSnapshotContent{}, + &volumegroupsnapshotv1beta1.VolumeGroupSnapshotContent{}, resyncPeriod, indexers, ) @@ -81,9 +81,9 @@ func (f *volumeGroupSnapshotContentInformer) defaultInformer(client versioned.In } func (f *volumeGroupSnapshotContentInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&volumegroupsnapshotv1alpha1.VolumeGroupSnapshotContent{}, f.defaultInformer) + return f.factory.InformerFor(&volumegroupsnapshotv1beta1.VolumeGroupSnapshotContent{}, f.defaultInformer) } -func (f *volumeGroupSnapshotContentInformer) Lister() v1alpha1.VolumeGroupSnapshotContentLister { - return v1alpha1.NewVolumeGroupSnapshotContentLister(f.Informer().GetIndexer()) +func (f *volumeGroupSnapshotContentInformer) Lister() v1beta1.VolumeGroupSnapshotContentLister { + return v1beta1.NewVolumeGroupSnapshotContentLister(f.Informer().GetIndexer()) } diff --git a/client/listers/volumegroupsnapshot/v1alpha1/expansion_generated.go b/client/listers/volumegroupsnapshot/v1beta1/expansion_generated.go similarity index 98% rename from client/listers/volumegroupsnapshot/v1alpha1/expansion_generated.go rename to client/listers/volumegroupsnapshot/v1beta1/expansion_generated.go index 9884212d1..1b4044bbd 100644 --- a/client/listers/volumegroupsnapshot/v1alpha1/expansion_generated.go +++ b/client/listers/volumegroupsnapshot/v1beta1/expansion_generated.go @@ -16,7 +16,7 @@ limitations under the License. // Code generated by lister-gen. DO NOT EDIT. -package v1alpha1 +package v1beta1 // VolumeGroupSnapshotListerExpansion allows custom methods to be added to // VolumeGroupSnapshotLister. diff --git a/client/listers/volumegroupsnapshot/v1alpha1/volumegroupsnapshot.go b/client/listers/volumegroupsnapshot/v1beta1/volumegroupsnapshot.go similarity index 81% rename from client/listers/volumegroupsnapshot/v1alpha1/volumegroupsnapshot.go rename to client/listers/volumegroupsnapshot/v1beta1/volumegroupsnapshot.go index 1f9cbc5b8..f2edc34a7 100644 --- a/client/listers/volumegroupsnapshot/v1alpha1/volumegroupsnapshot.go +++ b/client/listers/volumegroupsnapshot/v1beta1/volumegroupsnapshot.go @@ -16,10 +16,10 @@ limitations under the License. // Code generated by lister-gen. DO NOT EDIT. -package v1alpha1 +package v1beta1 import ( - v1alpha1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1alpha1" + v1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache" @@ -30,7 +30,7 @@ import ( type VolumeGroupSnapshotLister interface { // List lists all VolumeGroupSnapshots in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1alpha1.VolumeGroupSnapshot, err error) + List(selector labels.Selector) (ret []*v1beta1.VolumeGroupSnapshot, err error) // VolumeGroupSnapshots returns an object that can list and get VolumeGroupSnapshots. VolumeGroupSnapshots(namespace string) VolumeGroupSnapshotNamespaceLister VolumeGroupSnapshotListerExpansion @@ -47,9 +47,9 @@ func NewVolumeGroupSnapshotLister(indexer cache.Indexer) VolumeGroupSnapshotList } // List lists all VolumeGroupSnapshots in the indexer. -func (s *volumeGroupSnapshotLister) List(selector labels.Selector) (ret []*v1alpha1.VolumeGroupSnapshot, err error) { +func (s *volumeGroupSnapshotLister) List(selector labels.Selector) (ret []*v1beta1.VolumeGroupSnapshot, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1alpha1.VolumeGroupSnapshot)) + ret = append(ret, m.(*v1beta1.VolumeGroupSnapshot)) }) return ret, err } @@ -64,10 +64,10 @@ func (s *volumeGroupSnapshotLister) VolumeGroupSnapshots(namespace string) Volum 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 []*v1alpha1.VolumeGroupSnapshot, err error) + List(selector labels.Selector) (ret []*v1beta1.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) (*v1alpha1.VolumeGroupSnapshot, error) + Get(name string) (*v1beta1.VolumeGroupSnapshot, error) VolumeGroupSnapshotNamespaceListerExpansion } @@ -79,21 +79,21 @@ type volumeGroupSnapshotNamespaceLister struct { } // List lists all VolumeGroupSnapshots in the indexer for a given namespace. -func (s volumeGroupSnapshotNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.VolumeGroupSnapshot, err error) { +func (s volumeGroupSnapshotNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.VolumeGroupSnapshot, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*v1alpha1.VolumeGroupSnapshot)) + ret = append(ret, m.(*v1beta1.VolumeGroupSnapshot)) }) return ret, err } // Get retrieves the VolumeGroupSnapshot from the indexer for a given namespace and name. -func (s volumeGroupSnapshotNamespaceLister) Get(name string) (*v1alpha1.VolumeGroupSnapshot, error) { +func (s volumeGroupSnapshotNamespaceLister) Get(name string) (*v1beta1.VolumeGroupSnapshot, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err } if !exists { - return nil, errors.NewNotFound(v1alpha1.Resource("volumegroupsnapshot"), name) + return nil, errors.NewNotFound(v1beta1.Resource("volumegroupsnapshot"), name) } - return obj.(*v1alpha1.VolumeGroupSnapshot), nil + return obj.(*v1beta1.VolumeGroupSnapshot), nil } diff --git a/client/listers/volumegroupsnapshot/v1alpha1/volumegroupsnapshotclass.go b/client/listers/volumegroupsnapshot/v1beta1/volumegroupsnapshotclass.go similarity index 75% rename from client/listers/volumegroupsnapshot/v1alpha1/volumegroupsnapshotclass.go rename to client/listers/volumegroupsnapshot/v1beta1/volumegroupsnapshotclass.go index 3ad700f18..351e37e91 100644 --- a/client/listers/volumegroupsnapshot/v1alpha1/volumegroupsnapshotclass.go +++ b/client/listers/volumegroupsnapshot/v1beta1/volumegroupsnapshotclass.go @@ -16,10 +16,10 @@ limitations under the License. // Code generated by lister-gen. DO NOT EDIT. -package v1alpha1 +package v1beta1 import ( - v1alpha1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1alpha1" + v1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache" @@ -30,10 +30,10 @@ import ( type VolumeGroupSnapshotClassLister interface { // List lists all VolumeGroupSnapshotClasses in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1alpha1.VolumeGroupSnapshotClass, err error) + List(selector labels.Selector) (ret []*v1beta1.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) (*v1alpha1.VolumeGroupSnapshotClass, error) + Get(name string) (*v1beta1.VolumeGroupSnapshotClass, error) VolumeGroupSnapshotClassListerExpansion } @@ -48,21 +48,21 @@ func NewVolumeGroupSnapshotClassLister(indexer cache.Indexer) VolumeGroupSnapsho } // List lists all VolumeGroupSnapshotClasses in the indexer. -func (s *volumeGroupSnapshotClassLister) List(selector labels.Selector) (ret []*v1alpha1.VolumeGroupSnapshotClass, err error) { +func (s *volumeGroupSnapshotClassLister) List(selector labels.Selector) (ret []*v1beta1.VolumeGroupSnapshotClass, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1alpha1.VolumeGroupSnapshotClass)) + ret = append(ret, m.(*v1beta1.VolumeGroupSnapshotClass)) }) return ret, err } // Get retrieves the VolumeGroupSnapshotClass from the index for a given name. -func (s *volumeGroupSnapshotClassLister) Get(name string) (*v1alpha1.VolumeGroupSnapshotClass, error) { +func (s *volumeGroupSnapshotClassLister) Get(name string) (*v1beta1.VolumeGroupSnapshotClass, error) { obj, exists, err := s.indexer.GetByKey(name) if err != nil { return nil, err } if !exists { - return nil, errors.NewNotFound(v1alpha1.Resource("volumegroupsnapshotclass"), name) + return nil, errors.NewNotFound(v1beta1.Resource("volumegroupsnapshotclass"), name) } - return obj.(*v1alpha1.VolumeGroupSnapshotClass), nil + return obj.(*v1beta1.VolumeGroupSnapshotClass), nil } diff --git a/client/listers/volumegroupsnapshot/v1alpha1/volumegroupsnapshotcontent.go b/client/listers/volumegroupsnapshot/v1beta1/volumegroupsnapshotcontent.go similarity index 78% rename from client/listers/volumegroupsnapshot/v1alpha1/volumegroupsnapshotcontent.go rename to client/listers/volumegroupsnapshot/v1beta1/volumegroupsnapshotcontent.go index 162a2163b..576302795 100644 --- a/client/listers/volumegroupsnapshot/v1alpha1/volumegroupsnapshotcontent.go +++ b/client/listers/volumegroupsnapshot/v1beta1/volumegroupsnapshotcontent.go @@ -16,10 +16,10 @@ limitations under the License. // Code generated by lister-gen. DO NOT EDIT. -package v1alpha1 +package v1beta1 import ( - v1alpha1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1alpha1" + v1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache" @@ -30,10 +30,10 @@ import ( type VolumeGroupSnapshotContentLister interface { // List lists all VolumeGroupSnapshotContents in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1alpha1.VolumeGroupSnapshotContent, err error) + List(selector labels.Selector) (ret []*v1beta1.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) (*v1alpha1.VolumeGroupSnapshotContent, error) + Get(name string) (*v1beta1.VolumeGroupSnapshotContent, error) VolumeGroupSnapshotContentListerExpansion } @@ -48,21 +48,21 @@ func NewVolumeGroupSnapshotContentLister(indexer cache.Indexer) VolumeGroupSnaps } // List lists all VolumeGroupSnapshotContents in the indexer. -func (s *volumeGroupSnapshotContentLister) List(selector labels.Selector) (ret []*v1alpha1.VolumeGroupSnapshotContent, err error) { +func (s *volumeGroupSnapshotContentLister) List(selector labels.Selector) (ret []*v1beta1.VolumeGroupSnapshotContent, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1alpha1.VolumeGroupSnapshotContent)) + ret = append(ret, m.(*v1beta1.VolumeGroupSnapshotContent)) }) return ret, err } // Get retrieves the VolumeGroupSnapshotContent from the index for a given name. -func (s *volumeGroupSnapshotContentLister) Get(name string) (*v1alpha1.VolumeGroupSnapshotContent, error) { +func (s *volumeGroupSnapshotContentLister) Get(name string) (*v1beta1.VolumeGroupSnapshotContent, error) { obj, exists, err := s.indexer.GetByKey(name) if err != nil { return nil, err } if !exists { - return nil, errors.NewNotFound(v1alpha1.Resource("volumegroupsnapshotcontent"), name) + return nil, errors.NewNotFound(v1beta1.Resource("volumegroupsnapshotcontent"), name) } - return obj.(*v1alpha1.VolumeGroupSnapshotContent), nil + return obj.(*v1beta1.VolumeGroupSnapshotContent), nil } diff --git a/cmd/csi-snapshotter/main.go b/cmd/csi-snapshotter/main.go index 0f2903d6f..65e00d05a 100644 --- a/cmd/csi-snapshotter/main.go +++ b/cmd/csi-snapshotter/main.go @@ -267,8 +267,8 @@ func main() { *extraCreateMetadata, workqueue.NewItemExponentialFailureRateLimiter(*retryIntervalStart, *retryIntervalMax), *enableVolumeGroupSnapshots, - snapshotContentfactory.Groupsnapshot().V1alpha1().VolumeGroupSnapshotContents(), - snapshotContentfactory.Groupsnapshot().V1alpha1().VolumeGroupSnapshotClasses(), + snapshotContentfactory.Groupsnapshot().V1beta1().VolumeGroupSnapshotContents(), + snapshotContentfactory.Groupsnapshot().V1beta1().VolumeGroupSnapshotClasses(), workqueue.NewItemExponentialFailureRateLimiter(*retryIntervalStart, *retryIntervalMax), ) diff --git a/cmd/snapshot-controller/main.go b/cmd/snapshot-controller/main.go index cf7edcd29..b751c40a9 100644 --- a/cmd/snapshot-controller/main.go +++ b/cmd/snapshot-controller/main.go @@ -106,20 +106,20 @@ func ensureCustomResourceDefinitionsExist(client *clientset.Clientset, enableVol return false, nil } if enableVolumeGroupSnapshots { - _, err = client.GroupsnapshotV1alpha1().VolumeGroupSnapshots("").List(ctx, listOptions) + _, err = client.GroupsnapshotV1beta1().VolumeGroupSnapshots("").List(ctx, listOptions) if err != nil { - klog.Errorf("Failed to list v1alpha1 volumegroupsnapshots with error=%+v", err) + klog.Errorf("Failed to list v1beta1 volumegroupsnapshots with error=%+v", err) return false, nil } - _, err = client.GroupsnapshotV1alpha1().VolumeGroupSnapshotClasses().List(ctx, listOptions) + _, err = client.GroupsnapshotV1beta1().VolumeGroupSnapshotClasses().List(ctx, listOptions) if err != nil { - klog.Errorf("Failed to list v1alpha1 volumegroupsnapshotclasses with error=%+v", err) + klog.Errorf("Failed to list v1beta1 volumegroupsnapshotclasses with error=%+v", err) return false, nil } - _, err = client.GroupsnapshotV1alpha1().VolumeGroupSnapshotContents().List(ctx, listOptions) + _, err = client.GroupsnapshotV1beta1().VolumeGroupSnapshotContents().List(ctx, listOptions) if err != nil { - klog.Errorf("Failed to list v1alpha1 volumegroupsnapshotcontents with error=%+v", err) + klog.Errorf("Failed to list v1beta1 volumegroupsnapshotcontents with error=%+v", err) return false, nil } } @@ -214,9 +214,9 @@ func main() { factory.Snapshot().V1().VolumeSnapshots(), factory.Snapshot().V1().VolumeSnapshotContents(), factory.Snapshot().V1().VolumeSnapshotClasses(), - factory.Groupsnapshot().V1alpha1().VolumeGroupSnapshots(), - factory.Groupsnapshot().V1alpha1().VolumeGroupSnapshotContents(), - factory.Groupsnapshot().V1alpha1().VolumeGroupSnapshotClasses(), + factory.Groupsnapshot().V1beta1().VolumeGroupSnapshots(), + factory.Groupsnapshot().V1beta1().VolumeGroupSnapshotContents(), + factory.Groupsnapshot().V1beta1().VolumeGroupSnapshotClasses(), coreFactory.Core().V1().PersistentVolumeClaims(), coreFactory.Core().V1().PersistentVolumes(), nodeInformer, diff --git a/deploy/kubernetes/webhook-example/admission-configuration-template b/deploy/kubernetes/webhook-example/admission-configuration-template index 3d8ccc63c..75fb1ff23 100644 --- a/deploy/kubernetes/webhook-example/admission-configuration-template +++ b/deploy/kubernetes/webhook-example/admission-configuration-template @@ -29,7 +29,7 @@ webhooks: - name: "validation-webhook.groupsnapshot.storage.k8s.io" rules: - apiGroups: ["groupsnapshot.storage.k8s.io"] - apiVersions: ["v1alpha1"] + apiVersions: ["v1beta1"] operations: ["CREATE", "UPDATE"] resources: ["volumegroupsnapshotclasses"] scope: "*" diff --git a/examples/kubernetes/groupsnapshot-v1alpha1.yaml b/examples/kubernetes/groupsnapshot-v1beta1.yaml similarity index 86% rename from examples/kubernetes/groupsnapshot-v1alpha1.yaml rename to examples/kubernetes/groupsnapshot-v1beta1.yaml index 6c7887c26..3d8b788eb 100644 --- a/examples/kubernetes/groupsnapshot-v1alpha1.yaml +++ b/examples/kubernetes/groupsnapshot-v1beta1.yaml @@ -1,5 +1,5 @@ --- -apiVersion: groupsnapshot.storage.k8s.io/v1alpha1 +apiVersion: groupsnapshot.storage.k8s.io/v1beta1 kind: VolumeGroupSnapshot metadata: name: new-groupsnapshot-demo diff --git a/examples/kubernetes/groupsnapshotclass-v1alpha1.yaml b/examples/kubernetes/groupsnapshotclass-v1beta1.yaml similarity index 72% rename from examples/kubernetes/groupsnapshotclass-v1alpha1.yaml rename to examples/kubernetes/groupsnapshotclass-v1beta1.yaml index 014e2c3fe..1ffaa3d57 100644 --- a/examples/kubernetes/groupsnapshotclass-v1alpha1.yaml +++ b/examples/kubernetes/groupsnapshotclass-v1beta1.yaml @@ -1,5 +1,5 @@ --- -apiVersion: groupsnapshot.storage.k8s.io/v1alpha1 +apiVersion: groupsnapshot.storage.k8s.io/v1beta1 kind: VolumeGroupSnapshotClass metadata: name: csi-hostpath-groupsnapclass diff --git a/pkg/common-controller/framework_test.go b/pkg/common-controller/framework_test.go index 9627a3fb1..97981b923 100644 --- a/pkg/common-controller/framework_test.go +++ b/pkg/common-controller/framework_test.go @@ -33,13 +33,13 @@ import ( "time" jsonpatch "github.com/evanphx/json-patch" - crdv1alpha1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1alpha1" + crdv1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta1" crdv1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumesnapshot/v1" clientset "github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned" "github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/fake" snapshotscheme "github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/scheme" informers "github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions" - groupstoragelisters "github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1alpha1" + groupstoragelisters "github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1beta1" storagelisters "github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumesnapshot/v1" "github.com/kubernetes-csi/external-snapshotter/v8/pkg/metrics" "github.com/kubernetes-csi/external-snapshotter/v8/pkg/utils" @@ -101,13 +101,13 @@ type controllerTest struct { // Expected content of controller snapshot cache at the end of the test. expectedSnapshots []*crdv1.VolumeSnapshot // Initial content of controller content cache. - initialGroupSnapshots []*crdv1alpha1.VolumeGroupSnapshot + initialGroupSnapshots []*crdv1beta1.VolumeGroupSnapshot // Expected content of controller content cache at the end of the test. - expectedGroupSnapshots []*crdv1alpha1.VolumeGroupSnapshot + expectedGroupSnapshots []*crdv1beta1.VolumeGroupSnapshot // Initial content of controller content cache. - initialGroupContents []*crdv1alpha1.VolumeGroupSnapshotContent + initialGroupContents []*crdv1beta1.VolumeGroupSnapshotContent // Expected content of controller content cache at the end of the test. - expectedGroupContents []*crdv1alpha1.VolumeGroupSnapshotContent + expectedGroupContents []*crdv1beta1.VolumeGroupSnapshotContent // Initial content of controller volume cache. initialVolumes []*v1.PersistentVolume // Initial content of controller claim cache. @@ -134,9 +134,9 @@ const ( var ( errVersionConflict = errors.New("VersionError") nocontents []*crdv1.VolumeSnapshotContent - nogroupcontents []*crdv1alpha1.VolumeGroupSnapshotContent + nogroupcontents []*crdv1beta1.VolumeGroupSnapshotContent nosnapshots []*crdv1.VolumeSnapshot - nogroupsnapshots []*crdv1alpha1.VolumeGroupSnapshot + nogroupsnapshots []*crdv1beta1.VolumeGroupSnapshot noevents = []string{} noerrors = []reactorError{} ) @@ -165,9 +165,9 @@ type snapshotReactor struct { contents map[string]*crdv1.VolumeSnapshotContent snapshots map[string]*crdv1.VolumeSnapshot snapshotClasses map[string]*crdv1.VolumeSnapshotClass - groupContents map[string]*crdv1alpha1.VolumeGroupSnapshotContent - groupSnapshots map[string]*crdv1alpha1.VolumeGroupSnapshot - groupSnapshotClasses map[string]*crdv1alpha1.VolumeGroupSnapshotClass + groupContents map[string]*crdv1beta1.VolumeGroupSnapshotContent + groupSnapshots map[string]*crdv1beta1.VolumeGroupSnapshot + groupSnapshotClasses map[string]*crdv1beta1.VolumeGroupSnapshotClass changedObjects []interface{} changedSinceLastSync int ctrl *csiSnapshotCommonController @@ -243,7 +243,7 @@ func withSnapshotFinalizers(snapshots []*crdv1.VolumeSnapshot, finalizers ...str return snapshots } -func withGroupSnapshotFinalizers(groupSnapshots []*crdv1alpha1.VolumeGroupSnapshot, finalizers ...string) []*crdv1alpha1.VolumeGroupSnapshot { +func withGroupSnapshotFinalizers(groupSnapshots []*crdv1beta1.VolumeGroupSnapshot, finalizers ...string) []*crdv1beta1.VolumeGroupSnapshot { for i := range groupSnapshots { for _, f := range finalizers { groupSnapshots[i].ObjectMeta.Finalizers = append(groupSnapshots[i].ObjectMeta.Finalizers, f) @@ -299,7 +299,7 @@ func (r *snapshotReactor) React(action core.Action) (handled bool, ret runtime.O case action.Matches("create", "volumegroupsnapshotcontents"): obj := action.(core.UpdateAction).GetObject() - content := obj.(*crdv1alpha1.VolumeGroupSnapshotContent) + content := obj.(*crdv1beta1.VolumeGroupSnapshotContent) // check the content does not exist _, found := r.contents[content.Name] @@ -342,7 +342,7 @@ func (r *snapshotReactor) React(action core.Action) (handled bool, ret runtime.O case action.Matches("update", "volumegroupsnapshotcontents"): obj := action.(core.UpdateAction).GetObject() - content := obj.(*crdv1alpha1.VolumeGroupSnapshotContent) + content := obj.(*crdv1beta1.VolumeGroupSnapshotContent) // Check and bump object version storedVolume, found := r.contents[content.Name] @@ -407,7 +407,7 @@ func (r *snapshotReactor) React(action core.Action) (handled bool, ret runtime.O return true, content, nil case action.Matches("patch", "volumegroupsnapshotcontents"): - content := &crdv1alpha1.VolumeGroupSnapshotContent{} + content := &crdv1beta1.VolumeGroupSnapshotContent{} action := action.(core.PatchAction) // Check and bump object version @@ -474,7 +474,7 @@ func (r *snapshotReactor) React(action core.Action) (handled bool, ret runtime.O case action.Matches("update", "volumegroupsnapshots"): obj := action.(core.UpdateAction).GetObject() - groupSnapshot := obj.(*crdv1alpha1.VolumeGroupSnapshot) + groupSnapshot := obj.(*crdv1beta1.VolumeGroupSnapshot) // Check and bump object version storedGroupSnapshot, found := r.groupSnapshots[groupSnapshot.Name] @@ -795,12 +795,12 @@ func (r *snapshotReactor) checkContents(expectedContents []*crdv1.VolumeSnapshot // checkGroupContents compares all expectedGroupContents with set of contents at the end of // the test and reports differences. -func (r *snapshotReactor) checkGroupContents(expectedGroupContents []*crdv1alpha1.VolumeGroupSnapshotContent) error { +func (r *snapshotReactor) checkGroupContents(expectedGroupContents []*crdv1beta1.VolumeGroupSnapshotContent) error { r.lock.Lock() defer r.lock.Unlock() - expectedMap := make(map[string]*crdv1alpha1.VolumeGroupSnapshotContent) - gotMap := make(map[string]*crdv1alpha1.VolumeGroupSnapshotContent) + expectedMap := make(map[string]*crdv1beta1.VolumeGroupSnapshotContent) + gotMap := make(map[string]*crdv1beta1.VolumeGroupSnapshotContent) // Clear any ResourceVersion from both sets for _, v := range expectedGroupContents { // Don't modify the existing object @@ -869,12 +869,12 @@ func (r *snapshotReactor) checkSnapshots(expectedSnapshots []*crdv1.VolumeSnapsh // checkGroupSnapshots compares all expectedGroupSnapshots with set of snapshots at the end of the // test and reports differences. -func (r *snapshotReactor) checkGroupSnapshots(expectedGroupSnapshots []*crdv1alpha1.VolumeGroupSnapshot) error { +func (r *snapshotReactor) checkGroupSnapshots(expectedGroupSnapshots []*crdv1beta1.VolumeGroupSnapshot) error { r.lock.Lock() defer r.lock.Unlock() - expectedMap := make(map[string]*crdv1alpha1.VolumeGroupSnapshot) - gotMap := make(map[string]*crdv1alpha1.VolumeGroupSnapshot) + expectedMap := make(map[string]*crdv1beta1.VolumeGroupSnapshot) + gotMap := make(map[string]*crdv1beta1.VolumeGroupSnapshot) for _, c := range expectedGroupSnapshots { // Don't modify the existing object c = c.DeepCopy() @@ -1129,9 +1129,9 @@ func newSnapshotReactor(kubeClient *kubefake.Clientset, client *fake.Clientset, snapshotClasses: make(map[string]*crdv1.VolumeSnapshotClass), contents: make(map[string]*crdv1.VolumeSnapshotContent), snapshots: make(map[string]*crdv1.VolumeSnapshot), - groupSnapshotClasses: make(map[string]*crdv1alpha1.VolumeGroupSnapshotClass), - groupContents: make(map[string]*crdv1alpha1.VolumeGroupSnapshotContent), - groupSnapshots: make(map[string]*crdv1alpha1.VolumeGroupSnapshot), + groupSnapshotClasses: make(map[string]*crdv1beta1.VolumeGroupSnapshotClass), + groupContents: make(map[string]*crdv1beta1.VolumeGroupSnapshotContent), + groupSnapshots: make(map[string]*crdv1beta1.VolumeGroupSnapshot), ctrl: ctrl, fakeContentWatch: fakeVolumeWatch, fakeSnapshotWatch: fakeClaimWatch, @@ -1196,9 +1196,9 @@ func newTestController(kubeClient kubernetes.Interface, clientset clientset.Inte informerFactory.Snapshot().V1().VolumeSnapshots(), informerFactory.Snapshot().V1().VolumeSnapshotContents(), informerFactory.Snapshot().V1().VolumeSnapshotClasses(), - informerFactory.Groupsnapshot().V1alpha1().VolumeGroupSnapshots(), - informerFactory.Groupsnapshot().V1alpha1().VolumeGroupSnapshotContents(), - informerFactory.Groupsnapshot().V1alpha1().VolumeGroupSnapshotClasses(), + informerFactory.Groupsnapshot().V1beta1().VolumeGroupSnapshots(), + informerFactory.Groupsnapshot().V1beta1().VolumeGroupSnapshotContents(), + informerFactory.Groupsnapshot().V1beta1().VolumeGroupSnapshotClasses(), coreFactory.Core().V1().PersistentVolumeClaims(), coreFactory.Core().V1().PersistentVolumes(), nil, @@ -1280,21 +1280,21 @@ func newContent(contentName, boundToSnapshotUID, boundToSnapshotName, snapshotHa func newGroupSnapshotContent(groupSnapshotContentName, boundToGroupSnapshotUID, boundToGroupSnapshotName, groupSnapshotHandle, groupSnapshotClassName string, desiredVolumeHandles []string, targetVolumeGroupSnapshotHandle string, deletionPolicy crdv1.DeletionPolicy, creationTime *int64, - withFinalizer bool, withStatus bool) *crdv1alpha1.VolumeGroupSnapshotContent { + withFinalizer bool, withStatus bool) *crdv1beta1.VolumeGroupSnapshotContent { ready := true - content := crdv1alpha1.VolumeGroupSnapshotContent{ + content := crdv1beta1.VolumeGroupSnapshotContent{ ObjectMeta: metav1.ObjectMeta{ Name: groupSnapshotContentName, ResourceVersion: "1", }, - Spec: crdv1alpha1.VolumeGroupSnapshotContentSpec{ + Spec: crdv1beta1.VolumeGroupSnapshotContentSpec{ Driver: mockDriverName, DeletionPolicy: deletionPolicy, }, } if withStatus { - content.Status = &crdv1alpha1.VolumeGroupSnapshotContentStatus{ + content.Status = &crdv1beta1.VolumeGroupSnapshotContentStatus{ CreationTime: creationTime, ReadyToUse: &ready, } @@ -1309,7 +1309,7 @@ func newGroupSnapshotContent(groupSnapshotContentName, boundToGroupSnapshotUID, } if targetVolumeGroupSnapshotHandle != "" { - content.Spec.Source.GroupSnapshotHandles = &crdv1alpha1.GroupSnapshotHandles{ + content.Spec.Source.GroupSnapshotHandles = &crdv1beta1.GroupSnapshotHandles{ VolumeGroupSnapshotHandle: targetVolumeGroupSnapshotHandle, } } @@ -1321,7 +1321,7 @@ func newGroupSnapshotContent(groupSnapshotContentName, boundToGroupSnapshotUID, if boundToGroupSnapshotName != "" { content.Spec.VolumeGroupSnapshotRef = v1.ObjectReference{ Kind: "VolumeGroupSnapshot", - APIVersion: "groupsnapshot.storage.k8s.io/v1alpha1", + APIVersion: "groupsnapshot.storage.k8s.io/v1beta1", UID: types.UID(boundToGroupSnapshotUID), Namespace: testNamespace, Name: boundToGroupSnapshotName, @@ -1337,8 +1337,8 @@ func newGroupSnapshotContent(groupSnapshotContentName, boundToGroupSnapshotUID, func newGroupSnapshotContentArray(groupSnapshotContentName, boundToGroupSnapshotUID, boundToGroupSnapshotSnapshotName, groupSnapshotHandle, groupSnapshotClassName string, desiredVolumeHandles []string, volumeGroupHandle string, deletionPolicy crdv1.DeletionPolicy, creationTime *int64, - withFinalizer bool, withStatus bool) []*crdv1alpha1.VolumeGroupSnapshotContent { - return []*crdv1alpha1.VolumeGroupSnapshotContent{ + withFinalizer bool, withStatus bool) []*crdv1beta1.VolumeGroupSnapshotContent { + return []*crdv1beta1.VolumeGroupSnapshotContent{ newGroupSnapshotContent(groupSnapshotContentName, boundToGroupSnapshotUID, boundToGroupSnapshotSnapshotName, groupSnapshotHandle, groupSnapshotClassName, desiredVolumeHandles, volumeGroupHandle, deletionPolicy, creationTime, withFinalizer, withStatus), @@ -1379,12 +1379,12 @@ func withContentFinalizer(content *crdv1.VolumeSnapshotContent) *crdv1.VolumeSna return content } -func withGroupContentFinalizer(content *crdv1alpha1.VolumeGroupSnapshotContent) *crdv1alpha1.VolumeGroupSnapshotContent { +func withGroupContentFinalizer(content *crdv1beta1.VolumeGroupSnapshotContent) *crdv1beta1.VolumeGroupSnapshotContent { content.ObjectMeta.Finalizers = append(content.ObjectMeta.Finalizers, utils.VolumeGroupSnapshotContentFinalizer) return content } -func withGroupContentAnnotations(contents []*crdv1alpha1.VolumeGroupSnapshotContent, annotations map[string]string) []*crdv1alpha1.VolumeGroupSnapshotContent { +func withGroupContentAnnotations(contents []*crdv1beta1.VolumeGroupSnapshotContent, annotations map[string]string) []*crdv1beta1.VolumeGroupSnapshotContent { for i := range contents { if contents[i].ObjectMeta.Annotations == nil { contents[i].ObjectMeta.Annotations = make(map[string]string) @@ -1494,17 +1494,17 @@ func newSnapshot( func newGroupSnapshot( groupSnapshotName, groupSnapshotUID string, selectors map[string]string, targetContentName, groupSnapshotClassName, boundContentName string, readyToUse *bool, creationTime *metav1.Time, - err *crdv1.VolumeSnapshotError, nilStatus bool, withAllFinalizers bool, deletionTimestamp *metav1.Time) *crdv1alpha1.VolumeGroupSnapshot { - groupSnapshot := crdv1alpha1.VolumeGroupSnapshot{ + err *crdv1.VolumeSnapshotError, nilStatus bool, withAllFinalizers bool, deletionTimestamp *metav1.Time) *crdv1beta1.VolumeGroupSnapshot { + groupSnapshot := crdv1beta1.VolumeGroupSnapshot{ ObjectMeta: metav1.ObjectMeta{ Name: groupSnapshotName, Namespace: testNamespace, UID: types.UID(groupSnapshotUID), ResourceVersion: "1", - SelfLink: "/apis/groupsnapshot.storage.k8s.io/v1alpha1/namespaces/" + testNamespace + "/volumesnapshots/" + groupSnapshotName, + SelfLink: "/apis/groupsnapshot.storage.k8s.io/v1beta1/namespaces/" + testNamespace + "/volumesnapshots/" + groupSnapshotName, DeletionTimestamp: deletionTimestamp, }, - Spec: crdv1alpha1.VolumeGroupSnapshotSpec{ + Spec: crdv1beta1.VolumeGroupSnapshotSpec{ VolumeGroupSnapshotClassName: nil, }, } @@ -1516,7 +1516,7 @@ func newGroupSnapshot( } if !nilStatus { - groupSnapshot.Status = &crdv1alpha1.VolumeGroupSnapshotStatus{ + groupSnapshot.Status = &crdv1beta1.VolumeGroupSnapshotStatus{ CreationTime: creationTime, ReadyToUse: readyToUse, Error: err, @@ -1535,7 +1535,7 @@ func newGroupSnapshot( groupSnapshot.Spec.Source.VolumeGroupSnapshotContentName = &targetContentName } if withAllFinalizers { - return withGroupSnapshotFinalizers([]*crdv1alpha1.VolumeGroupSnapshot{&groupSnapshot}, utils.VolumeGroupSnapshotContentFinalizer, utils.VolumeGroupSnapshotBoundFinalizer)[0] + return withGroupSnapshotFinalizers([]*crdv1beta1.VolumeGroupSnapshot{&groupSnapshot}, utils.VolumeGroupSnapshotContentFinalizer, utils.VolumeGroupSnapshotBoundFinalizer)[0] } return &groupSnapshot } @@ -1543,8 +1543,8 @@ func newGroupSnapshot( func newGroupSnapshotArray( groupSnapshotName, groupSnapshotUID string, selectors map[string]string, targetContentName, groupSnapshotClassName, boundContentName string, readyToUse *bool, creationTime *metav1.Time, - err *crdv1.VolumeSnapshotError, nilStatus bool, withAllFinalizers bool, deletionTimestamp *metav1.Time) []*crdv1alpha1.VolumeGroupSnapshot { - return []*crdv1alpha1.VolumeGroupSnapshot{ + err *crdv1.VolumeSnapshotError, nilStatus bool, withAllFinalizers bool, deletionTimestamp *metav1.Time) []*crdv1beta1.VolumeGroupSnapshot { + return []*crdv1beta1.VolumeGroupSnapshot{ newGroupSnapshot(groupSnapshotName, groupSnapshotUID, selectors, targetContentName, groupSnapshotClassName, boundContentName, readyToUse, creationTime, err, nilStatus, withAllFinalizers, deletionTimestamp), } } @@ -1909,7 +1909,7 @@ func evaluateTestResults(ctrl *csiSnapshotCommonController, reactor *snapshotRea // 2. Call the tested function (syncSnapshot/syncContent) via // controllerTest.testCall *once*. // 3. Compare resulting contents and snapshots with expected contents and snapshots. -func runSyncTests(t *testing.T, tests []controllerTest, snapshotClasses []*crdv1.VolumeSnapshotClass, groupSnapshotClasses []*crdv1alpha1.VolumeGroupSnapshotClass) { +func runSyncTests(t *testing.T, tests []controllerTest, snapshotClasses []*crdv1.VolumeSnapshotClass, groupSnapshotClasses []*crdv1beta1.VolumeGroupSnapshotClass) { snapshotscheme.AddToScheme(scheme.Scheme) for _, test := range tests { klog.V(4).Infof("starting test %q", test.name) diff --git a/pkg/common-controller/groupsnapshot_controller_helper.go b/pkg/common-controller/groupsnapshot_controller_helper.go index de92d9509..9032acdfa 100644 --- a/pkg/common-controller/groupsnapshot_controller_helper.go +++ b/pkg/common-controller/groupsnapshot_controller_helper.go @@ -31,7 +31,7 @@ import ( ref "k8s.io/client-go/tools/reference" klog "k8s.io/klog/v2" - crdv1alpha1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1alpha1" + crdv1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta1" crdv1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumesnapshot/v1" "github.com/kubernetes-csi/external-snapshotter/v8/pkg/metrics" "github.com/kubernetes-csi/external-snapshotter/v8/pkg/utils" @@ -46,7 +46,7 @@ func (ctrl *csiSnapshotCommonController) storeGroupSnapshotContentUpdate(groupsn } // getGroupSnapshotClass is a helper function to get group snapshot class from the group snapshot class name. -func (ctrl *csiSnapshotCommonController) getGroupSnapshotClass(className string) (*crdv1alpha1.VolumeGroupSnapshotClass, error) { +func (ctrl *csiSnapshotCommonController) getGroupSnapshotClass(className string) (*crdv1beta1.VolumeGroupSnapshotClass, error) { klog.V(5).Infof("getGroupSnapshotClass: VolumeGroupSnapshotClassName [%s]", className) groupSnapshotClass, err := ctrl.groupSnapshotClassLister.Get(className) @@ -71,7 +71,7 @@ func (ctrl *csiSnapshotCommonController) getGroupSnapshotClass(className string) // if true, ReadyToUse will be set to false; // otherwise, ReadyToUse will not be changed. // - eventtype, reason, message - event to send, see EventRecorder.Event() -func (ctrl *csiSnapshotCommonController) updateGroupSnapshotErrorStatusWithEvent(groupSnapshot *crdv1alpha1.VolumeGroupSnapshot, setReadyToFalse bool, eventtype, reason, message string) error { +func (ctrl *csiSnapshotCommonController) updateGroupSnapshotErrorStatusWithEvent(groupSnapshot *crdv1beta1.VolumeGroupSnapshot, setReadyToFalse bool, eventtype, reason, message string) error { klog.V(5).Infof("updateGroupSnapshotErrorStatusWithEvent[%s]", utils.GroupSnapshotKey(groupSnapshot)) if groupSnapshot.Status != nil && groupSnapshot.Status.Error != nil && *groupSnapshot.Status.Error.Message == message { @@ -80,7 +80,7 @@ func (ctrl *csiSnapshotCommonController) updateGroupSnapshotErrorStatusWithEvent } groupSnapshotClone := groupSnapshot.DeepCopy() if groupSnapshotClone.Status == nil { - groupSnapshotClone.Status = &crdv1alpha1.VolumeGroupSnapshotStatus{} + groupSnapshotClone.Status = &crdv1beta1.VolumeGroupSnapshotStatus{} } statusError := &crdv1.VolumeSnapshotError{ Time: &metav1.Time{ @@ -94,7 +94,7 @@ func (ctrl *csiSnapshotCommonController) updateGroupSnapshotErrorStatusWithEvent ready := false groupSnapshotClone.Status.ReadyToUse = &ready } - newSnapshot, err := ctrl.clientset.GroupsnapshotV1alpha1().VolumeGroupSnapshots(groupSnapshotClone.Namespace).UpdateStatus(context.TODO(), groupSnapshotClone, metav1.UpdateOptions{}) + newSnapshot, err := ctrl.clientset.GroupsnapshotV1beta1().VolumeGroupSnapshots(groupSnapshotClone.Namespace).UpdateStatus(context.TODO(), groupSnapshotClone, metav1.UpdateOptions{}) // Emit the event even if the status update fails so that user can see the error ctrl.eventRecorder.Event(newSnapshot, eventtype, reason, message) @@ -119,7 +119,7 @@ func (ctrl *csiSnapshotCommonController) updateGroupSnapshotErrorStatusWithEvent // For dynamic provisioning, it gets the default GroupSnapshotClasses in the // system if there is any (could be multiple), and finds the one with the same // CSI Driver as a PV from which a group snapshot will be taken. -func (ctrl *csiSnapshotCommonController) SetDefaultGroupSnapshotClass(groupSnapshot *crdv1alpha1.VolumeGroupSnapshot) (*crdv1alpha1.VolumeGroupSnapshotClass, *crdv1alpha1.VolumeGroupSnapshot, error) { +func (ctrl *csiSnapshotCommonController) SetDefaultGroupSnapshotClass(groupSnapshot *crdv1beta1.VolumeGroupSnapshot) (*crdv1beta1.VolumeGroupSnapshotClass, *crdv1beta1.VolumeGroupSnapshot, error) { klog.V(5).Infof("SetDefaultGroupSnapshotClass for group snapshot [%s]", groupSnapshot.Name) if groupSnapshot.Spec.Source.VolumeGroupSnapshotContentName != nil { @@ -140,7 +140,7 @@ func (ctrl *csiSnapshotCommonController) SetDefaultGroupSnapshotClass(groupSnaps return nil, groupSnapshot, err } - defaultClasses := []*crdv1alpha1.VolumeGroupSnapshotClass{} + defaultClasses := []*crdv1beta1.VolumeGroupSnapshotClass{} for _, groupSnapshotClass := range list { if utils.IsVolumeGroupSnapshotClassDefaultAnnotation(groupSnapshotClass.ObjectMeta) && pvDriver == groupSnapshotClass.Driver { defaultClasses = append(defaultClasses, groupSnapshotClass) @@ -157,7 +157,7 @@ func (ctrl *csiSnapshotCommonController) SetDefaultGroupSnapshotClass(groupSnaps klog.V(5).Infof("setDefaultGroupSnapshotClass [%s]: default VolumeGroupSnapshotClassName [%s]", groupSnapshot.Name, defaultClasses[0].Name) groupSnapshotClone := groupSnapshot.DeepCopy() groupSnapshotClone.Spec.VolumeGroupSnapshotClassName = &(defaultClasses[0].Name) - newGroupSnapshot, err := ctrl.clientset.GroupsnapshotV1alpha1().VolumeGroupSnapshots(groupSnapshotClone.Namespace).Update(context.TODO(), groupSnapshotClone, metav1.UpdateOptions{}) + newGroupSnapshot, err := ctrl.clientset.GroupsnapshotV1beta1().VolumeGroupSnapshots(groupSnapshotClone.Namespace).Update(context.TODO(), groupSnapshotClone, metav1.UpdateOptions{}) if err != nil { klog.V(4).Infof("updating VolumeGroupSnapshot[%s] default group snapshot class failed %v", utils.GroupSnapshotKey(groupSnapshot), err) } @@ -174,7 +174,7 @@ func (ctrl *csiSnapshotCommonController) SetDefaultGroupSnapshotClass(groupSnaps // It looks up every PVC from which the group snapshot is specified to be created from, and looks for the PVC's // corresponding PV. Bi-directional binding will be verified between PVC and PV before the PV's CSI driver is returned. // For an non-CSI volume, it returns an error immediately as it's not supported. -func (ctrl *csiSnapshotCommonController) pvDriverFromGroupSnapshot(groupSnapshot *crdv1alpha1.VolumeGroupSnapshot) (string, error) { +func (ctrl *csiSnapshotCommonController) pvDriverFromGroupSnapshot(groupSnapshot *crdv1beta1.VolumeGroupSnapshot) (string, error) { pvs, err := ctrl.getVolumesFromVolumeGroupSnapshot(groupSnapshot) if err != nil { return "", err @@ -187,7 +187,7 @@ func (ctrl *csiSnapshotCommonController) pvDriverFromGroupSnapshot(groupSnapshot } // getVolumesFromVolumeGroupSnapshot returns the list of PersistentVolume from a VolumeGroupSnapshot. -func (ctrl *csiSnapshotCommonController) getVolumesFromVolumeGroupSnapshot(groupSnapshot *crdv1alpha1.VolumeGroupSnapshot) ([]*v1.PersistentVolume, error) { +func (ctrl *csiSnapshotCommonController) getVolumesFromVolumeGroupSnapshot(groupSnapshot *crdv1beta1.VolumeGroupSnapshot) ([]*v1.PersistentVolume, error) { var pvReturnList []*v1.PersistentVolume pvcs, err := ctrl.getClaimsFromVolumeGroupSnapshot(groupSnapshot) if err != nil { @@ -218,7 +218,7 @@ func (ctrl *csiSnapshotCommonController) getVolumesFromVolumeGroupSnapshot(group } // getClaimsFromVolumeGroupSnapshot is a helper function to get a list of PVCs from VolumeGroupSnapshot. -func (ctrl *csiSnapshotCommonController) getClaimsFromVolumeGroupSnapshot(groupSnapshot *crdv1alpha1.VolumeGroupSnapshot) ([]v1.PersistentVolumeClaim, error) { +func (ctrl *csiSnapshotCommonController) getClaimsFromVolumeGroupSnapshot(groupSnapshot *crdv1beta1.VolumeGroupSnapshot) ([]v1.PersistentVolumeClaim, error) { labelSelector := groupSnapshot.Spec.Source.Selector // Get PVC that has group snapshot label applied. @@ -234,7 +234,7 @@ func (ctrl *csiSnapshotCommonController) getClaimsFromVolumeGroupSnapshot(groupS // updateGroupSnapshot runs in worker thread and handles "groupsnapshot added", // "groupsnapshot updated" and "periodic sync" events. -func (ctrl *csiSnapshotCommonController) updateGroupSnapshot(groupSnapshot *crdv1alpha1.VolumeGroupSnapshot) error { +func (ctrl *csiSnapshotCommonController) updateGroupSnapshot(groupSnapshot *crdv1beta1.VolumeGroupSnapshot) error { // Store the new group snapshot version in the cache and do not process it // if this is an old version. klog.V(5).Infof("updateGroupSnapshot %q", utils.GroupSnapshotKey(groupSnapshot)) @@ -261,7 +261,7 @@ func (ctrl *csiSnapshotCommonController) updateGroupSnapshot(groupSnapshot *crdv } // deleteGroupSnapshot runs in worker thread and handles "groupsnapshot deleted" event. -func (ctrl *csiSnapshotCommonController) deleteGroupSnapshot(groupSnapshot *crdv1alpha1.VolumeGroupSnapshot) { +func (ctrl *csiSnapshotCommonController) deleteGroupSnapshot(groupSnapshot *crdv1beta1.VolumeGroupSnapshot) { _ = ctrl.snapshotStore.Delete(groupSnapshot) klog.V(4).Infof("group snapshot %q deleted", utils.GroupSnapshotKey(groupSnapshot)) @@ -294,7 +294,7 @@ func (ctrl *csiSnapshotCommonController) deleteGroupSnapshot(groupSnapshot *crdv // a group snapshot is created, updated or periodically synced. We do not // differentiate between these events. // For easier readability, it is split into syncUnreadyGroupSnapshot and syncReadyGroupSnapshot -func (ctrl *csiSnapshotCommonController) syncGroupSnapshot(groupSnapshot *crdv1alpha1.VolumeGroupSnapshot) error { +func (ctrl *csiSnapshotCommonController) syncGroupSnapshot(groupSnapshot *crdv1beta1.VolumeGroupSnapshot) error { klog.V(5).Infof("synchronizing VolumeGroupSnapshot[%s]", utils.GroupSnapshotKey(groupSnapshot)) klog.V(5).Infof("syncGroupSnapshot [%s]: check if we should remove finalizer on group snapshot PVC source and remove it if we can", utils.GroupSnapshotKey(groupSnapshot)) @@ -335,7 +335,7 @@ func (ctrl *csiSnapshotCommonController) syncGroupSnapshot(groupSnapshot *crdv1a // snapshot content successfully before. // If there is any problem with the binding (e.g., group snapshot points to a // non-existent group snapshot content), update the group snapshot status and emit event. -func (ctrl *csiSnapshotCommonController) syncReadyGroupSnapshot(groupSnapshot *crdv1alpha1.VolumeGroupSnapshot) error { +func (ctrl *csiSnapshotCommonController) syncReadyGroupSnapshot(groupSnapshot *crdv1beta1.VolumeGroupSnapshot) error { if !utils.IsBoundVolumeGroupSnapshotContentNameSet(groupSnapshot) { return fmt.Errorf("group snapshot %s is not bound to a group snapshot content", utils.GroupSnapshotKey(groupSnapshot)) } @@ -363,7 +363,7 @@ func (ctrl *csiSnapshotCommonController) syncReadyGroupSnapshot(groupSnapshot *c // snapshot content cache store by name. // Note that if no VolumeGroupSnapshotContent exists in the cache store and no error // encountered, it returns (nil, nil) -func (ctrl *csiSnapshotCommonController) getGroupSnapshotContentFromStore(contentName string) (*crdv1alpha1.VolumeGroupSnapshotContent, error) { +func (ctrl *csiSnapshotCommonController) getGroupSnapshotContentFromStore(contentName string) (*crdv1beta1.VolumeGroupSnapshotContent, error) { obj, exist, err := ctrl.groupSnapshotContentStore.GetByKey(contentName) if err != nil { // should never reach here based on implementation at: @@ -374,7 +374,7 @@ func (ctrl *csiSnapshotCommonController) getGroupSnapshotContentFromStore(conten // not able to find a matching group snapshot content return nil, nil } - groupSnapshotContent, ok := obj.(*crdv1alpha1.VolumeGroupSnapshotContent) + groupSnapshotContent, ok := obj.(*crdv1beta1.VolumeGroupSnapshotContent) if !ok { return nil, fmt.Errorf("expected VolumeGroupSnapshotContent, got %+v", obj) } @@ -383,7 +383,7 @@ func (ctrl *csiSnapshotCommonController) getGroupSnapshotContentFromStore(conten // syncUnreadyGroupSnapshot is the main controller method to decide what to do // with a group snapshot which is not set to ready. -func (ctrl *csiSnapshotCommonController) syncUnreadyGroupSnapshot(groupSnapshot *crdv1alpha1.VolumeGroupSnapshot) error { +func (ctrl *csiSnapshotCommonController) syncUnreadyGroupSnapshot(groupSnapshot *crdv1beta1.VolumeGroupSnapshot) error { uniqueGroupSnapshotName := utils.GroupSnapshotKey(groupSnapshot) klog.V(5).Infof("syncUnreadyGroupSnapshot %s", uniqueGroupSnapshotName) driverName, err := ctrl.getGroupSnapshotDriverName(groupSnapshot) @@ -478,7 +478,7 @@ func (ctrl *csiSnapshotCommonController) syncUnreadyGroupSnapshot(groupSnapshot } // If reach here, it is a dynamically provisioned group snapshot, and the VolumeGroupSnapshotContent object is not yet created. - var groupSnapshotContent *crdv1alpha1.VolumeGroupSnapshotContent + var groupSnapshotContent *crdv1beta1.VolumeGroupSnapshotContent if groupSnapshotContent, err = ctrl.createGroupSnapshotContent(groupSnapshot); err != nil { ctrl.updateGroupSnapshotErrorStatusWithEvent(groupSnapshot, true, v1.EventTypeWarning, "GroupSnapshotContentCreationFailed", fmt.Sprintf("failed to create group snapshot content with error %v", err)) return err @@ -496,9 +496,9 @@ func (ctrl *csiSnapshotCommonController) syncUnreadyGroupSnapshot(groupSnapshot func (ctrl *csiSnapshotCommonController) createSnapshotsForGroupSnapshotContent( ctx context.Context, - groupSnapshotContent *crdv1alpha1.VolumeGroupSnapshotContent, - groupSnapshot *crdv1alpha1.VolumeGroupSnapshot, -) (*crdv1alpha1.VolumeGroupSnapshotContent, error) { + groupSnapshotContent *crdv1beta1.VolumeGroupSnapshotContent, + groupSnapshot *crdv1beta1.VolumeGroupSnapshot, +) (*crdv1beta1.VolumeGroupSnapshotContent, error) { // No status is present, or no volume snapshot was provisioned. // Let's wait for the snapshotter sidecar to fill it. if groupSnapshotContent.Status == nil || len(groupSnapshotContent.Status.VolumeSnapshotHandlePairList) == 0 { @@ -535,7 +535,7 @@ func (ctrl *csiSnapshotCommonController) createSnapshotsForGroupSnapshotContent( groupSnapshotContent.Name) groupSnapshotContent.Status.PVVolumeSnapshotContentList = make( - []crdv1alpha1.PVVolumeSnapshotContentPair, + []crdv1beta1.PVVolumeSnapshotContentPair, len(groupSnapshotContent.Status.VolumeSnapshotHandlePairList), ) for i, snapshot := range groupSnapshotContent.Status.VolumeSnapshotHandlePairList { @@ -620,7 +620,7 @@ func (ctrl *csiSnapshotCommonController) createSnapshotsForGroupSnapshotContent( "createSnapshotsForGroupSnapshotContent: creating volumesnapshot %w", err) } - groupSnapshotContent.Status.PVVolumeSnapshotContentList[i] = crdv1alpha1.PVVolumeSnapshotContentPair{ + groupSnapshotContent.Status.PVVolumeSnapshotContentList[i] = crdv1beta1.PVVolumeSnapshotContentPair{ VolumeSnapshotContentRef: v1.LocalObjectReference{ Name: volumeSnapshotContentName, }, @@ -742,7 +742,7 @@ func getSnapshotContentNameForVolumeGroupSnapshotContent(groupSnapshotContentUUI // VolumeGroupSnapshot, it updates the status of the group snapshot with an event // and returns an error. // Otherwise, the found group snapshot content will be returned. -func (ctrl *csiSnapshotCommonController) getPreprovisionedGroupSnapshotContentFromStore(groupSnapshot *crdv1alpha1.VolumeGroupSnapshot) (*crdv1alpha1.VolumeGroupSnapshotContent, error) { +func (ctrl *csiSnapshotCommonController) getPreprovisionedGroupSnapshotContentFromStore(groupSnapshot *crdv1beta1.VolumeGroupSnapshot) (*crdv1beta1.VolumeGroupSnapshotContent, error) { contentName := *groupSnapshot.Spec.Source.VolumeGroupSnapshotContentName if contentName == "" { return nil, fmt.Errorf("empty VolumeGroupSnapshotContentName for group snapshot %s", utils.GroupSnapshotKey(groupSnapshot)) @@ -779,7 +779,7 @@ func (ctrl *csiSnapshotCommonController) getPreprovisionedGroupSnapshotContentFr // the group snapshot content with the group snapshot. This is for static binding where // user has specified group snapshot name but not UID of the group snapshot in // groupSnapshotContent.Spec.VolumeGroupSnapshotRef. -func (ctrl *csiSnapshotCommonController) checkAndBindGroupSnapshotContent(groupSnapshot *crdv1alpha1.VolumeGroupSnapshot, groupSnapshotContent *crdv1alpha1.VolumeGroupSnapshotContent) (*crdv1alpha1.VolumeGroupSnapshotContent, error) { +func (ctrl *csiSnapshotCommonController) checkAndBindGroupSnapshotContent(groupSnapshot *crdv1beta1.VolumeGroupSnapshot, groupSnapshotContent *crdv1beta1.VolumeGroupSnapshotContent) (*crdv1beta1.VolumeGroupSnapshotContent, error) { if groupSnapshotContent.Spec.VolumeGroupSnapshotRef.Name != groupSnapshot.Name { return nil, fmt.Errorf("Could not bind group snapshot %s and group snapshot content %s, the VolumeGroupSnapshotRef does not match", groupSnapshot.Name, groupSnapshotContent.Name) } else if groupSnapshotContent.Spec.VolumeGroupSnapshotRef.UID != "" && groupSnapshotContent.Spec.VolumeGroupSnapshotRef.UID != groupSnapshot.UID { @@ -819,7 +819,7 @@ func (ctrl *csiSnapshotCommonController) checkAndBindGroupSnapshotContent(groupS } // updateGroupSnapshotStatus updates group snapshot status based on group snapshot content status -func (ctrl *csiSnapshotCommonController) updateGroupSnapshotStatus(groupSnapshot *crdv1alpha1.VolumeGroupSnapshot, groupSnapshotContent *crdv1alpha1.VolumeGroupSnapshotContent) (*crdv1alpha1.VolumeGroupSnapshot, error) { +func (ctrl *csiSnapshotCommonController) updateGroupSnapshotStatus(groupSnapshot *crdv1beta1.VolumeGroupSnapshot, groupSnapshotContent *crdv1beta1.VolumeGroupSnapshotContent) (*crdv1beta1.VolumeGroupSnapshot, error) { klog.V(5).Infof("updateGroupSnapshotStatus[%s]", utils.GroupSnapshotKey(groupSnapshot)) boundContentName := groupSnapshotContent.Name @@ -837,7 +837,7 @@ func (ctrl *csiSnapshotCommonController) updateGroupSnapshotStatus(groupSnapshot volumeSnapshotErr = groupSnapshotContent.Status.Error.DeepCopy() } - var pvcVolumeSnapshotRefList []crdv1alpha1.PVCVolumeSnapshotPair + var pvcVolumeSnapshotRefList []crdv1beta1.PVCVolumeSnapshotPair if groupSnapshotContent.Status != nil && len(groupSnapshotContent.Status.PVVolumeSnapshotContentList) != 0 { for _, contentRef := range groupSnapshotContent.Status.PVVolumeSnapshotContentList { var pvcReference v1.LocalObjectReference @@ -872,7 +872,7 @@ func (ctrl *csiSnapshotCommonController) updateGroupSnapshotStatus(groupSnapshot if err != nil { return nil, fmt.Errorf("failed to get snapshot content %s from snapshot content store: %v", contentRef.VolumeSnapshotContentRef.Name, err) } - pvcVolumeSnapshotRefList = append(pvcVolumeSnapshotRefList, crdv1alpha1.PVCVolumeSnapshotPair{ + pvcVolumeSnapshotRefList = append(pvcVolumeSnapshotRefList, crdv1beta1.PVCVolumeSnapshotPair{ VolumeSnapshotRef: v1.LocalObjectReference{ Name: volumeSnapshotContent.Spec.VolumeSnapshotRef.Name, }, @@ -883,15 +883,15 @@ func (ctrl *csiSnapshotCommonController) updateGroupSnapshotStatus(groupSnapshot klog.V(5).Infof("updateGroupSnapshotStatus: updating VolumeGroupSnapshot [%+v] based on VolumeGroupSnapshotContentStatus [%+v]", groupSnapshot, groupSnapshotContent.Status) - groupSnapshotObj, err := ctrl.clientset.GroupsnapshotV1alpha1().VolumeGroupSnapshots(groupSnapshot.Namespace).Get(context.TODO(), groupSnapshot.Name, metav1.GetOptions{}) + groupSnapshotObj, err := ctrl.clientset.GroupsnapshotV1beta1().VolumeGroupSnapshots(groupSnapshot.Namespace).Get(context.TODO(), groupSnapshot.Name, metav1.GetOptions{}) if err != nil { return nil, fmt.Errorf("error get group snapshot %s from api server: %v", utils.GroupSnapshotKey(groupSnapshot), err) } - var newStatus *crdv1alpha1.VolumeGroupSnapshotStatus + var newStatus *crdv1beta1.VolumeGroupSnapshotStatus updated := false if groupSnapshotObj.Status == nil { - newStatus = &crdv1alpha1.VolumeGroupSnapshotStatus{ + newStatus = &crdv1beta1.VolumeGroupSnapshotStatus{ BoundVolumeGroupSnapshotContentName: &boundContentName, ReadyToUse: &readyToUse, } @@ -963,7 +963,7 @@ func (ctrl *csiSnapshotCommonController) updateGroupSnapshotStatus(groupSnapshot ctrl.metricsManager.RecordMetrics(createAndReadyOperation, metrics.NewSnapshotOperationStatus(metrics.SnapshotStatusTypeSuccess), driverName) } - newGroupSnapshotObj, err := ctrl.clientset.GroupsnapshotV1alpha1().VolumeGroupSnapshots(groupSnapshotClone.Namespace).UpdateStatus(context.TODO(), groupSnapshotClone, metav1.UpdateOptions{}) + newGroupSnapshotObj, err := ctrl.clientset.GroupsnapshotV1beta1().VolumeGroupSnapshots(groupSnapshotClone.Namespace).UpdateStatus(context.TODO(), groupSnapshotClone, metav1.UpdateOptions{}) if err != nil { return nil, newControllerUpdateError(utils.GroupSnapshotKey(groupSnapshot), err.Error()) } @@ -987,7 +987,7 @@ func (ctrl *csiSnapshotCommonController) updateGroupSnapshotStatus(groupSnapshot // If a group snapshot content is found but it does not point to the passed in VolumeGroupSnapshot, // the passed in group snapshot will be updated with an error along with an event, // and an error will be returned. -func (ctrl *csiSnapshotCommonController) getDynamicallyProvisionedGroupContentFromStore(groupSnapshot *crdv1alpha1.VolumeGroupSnapshot) (*crdv1alpha1.VolumeGroupSnapshotContent, error) { +func (ctrl *csiSnapshotCommonController) getDynamicallyProvisionedGroupContentFromStore(groupSnapshot *crdv1beta1.VolumeGroupSnapshot) (*crdv1beta1.VolumeGroupSnapshotContent, error) { contentName := utils.GetDynamicSnapshotContentNameForGroupSnapshot(groupSnapshot) groupSnapshotContent, err := ctrl.getGroupSnapshotContentFromStore(contentName) if err != nil { @@ -1019,9 +1019,9 @@ func (ctrl *csiSnapshotCommonController) getDynamicallyProvisionedGroupContentFr } // This routine sets snapshot.Spec.Source.VolumeGroupSnapshotContentName -func (ctrl *csiSnapshotCommonController) bindandUpdateVolumeGroupSnapshot(groupSnapshotContent *crdv1alpha1.VolumeGroupSnapshotContent, groupSnapshot *crdv1alpha1.VolumeGroupSnapshot) (*crdv1alpha1.VolumeGroupSnapshot, error) { +func (ctrl *csiSnapshotCommonController) bindandUpdateVolumeGroupSnapshot(groupSnapshotContent *crdv1beta1.VolumeGroupSnapshotContent, groupSnapshot *crdv1beta1.VolumeGroupSnapshot) (*crdv1beta1.VolumeGroupSnapshot, error) { klog.V(5).Infof("bindandUpdateVolumeGroupSnapshot for group snapshot [%s]: groupSnapshotContent [%s]", groupSnapshot.Name, groupSnapshotContent.Name) - groupSnapshotObj, err := ctrl.clientset.GroupsnapshotV1alpha1().VolumeGroupSnapshots(groupSnapshot.Namespace).Get(context.TODO(), groupSnapshot.Name, metav1.GetOptions{}) + groupSnapshotObj, err := ctrl.clientset.GroupsnapshotV1beta1().VolumeGroupSnapshots(groupSnapshot.Namespace).Get(context.TODO(), groupSnapshot.Name, metav1.GetOptions{}) if err != nil { return nil, fmt.Errorf("error get group snapshot %s from api server: %v", utils.GroupSnapshotKey(groupSnapshot), err) } @@ -1029,7 +1029,7 @@ func (ctrl *csiSnapshotCommonController) bindandUpdateVolumeGroupSnapshot(groupS // Copy the group snapshot object before updating it groupSnapshotCopy := groupSnapshotObj.DeepCopy() // update group snapshot status - var updateGroupSnapshot *crdv1alpha1.VolumeGroupSnapshot + var updateGroupSnapshot *crdv1beta1.VolumeGroupSnapshot klog.V(5).Infof("bindandUpdateVolumeGroupSnapshot [%s]: trying to update group snapshot status", utils.GroupSnapshotKey(groupSnapshotCopy)) updateGroupSnapshot, err = ctrl.updateGroupSnapshotStatus(groupSnapshotCopy, groupSnapshotContent) if err == nil { @@ -1052,7 +1052,7 @@ func (ctrl *csiSnapshotCommonController) bindandUpdateVolumeGroupSnapshot(groupS } // createGroupSnapshotContent will only be called for dynamic provisioning -func (ctrl *csiSnapshotCommonController) createGroupSnapshotContent(groupSnapshot *crdv1alpha1.VolumeGroupSnapshot) (*crdv1alpha1.VolumeGroupSnapshotContent, error) { +func (ctrl *csiSnapshotCommonController) createGroupSnapshotContent(groupSnapshot *crdv1beta1.VolumeGroupSnapshot) (*crdv1beta1.VolumeGroupSnapshotContent, error) { klog.Infof("createGroupSnapshotContent: Creating group snapshot content for group snapshot %s through the plugin ...", utils.GroupSnapshotKey(groupSnapshot)) /* @@ -1103,13 +1103,13 @@ func (ctrl *csiSnapshotCommonController) createGroupSnapshotContent(groupSnapsho volumeHandles = append(volumeHandles, pv.Spec.CSI.VolumeHandle) } - groupSnapshotContent := &crdv1alpha1.VolumeGroupSnapshotContent{ + groupSnapshotContent := &crdv1beta1.VolumeGroupSnapshotContent{ ObjectMeta: metav1.ObjectMeta{ Name: contentName, }, - Spec: crdv1alpha1.VolumeGroupSnapshotContentSpec{ + Spec: crdv1beta1.VolumeGroupSnapshotContentSpec{ VolumeGroupSnapshotRef: *snapshotRef, - Source: crdv1alpha1.VolumeGroupSnapshotContentSource{ + Source: crdv1beta1.VolumeGroupSnapshotContentSource{ VolumeHandles: volumeHandles, }, VolumeGroupSnapshotClassName: &(groupSnapshotClass.Name), @@ -1129,11 +1129,11 @@ func (ctrl *csiSnapshotCommonController) createGroupSnapshotContent(groupSnapsho metav1.SetMetaDataAnnotation(&groupSnapshotContent.ObjectMeta, utils.AnnDeletionGroupSecretRefNamespace, snapshotterSecretRef.Namespace) } - var updateGroupSnapshotContent *crdv1alpha1.VolumeGroupSnapshotContent + var updateGroupSnapshotContent *crdv1beta1.VolumeGroupSnapshotContent klog.V(5).Infof("volume group snapshot content %#v", groupSnapshotContent) // Try to create the VolumeGroupSnapshotContent object klog.V(5).Infof("createGroupSnapshotContent [%s]: trying to save volume group snapshot content %s", utils.GroupSnapshotKey(groupSnapshot), groupSnapshotContent.Name) - if updateGroupSnapshotContent, err = ctrl.clientset.GroupsnapshotV1alpha1().VolumeGroupSnapshotContents().Create(context.TODO(), groupSnapshotContent, metav1.CreateOptions{}); err == nil || apierrs.IsAlreadyExists(err) { + if updateGroupSnapshotContent, err = ctrl.clientset.GroupsnapshotV1beta1().VolumeGroupSnapshotContents().Create(context.TODO(), groupSnapshotContent, metav1.CreateOptions{}); err == nil || apierrs.IsAlreadyExists(err) { // Save succeeded. if err != nil { klog.V(3).Infof("volume group snapshot content %q for group snapshot %q already exists, reusing", groupSnapshotContent.Name, utils.GroupSnapshotKey(groupSnapshot)) @@ -1163,10 +1163,10 @@ func (ctrl *csiSnapshotCommonController) createGroupSnapshotContent(groupSnapsho return updateGroupSnapshotContent, nil } -func (ctrl *csiSnapshotCommonController) getCreateGroupSnapshotInput(groupSnapshot *crdv1alpha1.VolumeGroupSnapshot) (*crdv1alpha1.VolumeGroupSnapshotClass, []*v1.PersistentVolume, string, *v1.SecretReference, error) { +func (ctrl *csiSnapshotCommonController) getCreateGroupSnapshotInput(groupSnapshot *crdv1beta1.VolumeGroupSnapshot) (*crdv1beta1.VolumeGroupSnapshotClass, []*v1.PersistentVolume, string, *v1.SecretReference, error) { className := groupSnapshot.Spec.VolumeGroupSnapshotClassName klog.V(5).Infof("getCreateGroupSnapshotInput [%s]", groupSnapshot.Name) - var groupSnapshotClass *crdv1alpha1.VolumeGroupSnapshotClass + var groupSnapshotClass *crdv1beta1.VolumeGroupSnapshotClass var err error if className != nil { groupSnapshotClass, err = ctrl.getGroupSnapshotClass(*className) @@ -1198,7 +1198,7 @@ func (ctrl *csiSnapshotCommonController) getCreateGroupSnapshotInput(groupSnapsh } // syncGroupSnapshotContent deals with one key off the queue -func (ctrl *csiSnapshotCommonController) syncGroupSnapshotContent(groupSnapshotContent *crdv1alpha1.VolumeGroupSnapshotContent) error { +func (ctrl *csiSnapshotCommonController) syncGroupSnapshotContent(groupSnapshotContent *crdv1beta1.VolumeGroupSnapshotContent) error { groupSnapshotName := utils.GroupSnapshotRefKey(&groupSnapshotContent.Spec.VolumeGroupSnapshotRef) klog.V(4).Infof("synchronizing VolumeGroupSnapshotContent[%s]: group snapshot content is bound to group snapshot %s", groupSnapshotContent.Name, groupSnapshotName) @@ -1231,7 +1231,7 @@ func (ctrl *csiSnapshotCommonController) syncGroupSnapshotContent(groupSnapshotC // If getGroupSnapshotFromStore returns (nil, nil), it means group snapshot not found // and it may have already been deleted, and it will fall into the // group snapshot == nil case below - var groupSnapshot *crdv1alpha1.VolumeGroupSnapshot + var groupSnapshot *crdv1beta1.VolumeGroupSnapshot groupSnapshot, err := ctrl.getGroupSnapshotFromStore(groupSnapshotName) if err != nil { return err @@ -1260,9 +1260,9 @@ func (ctrl *csiSnapshotCommonController) syncGroupSnapshotContent(groupSnapshotC // getGroupSnapshotFromStore finds group snapshot from the cache store. // If getGroupSnapshotFromStore returns (nil, nil), it means group snapshot not // found and it may have already been deleted. -func (ctrl *csiSnapshotCommonController) getGroupSnapshotFromStore(groupSnapshotName string) (*crdv1alpha1.VolumeGroupSnapshot, error) { +func (ctrl *csiSnapshotCommonController) getGroupSnapshotFromStore(groupSnapshotName string) (*crdv1beta1.VolumeGroupSnapshot, error) { // Get the VolumeGroupSnapshot by _name_ - var groupSnapshot *crdv1alpha1.VolumeGroupSnapshot + var groupSnapshot *crdv1beta1.VolumeGroupSnapshot obj, found, err := ctrl.groupSnapshotStore.GetByKey(groupSnapshotName) if err != nil { return nil, err @@ -1273,7 +1273,7 @@ func (ctrl *csiSnapshotCommonController) getGroupSnapshotFromStore(groupSnapshot return nil, nil } var ok bool - groupSnapshot, ok = obj.(*crdv1alpha1.VolumeGroupSnapshot) + groupSnapshot, ok = obj.(*crdv1beta1.VolumeGroupSnapshot) if !ok { return nil, fmt.Errorf("cannot convert object from group snapshot cache to group snapshot %q!?: %#v", groupSnapshotName, obj) } @@ -1285,7 +1285,7 @@ func (ctrl *csiSnapshotCommonController) getGroupSnapshotFromStore(groupSnapshot // needsUpdateGroupSnapshotStatus compares group snapshot status with the group snapshot content // status and decide if group snapshot status needs to be updated based on group snapshot content // status -func (ctrl *csiSnapshotCommonController) needsUpdateGroupSnapshotStatus(groupSnapshot *crdv1alpha1.VolumeGroupSnapshot, groupSnapshotContent *crdv1alpha1.VolumeGroupSnapshotContent) bool { +func (ctrl *csiSnapshotCommonController) needsUpdateGroupSnapshotStatus(groupSnapshot *crdv1beta1.VolumeGroupSnapshot, groupSnapshotContent *crdv1beta1.VolumeGroupSnapshotContent) bool { klog.V(5).Infof("needsUpdateGroupSnapshotStatus[%s]", utils.GroupSnapshotKey(groupSnapshot)) if groupSnapshot.Status == nil && groupSnapshotContent.Status != nil { @@ -1311,7 +1311,7 @@ func (ctrl *csiSnapshotCommonController) needsUpdateGroupSnapshotStatus(groupSna } // addGroupSnapshotContentFinalizer adds a Finalizer for VolumeGroupSnapshotContent. -func (ctrl *csiSnapshotCommonController) addGroupSnapshotContentFinalizer(groupSnapshotContent *crdv1alpha1.VolumeGroupSnapshotContent) error { +func (ctrl *csiSnapshotCommonController) addGroupSnapshotContentFinalizer(groupSnapshotContent *crdv1beta1.VolumeGroupSnapshotContent) error { var patches []utils.PatchOp if len(groupSnapshotContent.Finalizers) > 0 { // Add to the end of the finalizers if we have any other finalizers @@ -1343,10 +1343,10 @@ func (ctrl *csiSnapshotCommonController) addGroupSnapshotContentFinalizer(groupS } // checkandAddGroupSnapshotFinalizers checks and adds group snapshot finailzers when needed -func (ctrl *csiSnapshotCommonController) checkandAddGroupSnapshotFinalizers(groupSnapshot *crdv1alpha1.VolumeGroupSnapshot) error { +func (ctrl *csiSnapshotCommonController) checkandAddGroupSnapshotFinalizers(groupSnapshot *crdv1beta1.VolumeGroupSnapshot) error { // get the group snapshot content for this group snapshot var ( - groupSnapshotContent *crdv1alpha1.VolumeGroupSnapshotContent + groupSnapshotContent *crdv1beta1.VolumeGroupSnapshotContent err error ) if groupSnapshot.Spec.Source.VolumeGroupSnapshotContentName != nil { @@ -1373,8 +1373,8 @@ func (ctrl *csiSnapshotCommonController) checkandAddGroupSnapshotFinalizers(grou } // addGroupSnapshotFinalizer adds a Finalizer to a VolumeGroupSnapshot. -func (ctrl *csiSnapshotCommonController) addGroupSnapshotFinalizer(groupSnapshot *crdv1alpha1.VolumeGroupSnapshot, addBoundFinalizer bool) error { - var updatedGroupSnapshot *crdv1alpha1.VolumeGroupSnapshot +func (ctrl *csiSnapshotCommonController) addGroupSnapshotFinalizer(groupSnapshot *crdv1beta1.VolumeGroupSnapshot, addBoundFinalizer bool) error { + var updatedGroupSnapshot *crdv1beta1.VolumeGroupSnapshot var err error // NOTE(ggriffiths): Must perform an update if no finalizers exist. @@ -1384,7 +1384,7 @@ func (ctrl *csiSnapshotCommonController) addGroupSnapshotFinalizer(groupSnapshot if addBoundFinalizer { groupSnapshotClone.ObjectMeta.Finalizers = append(groupSnapshotClone.ObjectMeta.Finalizers, utils.VolumeGroupSnapshotBoundFinalizer) } - updatedGroupSnapshot, err = ctrl.clientset.GroupsnapshotV1alpha1().VolumeGroupSnapshots(groupSnapshotClone.Namespace).Update(context.TODO(), groupSnapshotClone, metav1.UpdateOptions{}) + updatedGroupSnapshot, err = ctrl.clientset.GroupsnapshotV1beta1().VolumeGroupSnapshots(groupSnapshotClone.Namespace).Update(context.TODO(), groupSnapshotClone, metav1.UpdateOptions{}) if err != nil { return newControllerUpdateError(utils.GroupSnapshotKey(groupSnapshot), err.Error()) } @@ -1423,7 +1423,7 @@ func (ctrl *csiSnapshotCommonController) addGroupSnapshotFinalizer(groupSnapshot // with information obtained from step 1. This function name is very long but the // name suggests what it does. It determines whether to remove finalizers on group // snapshot and whether to delete group snapshot content. -func (ctrl *csiSnapshotCommonController) processGroupSnapshotWithDeletionTimestamp(groupSnapshot *crdv1alpha1.VolumeGroupSnapshot) error { +func (ctrl *csiSnapshotCommonController) processGroupSnapshotWithDeletionTimestamp(groupSnapshot *crdv1beta1.VolumeGroupSnapshot) error { klog.V(5).Infof("processGroupSnapshotWithDeletionTimestamp VolumeGroupSnapshot[%s]: %s", utils.GroupSnapshotKey(groupSnapshot), utils.GetGroupSnapshotStatusForLogging(groupSnapshot)) driverName, err := ctrl.getGroupSnapshotDriverName(groupSnapshot) @@ -1523,7 +1523,7 @@ func (ctrl *csiSnapshotCommonController) processGroupSnapshotWithDeletionTimesta // VolumeGroupSnapshotContent won't be deleted immediately due to the VolumeGroupSnapshotContentFinalizer if groupSnapshotContent != nil && deleteGroupSnapshotContent { klog.V(5).Infof("processGroupSnapshotWithDeletionTimestamp[%s]: set DeletionTimeStamp on group snapshot content [%s].", utils.GroupSnapshotKey(groupSnapshot), groupSnapshotContent.Name) - err := ctrl.clientset.GroupsnapshotV1alpha1().VolumeGroupSnapshotContents().Delete(context.TODO(), groupSnapshotContent.Name, metav1.DeleteOptions{}) + err := ctrl.clientset.GroupsnapshotV1beta1().VolumeGroupSnapshotContents().Delete(context.TODO(), groupSnapshotContent.Name, metav1.DeleteOptions{}) if err != nil { ctrl.eventRecorder.Event(groupSnapshot, v1.EventTypeWarning, "GroupSnapshotContentObjectDeleteError", "Failed to delete group snapshot content API object") return fmt.Errorf("failed to delete VolumeGroupSnapshotContent %s from API server: %q", groupSnapshotContent.Name, err) @@ -1556,7 +1556,7 @@ func (ctrl *csiSnapshotCommonController) processGroupSnapshotWithDeletionTimesta return ctrl.removeGroupSnapshotFinalizer(groupSnapshot, removeBoundFinalizer) } -func (ctrl *csiSnapshotCommonController) setAnnVolumeGroupSnapshotBeingDeleted(groupSnapshotContent *crdv1alpha1.VolumeGroupSnapshotContent) (*crdv1alpha1.VolumeGroupSnapshotContent, error) { +func (ctrl *csiSnapshotCommonController) setAnnVolumeGroupSnapshotBeingDeleted(groupSnapshotContent *crdv1beta1.VolumeGroupSnapshotContent) (*crdv1beta1.VolumeGroupSnapshotContent, error) { if groupSnapshotContent == nil { return groupSnapshotContent, nil } @@ -1590,7 +1590,7 @@ func (ctrl *csiSnapshotCommonController) setAnnVolumeGroupSnapshotBeingDeleted(g } // removeGroupSnapshotFinalizer removes a Finalizer for VolumeGroupSnapshot. -func (ctrl *csiSnapshotCommonController) removeGroupSnapshotFinalizer(groupSnapshot *crdv1alpha1.VolumeGroupSnapshot, removeBoundFinalizer bool) error { +func (ctrl *csiSnapshotCommonController) removeGroupSnapshotFinalizer(groupSnapshot *crdv1beta1.VolumeGroupSnapshot, removeBoundFinalizer bool) error { if !removeBoundFinalizer { return nil } @@ -1599,7 +1599,7 @@ func (ctrl *csiSnapshotCommonController) removeGroupSnapshotFinalizer(groupSnaps groupSnapshotClone := groupSnapshot.DeepCopy() groupSnapshotClone.ObjectMeta.Finalizers = utils.RemoveString(groupSnapshotClone.ObjectMeta.Finalizers, utils.VolumeGroupSnapshotBoundFinalizer) - newGroupSnapshot, err := ctrl.clientset.GroupsnapshotV1alpha1().VolumeGroupSnapshots(groupSnapshotClone.Namespace).Update(context.TODO(), groupSnapshotClone, metav1.UpdateOptions{}) + newGroupSnapshot, err := ctrl.clientset.GroupsnapshotV1beta1().VolumeGroupSnapshots(groupSnapshotClone.Namespace).Update(context.TODO(), groupSnapshotClone, metav1.UpdateOptions{}) if err != nil { return newControllerUpdateError(groupSnapshot.Name, err.Error()) } @@ -1615,7 +1615,7 @@ func (ctrl *csiSnapshotCommonController) removeGroupSnapshotFinalizer(groupSnaps // getGroupSnapshotDriverName is a helper function to get driver from the VolumeGroupSnapshot. // We try to get the driverName in multiple ways, as snapshot controller metrics depend on the correct driverName. -func (ctrl *csiSnapshotCommonController) getGroupSnapshotDriverName(vgs *crdv1alpha1.VolumeGroupSnapshot) (string, error) { +func (ctrl *csiSnapshotCommonController) getGroupSnapshotDriverName(vgs *crdv1beta1.VolumeGroupSnapshot) (string, error) { klog.V(5).Infof("getGroupSnapshotDriverName: VolumeGroupSnapshot[%s]", vgs.Name) var driverName string diff --git a/pkg/common-controller/groupsnapshot_create_test.go b/pkg/common-controller/groupsnapshot_create_test.go index f511ee910..8e3e2b322 100644 --- a/pkg/common-controller/groupsnapshot_create_test.go +++ b/pkg/common-controller/groupsnapshot_create_test.go @@ -19,14 +19,14 @@ package common_controller import ( "testing" - crdv1alpha1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1alpha1" + crdv1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta1" crdv1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumesnapshot/v1" "github.com/kubernetes-csi/external-snapshotter/v8/pkg/utils" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) -var groupSnapshotClasses = []*crdv1alpha1.VolumeGroupSnapshotClass{ +var groupSnapshotClasses = []*crdv1beta1.VolumeGroupSnapshotClass{ { TypeMeta: metav1.TypeMeta{ Kind: "VolumeGroupSnapshotClass", diff --git a/pkg/common-controller/snapshot_controller_base.go b/pkg/common-controller/snapshot_controller_base.go index 28ee64836..376c44c09 100644 --- a/pkg/common-controller/snapshot_controller_base.go +++ b/pkg/common-controller/snapshot_controller_base.go @@ -20,12 +20,12 @@ import ( "fmt" "time" - crdv1alpha1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1alpha1" + crdv1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta1" crdv1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumesnapshot/v1" clientset "github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned" - groupsnapshotinformers "github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumegroupsnapshot/v1alpha1" + groupsnapshotinformers "github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumegroupsnapshot/v1beta1" snapshotinformers "github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumesnapshot/v1" - groupsnapshotlisters "github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1alpha1" + groupsnapshotlisters "github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1beta1" snapshotlisters "github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumesnapshot/v1" "github.com/kubernetes-csi/external-snapshotter/v8/pkg/metrics" "github.com/kubernetes-csi/external-snapshotter/v8/pkg/utils" @@ -635,7 +635,7 @@ func (ctrl *csiSnapshotCommonController) enqueueGroupSnapshotWork(obj interface{ if unknown, ok := obj.(cache.DeletedFinalStateUnknown); ok && unknown.Obj != nil { obj = unknown.Obj } - if groupSnapshot, ok := obj.(*crdv1alpha1.VolumeGroupSnapshot); ok { + if groupSnapshot, ok := obj.(*crdv1beta1.VolumeGroupSnapshot); ok { objName, err := cache.DeletionHandlingMetaNamespaceKeyFunc(groupSnapshot) if err != nil { klog.Errorf("failed to get key from object: %v, %v", err, groupSnapshot) @@ -652,7 +652,7 @@ func (ctrl *csiSnapshotCommonController) enqueueGroupSnapshotContentWork(obj int if unknown, ok := obj.(cache.DeletedFinalStateUnknown); ok && unknown.Obj != nil { obj = unknown.Obj } - if content, ok := obj.(*crdv1alpha1.VolumeGroupSnapshotContent); ok { + if content, ok := obj.(*crdv1beta1.VolumeGroupSnapshotContent); ok { objName, err := cache.DeletionHandlingMetaNamespaceKeyFunc(content) if err != nil { klog.Errorf("failed to get key from object: %v, %v", err, content) @@ -746,7 +746,7 @@ func (ctrl *csiSnapshotCommonController) syncGroupSnapshotByKey(key string) erro klog.V(2).Infof("deletion of group snapshot %q was already processed", key) return nil } - groupSnapshot, ok := vgsObj.(*crdv1alpha1.VolumeGroupSnapshot) + groupSnapshot, ok := vgsObj.(*crdv1beta1.VolumeGroupSnapshot) if !ok { klog.Errorf("expected vgs, got %+v", vgsObj) return nil @@ -762,9 +762,9 @@ func (ctrl *csiSnapshotCommonController) syncGroupSnapshotByKey(key string) erro // If it is not set, gets it from default VolumeGroupSnapshotClass and sets it. // On error, it must return the original group snapshot, not nil, because the caller // syncGroupSnapshotByKey needs to check group snapshot's timestamp. -func (ctrl *csiSnapshotCommonController) checkAndUpdateGroupSnapshotClass(groupSnapshot *crdv1alpha1.VolumeGroupSnapshot) (*crdv1alpha1.VolumeGroupSnapshot, error) { +func (ctrl *csiSnapshotCommonController) checkAndUpdateGroupSnapshotClass(groupSnapshot *crdv1beta1.VolumeGroupSnapshot) (*crdv1beta1.VolumeGroupSnapshot, error) { className := groupSnapshot.Spec.VolumeGroupSnapshotClassName - var class *crdv1alpha1.VolumeGroupSnapshotClass + var class *crdv1beta1.VolumeGroupSnapshotClass var err error newGroupSnapshot := groupSnapshot if className != nil { @@ -826,7 +826,7 @@ func (ctrl *csiSnapshotCommonController) syncGroupSnapshotContentByKey(key strin klog.V(2).Infof("deletion of group snapshot content %q was already processed", key) return nil } - content, ok := contentObj.(*crdv1alpha1.VolumeGroupSnapshotContent) + content, ok := contentObj.(*crdv1beta1.VolumeGroupSnapshotContent) if !ok { klog.Errorf("expected group snapshot content, got %+v", content) return nil @@ -837,7 +837,7 @@ func (ctrl *csiSnapshotCommonController) syncGroupSnapshotContentByKey(key strin // updateGroupSnapshotContent runs in worker thread and handles "groupsnapshotcontent added", // "groupsnapshotcontent updated" and "periodic sync" events. -func (ctrl *csiSnapshotCommonController) updateGroupSnapshotContent(content *crdv1alpha1.VolumeGroupSnapshotContent) error { +func (ctrl *csiSnapshotCommonController) updateGroupSnapshotContent(content *crdv1beta1.VolumeGroupSnapshotContent) error { // Store the new group snapshot content version in the cache and do not process // it if this is an old version. new, err := ctrl.storeGroupSnapshotContentUpdate(content) @@ -862,7 +862,7 @@ func (ctrl *csiSnapshotCommonController) updateGroupSnapshotContent(content *crd } // deleteGroupSnapshotContent runs in worker thread and handles "groupsnapshotcontent deleted" event. -func (ctrl *csiSnapshotCommonController) deleteGroupSnapshotContent(content *crdv1alpha1.VolumeGroupSnapshotContent) { +func (ctrl *csiSnapshotCommonController) deleteGroupSnapshotContent(content *crdv1beta1.VolumeGroupSnapshotContent) { _ = ctrl.groupSnapshotContentStore.Delete(content) klog.V(4).Infof("group snapshot content %q deleted", content.Name) diff --git a/pkg/sidecar-controller/csi_handler.go b/pkg/sidecar-controller/csi_handler.go index 1396adb1d..678f4d029 100644 --- a/pkg/sidecar-controller/csi_handler.go +++ b/pkg/sidecar-controller/csi_handler.go @@ -23,7 +23,7 @@ import ( "time" "github.com/container-storage-interface/spec/lib/go/csi" - crdv1alpha1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1alpha1" + crdv1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta1" "github.com/kubernetes-csi/external-snapshotter/v8/pkg/group_snapshotter" crdv1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumesnapshot/v1" @@ -35,9 +35,9 @@ type Handler interface { CreateSnapshot(content *crdv1.VolumeSnapshotContent, parameters map[string]string, snapshotterCredentials map[string]string) (string, string, time.Time, int64, bool, error) DeleteSnapshot(content *crdv1.VolumeSnapshotContent, snapshotterCredentials map[string]string) error GetSnapshotStatus(content *crdv1.VolumeSnapshotContent, snapshotterListCredentials map[string]string) (bool, time.Time, int64, string, error) - CreateGroupSnapshot(content *crdv1alpha1.VolumeGroupSnapshotContent, parameters map[string]string, snapshotterCredentials map[string]string) (string, string, []*csi.Snapshot, time.Time, bool, error) - GetGroupSnapshotStatus(groupSnapshotContent *crdv1alpha1.VolumeGroupSnapshotContent, snapshotIDs []string, snapshotterCredentials map[string]string) (bool, time.Time, error) - DeleteGroupSnapshot(content *crdv1alpha1.VolumeGroupSnapshotContent, SnapshotID []string, snapshotterCredentials map[string]string) error + CreateGroupSnapshot(content *crdv1beta1.VolumeGroupSnapshotContent, parameters map[string]string, snapshotterCredentials map[string]string) (string, string, []*csi.Snapshot, time.Time, bool, error) + GetGroupSnapshotStatus(groupSnapshotContent *crdv1beta1.VolumeGroupSnapshotContent, snapshotIDs []string, snapshotterCredentials map[string]string) (bool, time.Time, error) + DeleteGroupSnapshot(content *crdv1beta1.VolumeGroupSnapshotContent, SnapshotID []string, snapshotterCredentials map[string]string) error } // csiHandler is a handler that calls CSI to create/delete volume snapshot. @@ -148,7 +148,7 @@ func makeSnapshotName(prefix, snapshotUID string, snapshotNameUUIDLength int) (s return fmt.Sprintf("%s-%s", prefix, strings.Replace(snapshotUID, "-", "", -1)[0:snapshotNameUUIDLength]), nil } -func (handler *csiHandler) CreateGroupSnapshot(content *crdv1alpha1.VolumeGroupSnapshotContent, parameters map[string]string, snapshotterCredentials map[string]string) (string, string, []*csi.Snapshot, time.Time, bool, error) { +func (handler *csiHandler) CreateGroupSnapshot(content *crdv1beta1.VolumeGroupSnapshotContent, parameters map[string]string, snapshotterCredentials map[string]string) (string, string, []*csi.Snapshot, time.Time, bool, error) { ctx, cancel := context.WithTimeout(context.Background(), handler.timeout) defer cancel() @@ -167,7 +167,7 @@ func (handler *csiHandler) CreateGroupSnapshot(content *crdv1alpha1.VolumeGroupS return handler.groupSnapshotter.CreateGroupSnapshot(ctx, groupSnapshotName, content.Spec.Source.VolumeHandles, parameters, snapshotterCredentials) } -func (handler *csiHandler) DeleteGroupSnapshot(content *crdv1alpha1.VolumeGroupSnapshotContent, snapshotIDs []string, snapshotterCredentials map[string]string) error { +func (handler *csiHandler) DeleteGroupSnapshot(content *crdv1beta1.VolumeGroupSnapshotContent, snapshotIDs []string, snapshotterCredentials map[string]string) error { ctx, cancel := context.WithTimeout(context.Background(), handler.timeout) defer cancel() @@ -188,7 +188,7 @@ func (handler *csiHandler) DeleteGroupSnapshot(content *crdv1alpha1.VolumeGroupS return handler.groupSnapshotter.DeleteGroupSnapshot(ctx, groupSnapshotHandle, snapshotIDs, snapshotterCredentials) } -func (handler *csiHandler) GetGroupSnapshotStatus(content *crdv1alpha1.VolumeGroupSnapshotContent, snapshotIDs []string, snapshotterCredentials map[string]string) (bool, time.Time, error) { +func (handler *csiHandler) GetGroupSnapshotStatus(content *crdv1beta1.VolumeGroupSnapshotContent, snapshotIDs []string, snapshotterCredentials map[string]string) (bool, time.Time, error) { ctx, cancel := context.WithTimeout(context.Background(), handler.timeout) defer cancel() diff --git a/pkg/sidecar-controller/framework_test.go b/pkg/sidecar-controller/framework_test.go index 679f3bdcc..304e62b0a 100644 --- a/pkg/sidecar-controller/framework_test.go +++ b/pkg/sidecar-controller/framework_test.go @@ -577,8 +577,8 @@ func newTestController(kubeClient kubernetes.Interface, clientset clientset.Inte true, workqueue.NewItemExponentialFailureRateLimiter(1*time.Millisecond, 1*time.Minute), false, - informerFactory.Groupsnapshot().V1alpha1().VolumeGroupSnapshotContents(), - informerFactory.Groupsnapshot().V1alpha1().VolumeGroupSnapshotClasses(), + informerFactory.Groupsnapshot().V1beta1().VolumeGroupSnapshotContents(), + informerFactory.Groupsnapshot().V1beta1().VolumeGroupSnapshotClasses(), workqueue.NewItemExponentialFailureRateLimiter(1*time.Millisecond, 1*time.Minute), ) diff --git a/pkg/sidecar-controller/groupsnapshot_helper.go b/pkg/sidecar-controller/groupsnapshot_helper.go index 053c842ae..33453808b 100644 --- a/pkg/sidecar-controller/groupsnapshot_helper.go +++ b/pkg/sidecar-controller/groupsnapshot_helper.go @@ -30,7 +30,7 @@ import ( "k8s.io/client-go/tools/cache" klog "k8s.io/klog/v2" - crdv1alpha1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1alpha1" + crdv1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta1" crdv1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumesnapshot/v1" "github.com/kubernetes-csi/external-snapshotter/v8/pkg/utils" ) @@ -52,7 +52,7 @@ func (ctrl *csiSnapshotSideCarController) enqueueGroupSnapshotContentWork(obj in if unknown, ok := obj.(cache.DeletedFinalStateUnknown); ok && unknown.Obj != nil { obj = unknown.Obj } - if groupSnapshotContent, ok := obj.(*crdv1alpha1.VolumeGroupSnapshotContent); ok { + if groupSnapshotContent, ok := obj.(*crdv1beta1.VolumeGroupSnapshotContent); ok { objName, err := cache.DeletionHandlingMetaNamespaceKeyFunc(groupSnapshotContent) if err != nil { klog.Errorf("failed to get key from object: %v, %v", err, groupSnapshotContent) @@ -125,7 +125,7 @@ func (ctrl *csiSnapshotSideCarController) syncGroupSnapshotContentByKey(key stri klog.V(2).Infof("deletion of group snapshot content %q was already processed", key) return nil } - groupSnapshotContent, ok := groupSnapshotContentObj.(*crdv1alpha1.VolumeGroupSnapshotContent) + groupSnapshotContent, ok := groupSnapshotContentObj.(*crdv1beta1.VolumeGroupSnapshotContent) if !ok { klog.Errorf("expected group snapshot content, got %+v", groupSnapshotContent) return nil @@ -137,7 +137,7 @@ func (ctrl *csiSnapshotSideCarController) syncGroupSnapshotContentByKey(key stri // updateGroupSnapshotContentInInformerCache runs in worker thread and handles // "group snapshot content added", "group snapshot content updated" and "periodic // sync" events. -func (ctrl *csiSnapshotSideCarController) updateGroupSnapshotContentInInformerCache(groupSnapshotContent *crdv1alpha1.VolumeGroupSnapshotContent) error { +func (ctrl *csiSnapshotSideCarController) updateGroupSnapshotContentInInformerCache(groupSnapshotContent *crdv1beta1.VolumeGroupSnapshotContent) error { // Store the new group snapshot content version in the cache and do not process // it if this is an old version. new, err := ctrl.storeGroupSnapshotContentUpdate(groupSnapshotContent) @@ -163,13 +163,13 @@ func (ctrl *csiSnapshotSideCarController) updateGroupSnapshotContentInInformerCa // deleteGroupSnapshotContentInCacheStore runs in worker thread and handles "group // snapshot content deleted" event. -func (ctrl *csiSnapshotSideCarController) deleteGroupSnapshotContentInCacheStore(groupSnapshotContent *crdv1alpha1.VolumeGroupSnapshotContent) { +func (ctrl *csiSnapshotSideCarController) deleteGroupSnapshotContentInCacheStore(groupSnapshotContent *crdv1beta1.VolumeGroupSnapshotContent) { _ = ctrl.groupSnapshotContentStore.Delete(groupSnapshotContent) klog.V(4).Infof("group snapshot content %q deleted", groupSnapshotContent.Name) } // syncGroupSnapshotContent deals with one key off the queue. It returns false when it's time to quit. -func (ctrl *csiSnapshotSideCarController) syncGroupSnapshotContent(groupSnapshotContent *crdv1alpha1.VolumeGroupSnapshotContent) error { +func (ctrl *csiSnapshotSideCarController) syncGroupSnapshotContent(groupSnapshotContent *crdv1beta1.VolumeGroupSnapshotContent) error { klog.V(5).Infof("synchronizing VolumeGroupSnapshotContent[%s]", groupSnapshotContent.Name) if ctrl.shouldDeleteGroupSnapshotContent(groupSnapshotContent) { @@ -209,7 +209,7 @@ func (ctrl *csiSnapshotSideCarController) syncGroupSnapshotContent(groupSnapshot // removeGroupSnapshotContentFinalizer removes the VolumeGroupSnapshotContentFinalizer from a // group snapshot content if there exists one. -func (ctrl csiSnapshotSideCarController) removeGroupSnapshotContentFinalizer(groupSnapshotContent *crdv1alpha1.VolumeGroupSnapshotContent) error { +func (ctrl csiSnapshotSideCarController) removeGroupSnapshotContentFinalizer(groupSnapshotContent *crdv1beta1.VolumeGroupSnapshotContent) error { if !slices.Contains(groupSnapshotContent.ObjectMeta.Finalizers, utils.VolumeGroupSnapshotContentFinalizer) { // the finalizer does not exit, return directly return nil @@ -237,7 +237,7 @@ func (ctrl csiSnapshotSideCarController) removeGroupSnapshotContentFinalizer(gro } // Delete a groupsnapshot: Ask the backend to remove the groupsnapshot device -func (ctrl *csiSnapshotSideCarController) deleteCSIGroupSnapshotOperation(groupSnapshotContent *crdv1alpha1.VolumeGroupSnapshotContent) error { +func (ctrl *csiSnapshotSideCarController) deleteCSIGroupSnapshotOperation(groupSnapshotContent *crdv1beta1.VolumeGroupSnapshotContent) error { klog.V(5).Infof("deleteCSIGroupSnapshotOperation [%s] started", groupSnapshotContent.Name) snapshotterCredentials, err := ctrl.GetCredentialsFromAnnotationForGroupSnapshot(groupSnapshotContent) @@ -278,10 +278,10 @@ func (ctrl *csiSnapshotSideCarController) deleteCSIGroupSnapshotOperation(groupS // in groupSnapshotContent.Status. On success, the latest version of the group snapshot // content object will be returned. func (ctrl *csiSnapshotSideCarController) clearGroupSnapshotContentStatus( - groupSnapshotContentName string) (*crdv1alpha1.VolumeGroupSnapshotContent, error) { + groupSnapshotContentName string) (*crdv1beta1.VolumeGroupSnapshotContent, error) { klog.V(5).Infof("clearGroupSnapshotContentStatus content [%s]", groupSnapshotContentName) // get the latest version from API server - groupSnapshotContent, err := ctrl.clientset.GroupsnapshotV1alpha1().VolumeGroupSnapshotContents().Get(context.TODO(), groupSnapshotContentName, metav1.GetOptions{}) + groupSnapshotContent, err := ctrl.clientset.GroupsnapshotV1beta1().VolumeGroupSnapshotContents().Get(context.TODO(), groupSnapshotContentName, metav1.GetOptions{}) if err != nil { return nil, fmt.Errorf("error get group snapshot content %s from api server: %v", groupSnapshotContentName, err) } @@ -292,14 +292,14 @@ func (ctrl *csiSnapshotSideCarController) clearGroupSnapshotContentStatus( groupSnapshotContent.Status.Error = nil groupSnapshotContent.Status.PVVolumeSnapshotContentList = nil } - newContent, err := ctrl.clientset.GroupsnapshotV1alpha1().VolumeGroupSnapshotContents().UpdateStatus(context.TODO(), groupSnapshotContent, metav1.UpdateOptions{}) + newContent, err := ctrl.clientset.GroupsnapshotV1beta1().VolumeGroupSnapshotContents().UpdateStatus(context.TODO(), groupSnapshotContent, metav1.UpdateOptions{}) if err != nil { return groupSnapshotContent, newControllerUpdateError(groupSnapshotContentName, err.Error()) } return newContent, nil } -func (ctrl *csiSnapshotSideCarController) GetCredentialsFromAnnotationForGroupSnapshot(groupSnapshotContent *crdv1alpha1.VolumeGroupSnapshotContent) (map[string]string, error) { +func (ctrl *csiSnapshotSideCarController) GetCredentialsFromAnnotationForGroupSnapshot(groupSnapshotContent *crdv1beta1.VolumeGroupSnapshotContent) (map[string]string, error) { // get secrets if VolumeGroupSnapshotClass specifies it var snapshotterCredentials map[string]string var err error @@ -331,7 +331,7 @@ func (ctrl *csiSnapshotSideCarController) GetCredentialsFromAnnotationForGroupSn // shouldDeleteGroupSnapshotContent checks if groupSnapshotContent object should be deleted // if DeletionTimestamp is set on the groupSnapshotContent -func (ctrl *csiSnapshotSideCarController) shouldDeleteGroupSnapshotContent(groupSnapshotContent *crdv1alpha1.VolumeGroupSnapshotContent) bool { +func (ctrl *csiSnapshotSideCarController) shouldDeleteGroupSnapshotContent(groupSnapshotContent *crdv1beta1.VolumeGroupSnapshotContent) bool { klog.V(5).Infof("Check if VolumeGroupSnapshotContent[%s] should be deleted.", groupSnapshotContent.Name) if groupSnapshotContent.ObjectMeta.DeletionTimestamp == nil { @@ -360,7 +360,7 @@ func (ctrl *csiSnapshotSideCarController) shouldDeleteGroupSnapshotContent(group } // createGroupSnapshot starts new asynchronous operation to create group snapshot -func (ctrl *csiSnapshotSideCarController) createGroupSnapshot(groupSnapshotContent *crdv1alpha1.VolumeGroupSnapshotContent) error { +func (ctrl *csiSnapshotSideCarController) createGroupSnapshot(groupSnapshotContent *crdv1beta1.VolumeGroupSnapshotContent) error { klog.V(5).Infof("createGroupSnapshot for group snapshot content [%s]: started", groupSnapshotContent.Name) groupSnapshotContentObj, err := ctrl.createGroupSnapshotWrapper(groupSnapshotContent) if err != nil { @@ -379,7 +379,7 @@ func (ctrl *csiSnapshotSideCarController) createGroupSnapshot(groupSnapshotConte } // This is a wrapper function for the group snapshot creation process. -func (ctrl *csiSnapshotSideCarController) createGroupSnapshotWrapper(groupSnapshotContent *crdv1alpha1.VolumeGroupSnapshotContent) (*crdv1alpha1.VolumeGroupSnapshotContent, error) { +func (ctrl *csiSnapshotSideCarController) createGroupSnapshotWrapper(groupSnapshotContent *crdv1beta1.VolumeGroupSnapshotContent) (*crdv1beta1.VolumeGroupSnapshotContent, error) { klog.Infof("createGroupSnapshotWrapper: Creating group snapshot for group snapshot content %s through the plugin ...", groupSnapshotContent.Name) class, snapshotterCredentials, err := ctrl.getCSIGroupSnapshotInput(groupSnapshotContent) @@ -457,10 +457,10 @@ func (ctrl *csiSnapshotSideCarController) createGroupSnapshotWrapper(groupSnapsh return groupSnapshotContent, nil } -func (ctrl *csiSnapshotSideCarController) getCSIGroupSnapshotInput(groupSnapshotContent *crdv1alpha1.VolumeGroupSnapshotContent) (*crdv1alpha1.VolumeGroupSnapshotClass, map[string]string, error) { +func (ctrl *csiSnapshotSideCarController) getCSIGroupSnapshotInput(groupSnapshotContent *crdv1beta1.VolumeGroupSnapshotContent) (*crdv1beta1.VolumeGroupSnapshotClass, map[string]string, error) { className := groupSnapshotContent.Spec.VolumeGroupSnapshotClassName klog.V(5).Infof("getCSIGroupSnapshotInput for group snapshot content %s", groupSnapshotContent.Name) - var class *crdv1alpha1.VolumeGroupSnapshotClass + var class *crdv1beta1.VolumeGroupSnapshotClass var err error if className != nil { class, err = ctrl.getGroupSnapshotClass(*className) @@ -488,7 +488,7 @@ func (ctrl *csiSnapshotSideCarController) getCSIGroupSnapshotInput(groupSnapshot } // getGroupSnapshotClass is a helper function to get group snapshot class from the class name. -func (ctrl *csiSnapshotSideCarController) getGroupSnapshotClass(className string) (*crdv1alpha1.VolumeGroupSnapshotClass, error) { +func (ctrl *csiSnapshotSideCarController) getGroupSnapshotClass(className string) (*crdv1beta1.VolumeGroupSnapshotClass, error) { klog.V(5).Infof("getGroupSnapshotClass: VolumeGroupSnapshotClassName [%s]", className) class, err := ctrl.groupSnapshotClassLister.Get(className) @@ -503,7 +503,7 @@ func (ctrl *csiSnapshotSideCarController) getGroupSnapshotClass(className string // setAnnVolumeGroupSnapshotBeingCreated sets VolumeGroupSnapshotBeingCreated annotation // on VolumeGroupSnapshotContent // If set, it indicates group snapshot is being created -func (ctrl *csiSnapshotSideCarController) setAnnVolumeGroupSnapshotBeingCreated(groupSnapshotContent *crdv1alpha1.VolumeGroupSnapshotContent) (*crdv1alpha1.VolumeGroupSnapshotContent, error) { +func (ctrl *csiSnapshotSideCarController) setAnnVolumeGroupSnapshotBeingCreated(groupSnapshotContent *crdv1beta1.VolumeGroupSnapshotContent) (*crdv1beta1.VolumeGroupSnapshotContent, error) { if metav1.HasAnnotation(groupSnapshotContent.ObjectMeta, utils.AnnVolumeGroupSnapshotBeingCreated) { // the annotation already exists, return directly return groupSnapshotContent, nil @@ -544,7 +544,7 @@ func (ctrl *csiSnapshotSideCarController) setAnnVolumeGroupSnapshotBeingCreated( // removeAnnVolumeGroupSnapshotBeingCreated removes the VolumeGroupSnapshotBeingCreated // annotation from a groupSnapshotContent if there exists one. -func (ctrl csiSnapshotSideCarController) removeAnnVolumeGroupSnapshotBeingCreated(groupSnapshotContent *crdv1alpha1.VolumeGroupSnapshotContent) (*crdv1alpha1.VolumeGroupSnapshotContent, error) { +func (ctrl csiSnapshotSideCarController) removeAnnVolumeGroupSnapshotBeingCreated(groupSnapshotContent *crdv1beta1.VolumeGroupSnapshotContent) (*crdv1beta1.VolumeGroupSnapshotContent, error) { if !metav1.HasAnnotation(groupSnapshotContent.ObjectMeta, utils.AnnVolumeGroupSnapshotBeingCreated) { // the annotation does not exist, return directly return groupSnapshotContent, nil @@ -572,30 +572,30 @@ func (ctrl csiSnapshotSideCarController) removeAnnVolumeGroupSnapshotBeingCreate } func (ctrl *csiSnapshotSideCarController) updateGroupSnapshotContentStatus( - groupSnapshotContent *crdv1alpha1.VolumeGroupSnapshotContent, + groupSnapshotContent *crdv1beta1.VolumeGroupSnapshotContent, groupSnapshotHandle string, readyToUse bool, createdAt int64, snapshotContentLinks []snapshotContentNameVolumeHandlePair, -) (*crdv1alpha1.VolumeGroupSnapshotContent, error) { +) (*crdv1beta1.VolumeGroupSnapshotContent, error) { klog.V(5).Infof("updateGroupSnapshotContentStatus: updating VolumeGroupSnapshotContent [%s], groupSnapshotHandle %s, readyToUse %v, createdAt %v", groupSnapshotContent.Name, groupSnapshotHandle, readyToUse, createdAt) - groupSnapshotContentObj, err := ctrl.clientset.GroupsnapshotV1alpha1().VolumeGroupSnapshotContents().Get(context.TODO(), groupSnapshotContent.Name, metav1.GetOptions{}) + groupSnapshotContentObj, err := ctrl.clientset.GroupsnapshotV1beta1().VolumeGroupSnapshotContents().Get(context.TODO(), groupSnapshotContent.Name, metav1.GetOptions{}) if err != nil { return nil, fmt.Errorf("error get group snapshot content %s from api server: %v", groupSnapshotContent.Name, err) } - var newStatus *crdv1alpha1.VolumeGroupSnapshotContentStatus + var newStatus *crdv1beta1.VolumeGroupSnapshotContentStatus updated := false if groupSnapshotContentObj.Status == nil { - newStatus = &crdv1alpha1.VolumeGroupSnapshotContentStatus{ + newStatus = &crdv1beta1.VolumeGroupSnapshotContentStatus{ VolumeGroupSnapshotHandle: &groupSnapshotHandle, ReadyToUse: &readyToUse, CreationTime: &createdAt, } for _, snapshotContentLink := range snapshotContentLinks { - newStatus.VolumeSnapshotHandlePairList = append(newStatus.VolumeSnapshotHandlePairList, crdv1alpha1.VolumeSnapshotHandlePair{ + newStatus.VolumeSnapshotHandlePairList = append(newStatus.VolumeSnapshotHandlePairList, crdv1beta1.VolumeSnapshotHandlePair{ VolumeHandle: snapshotContentLink.volumeHandle, SnapshotHandle: snapshotContentLink.snapshotHandle, }) @@ -621,7 +621,7 @@ func (ctrl *csiSnapshotSideCarController) updateGroupSnapshotContentStatus( } if len(newStatus.VolumeSnapshotHandlePairList) == 0 { for _, snapshotContentLink := range snapshotContentLinks { - newStatus.VolumeSnapshotHandlePairList = append(newStatus.VolumeSnapshotHandlePairList, crdv1alpha1.VolumeSnapshotHandlePair{ + newStatus.VolumeSnapshotHandlePairList = append(newStatus.VolumeSnapshotHandlePairList, crdv1beta1.VolumeSnapshotHandlePair{ VolumeHandle: snapshotContentLink.volumeHandle, SnapshotHandle: snapshotContentLink.snapshotHandle, }) @@ -633,7 +633,7 @@ func (ctrl *csiSnapshotSideCarController) updateGroupSnapshotContentStatus( if updated { groupSnapshotContentClone := groupSnapshotContentObj.DeepCopy() groupSnapshotContentClone.Status = newStatus - newContent, err := ctrl.clientset.GroupsnapshotV1alpha1().VolumeGroupSnapshotContents().UpdateStatus(context.TODO(), groupSnapshotContentClone, metav1.UpdateOptions{}) + newContent, err := ctrl.clientset.GroupsnapshotV1beta1().VolumeGroupSnapshotContents().UpdateStatus(context.TODO(), groupSnapshotContentClone, metav1.UpdateOptions{}) if err != nil { return groupSnapshotContentObj, newControllerUpdateError(groupSnapshotContent.Name, err.Error()) } @@ -650,7 +650,7 @@ func (ctrl *csiSnapshotSideCarController) updateGroupSnapshotContentStatus( // // * groupSnapshotContent - group snapshot content to update // * eventtype, reason, message - event to send, see EventRecorder.Event() -func (ctrl *csiSnapshotSideCarController) updateGroupSnapshotContentErrorStatusWithEvent(groupSnapshotContent *crdv1alpha1.VolumeGroupSnapshotContent, eventtype, reason, message string) error { +func (ctrl *csiSnapshotSideCarController) updateGroupSnapshotContentErrorStatusWithEvent(groupSnapshotContent *crdv1beta1.VolumeGroupSnapshotContent, eventtype, reason, message string) error { klog.V(5).Infof("updateGroupSnapshotContentErrorStatusWithEvent[%s]", groupSnapshotContent.Name) if groupSnapshotContent.Status != nil && groupSnapshotContent.Status.Error != nil && *groupSnapshotContent.Status.Error.Message == message { @@ -671,7 +671,7 @@ func (ctrl *csiSnapshotSideCarController) updateGroupSnapshotContentErrorStatusW patches = append(patches, utils.PatchOp{ Op: "replace", Path: "/status", - Value: &crdv1alpha1.VolumeGroupSnapshotContentStatus{ + Value: &crdv1beta1.VolumeGroupSnapshotContentStatus{ ReadyToUse: &ready, Error: groupSnapshotContentStatusError, }, @@ -721,7 +721,7 @@ func GetSnapshotContentNameForVolumeGroupSnapshotContent(groupSnapshotContentUUI return fmt.Sprintf("snapcontent-%x-%s", sha256.Sum256([]byte(groupSnapshotContentUUID+pvUUID)), time.Now().Format("2006-01-02-3.4.5")) } -func (ctrl *csiSnapshotSideCarController) checkandUpdateGroupSnapshotContentStatus(groupSnapshotContent *crdv1alpha1.VolumeGroupSnapshotContent) error { +func (ctrl *csiSnapshotSideCarController) checkandUpdateGroupSnapshotContentStatus(groupSnapshotContent *crdv1beta1.VolumeGroupSnapshotContent) error { klog.V(5).Infof("checkandUpdateGroupSnapshotContentStatus[%s] started", groupSnapshotContent.Name) groupSnapshotContentObj, err := ctrl.checkandUpdateGroupSnapshotContentStatusOperation(groupSnapshotContent) if err != nil { @@ -738,7 +738,7 @@ func (ctrl *csiSnapshotSideCarController) checkandUpdateGroupSnapshotContentStat return nil } -func (ctrl *csiSnapshotSideCarController) checkandUpdateGroupSnapshotContentStatusOperation(groupSnapshotContent *crdv1alpha1.VolumeGroupSnapshotContent) (*crdv1alpha1.VolumeGroupSnapshotContent, error) { +func (ctrl *csiSnapshotSideCarController) checkandUpdateGroupSnapshotContentStatusOperation(groupSnapshotContent *crdv1beta1.VolumeGroupSnapshotContent) (*crdv1beta1.VolumeGroupSnapshotContent, error) { var err error var creationTime time.Time readyToUse := false diff --git a/pkg/sidecar-controller/snapshot_controller_base.go b/pkg/sidecar-controller/snapshot_controller_base.go index e353bce89..e6b4d96b9 100644 --- a/pkg/sidecar-controller/snapshot_controller_base.go +++ b/pkg/sidecar-controller/snapshot_controller_base.go @@ -34,12 +34,12 @@ import ( "k8s.io/client-go/util/workqueue" klog "k8s.io/klog/v2" - crdv1alpha1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1alpha1" + crdv1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta1" crdv1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumesnapshot/v1" clientset "github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned" - groupsnapshotinformers "github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumegroupsnapshot/v1alpha1" + groupsnapshotinformers "github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumegroupsnapshot/v1beta1" snapshotinformers "github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumesnapshot/v1" - groupsnapshotlisters "github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1alpha1" + groupsnapshotlisters "github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1beta1" snapshotlisters "github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumesnapshot/v1" "github.com/kubernetes-csi/external-snapshotter/v8/pkg/snapshotter" "github.com/kubernetes-csi/external-snapshotter/v8/pkg/utils" @@ -313,7 +313,7 @@ func (ctrl *csiSnapshotSideCarController) isDriverMatch(object interface{}) bool } return true } - if content, ok := object.(*crdv1alpha1.VolumeGroupSnapshotContent); ok { + if content, ok := object.(*crdv1beta1.VolumeGroupSnapshotContent); ok { if content.Spec.Source.GroupSnapshotHandles == nil && len(content.Spec.Source.VolumeHandles) == 0 { // Skip this group snapshot content if it does not have a valid source return false diff --git a/pkg/utils/patch.go b/pkg/utils/patch.go index 7ade0cf1b..7326e2867 100644 --- a/pkg/utils/patch.go +++ b/pkg/utils/patch.go @@ -4,7 +4,7 @@ import ( "context" "encoding/json" - crdv1alpha1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1alpha1" + crdv1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta1" crdv1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumesnapshot/v1" clientset "github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -60,17 +60,17 @@ func PatchVolumeSnapshot( // PatchVolumeGroupSnapshot patches a volume group snapshot object func PatchVolumeGroupSnapshot( - existingGroupSnapshot *crdv1alpha1.VolumeGroupSnapshot, + existingGroupSnapshot *crdv1beta1.VolumeGroupSnapshot, patch []PatchOp, client clientset.Interface, subresources ...string, -) (*crdv1alpha1.VolumeGroupSnapshot, error) { +) (*crdv1beta1.VolumeGroupSnapshot, error) { data, err := json.Marshal(patch) if nil != err { return existingGroupSnapshot, err } - newGroupSnapshot, err := client.GroupsnapshotV1alpha1().VolumeGroupSnapshots(existingGroupSnapshot.Namespace).Patch(context.TODO(), existingGroupSnapshot.Name, types.JSONPatchType, data, metav1.PatchOptions{}, subresources...) + newGroupSnapshot, err := client.GroupsnapshotV1beta1().VolumeGroupSnapshots(existingGroupSnapshot.Namespace).Patch(context.TODO(), existingGroupSnapshot.Name, types.JSONPatchType, data, metav1.PatchOptions{}, subresources...) if err != nil { return existingGroupSnapshot, err } @@ -80,17 +80,17 @@ func PatchVolumeGroupSnapshot( // PatchVolumeGroupSnapshotContent patches a volume group snapshot content object func PatchVolumeGroupSnapshotContent( - existingGroupSnapshotContent *crdv1alpha1.VolumeGroupSnapshotContent, + existingGroupSnapshotContent *crdv1beta1.VolumeGroupSnapshotContent, patch []PatchOp, client clientset.Interface, subresources ...string, -) (*crdv1alpha1.VolumeGroupSnapshotContent, error) { +) (*crdv1beta1.VolumeGroupSnapshotContent, error) { data, err := json.Marshal(patch) if nil != err { return existingGroupSnapshotContent, err } - newGroupSnapshotContent, err := client.GroupsnapshotV1alpha1().VolumeGroupSnapshotContents().Patch(context.TODO(), existingGroupSnapshotContent.Name, types.JSONPatchType, data, metav1.PatchOptions{}, subresources...) + newGroupSnapshotContent, err := client.GroupsnapshotV1beta1().VolumeGroupSnapshotContents().Patch(context.TODO(), existingGroupSnapshotContent.Name, types.JSONPatchType, data, metav1.PatchOptions{}, subresources...) if err != nil { return existingGroupSnapshotContent, err } diff --git a/pkg/utils/util.go b/pkg/utils/util.go index ee3326bc9..e137eb0fb 100644 --- a/pkg/utils/util.go +++ b/pkg/utils/util.go @@ -35,7 +35,7 @@ import ( "k8s.io/client-go/tools/cache" klog "k8s.io/klog/v2" - crdv1alpha1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1alpha1" + crdv1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta1" crdv1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumesnapshot/v1" ) @@ -397,7 +397,7 @@ func GetSecretReference(secretParams secretParamsMap, snapshotClassParams map[st } // GetSecretReference for the group snapshot -func GetGroupSnapshotSecretReference(secretParams secretParamsMap, volumeGroupSnapshotClassParams map[string]string, groupSnapContentName string, volumeGroupSnapshot *crdv1alpha1.VolumeGroupSnapshot) (*v1.SecretReference, error) { +func GetGroupSnapshotSecretReference(secretParams secretParamsMap, volumeGroupSnapshotClassParams map[string]string, groupSnapContentName string, volumeGroupSnapshot *crdv1beta1.VolumeGroupSnapshot) (*v1.SecretReference, error) { nameTemplate, namespaceTemplate, err := verifyAndGetSecretNameAndNamespaceTemplate(secretParams, volumeGroupSnapshotClassParams) if err != nil { return nil, fmt.Errorf("failed to get name and namespace template from params: %v", err) @@ -496,7 +496,7 @@ func NeedToAddContentFinalizer(content *crdv1.VolumeSnapshotContent) bool { } // NeedToAddGroupSnapshotContentFinalizer checks if a Finalizer needs to be added for the volume group snapshot content. -func NeedToAddGroupSnapshotContentFinalizer(groupSnapshotContent *crdv1alpha1.VolumeGroupSnapshotContent) bool { +func NeedToAddGroupSnapshotContentFinalizer(groupSnapshotContent *crdv1beta1.VolumeGroupSnapshotContent) bool { return groupSnapshotContent.ObjectMeta.DeletionTimestamp == nil && !slices.Contains(groupSnapshotContent.ObjectMeta.Finalizers, VolumeGroupSnapshotContentFinalizer) } @@ -508,7 +508,7 @@ func IsSnapshotDeletionCandidate(snapshot *crdv1.VolumeSnapshot) bool { // IsGroupSnapshotDeletionCandidate checks if a volume group snapshot deletionTimestamp // is set and any finalizer is on the group snapshot. -func IsGroupSnapshotDeletionCandidate(groupSnapshot *crdv1alpha1.VolumeGroupSnapshot) bool { +func IsGroupSnapshotDeletionCandidate(groupSnapshot *crdv1beta1.VolumeGroupSnapshot) bool { return groupSnapshot.ObjectMeta.DeletionTimestamp != nil && slices.Contains(groupSnapshot.ObjectMeta.Finalizers, VolumeGroupSnapshotBoundFinalizer) } @@ -523,7 +523,7 @@ func NeedToAddSnapshotBoundFinalizer(snapshot *crdv1.VolumeSnapshot) bool { } // NeedToAddGroupSnapshotBoundFinalizer checks if a Finalizer needs to be added for the bound volume group snapshot. -func NeedToAddGroupSnapshotBoundFinalizer(groupSnapshot *crdv1alpha1.VolumeGroupSnapshot) bool { +func NeedToAddGroupSnapshotBoundFinalizer(groupSnapshot *crdv1beta1.VolumeGroupSnapshot) bool { return groupSnapshot.ObjectMeta.DeletionTimestamp == nil && !slices.Contains(groupSnapshot.ObjectMeta.Finalizers, VolumeGroupSnapshotBoundFinalizer) && IsBoundVolumeGroupSnapshotContentNameSet(groupSnapshot) } @@ -575,7 +575,7 @@ func GetSnapshotStatusForLogging(snapshot *crdv1.VolumeSnapshot) string { return fmt.Sprintf("bound to: %q, Completed: %v", snapshotContentName, ready) } -func GetGroupSnapshotStatusForLogging(groupSnapshot *crdv1alpha1.VolumeGroupSnapshot) string { +func GetGroupSnapshotStatusForLogging(groupSnapshot *crdv1beta1.VolumeGroupSnapshot) string { groupSnapshotContentName := "" if groupSnapshot.Status != nil && groupSnapshot.Status.BoundVolumeGroupSnapshotContentName != nil { groupSnapshotContentName = *groupSnapshot.Status.BoundVolumeGroupSnapshotContentName @@ -615,7 +615,7 @@ func IsSnapshotCreated(snapshot *crdv1.VolumeSnapshot) bool { return snapshot.Status != nil && snapshot.Status.CreationTime != nil } -func GroupSnapshotKey(vgs *crdv1alpha1.VolumeGroupSnapshot) string { +func GroupSnapshotKey(vgs *crdv1beta1.VolumeGroupSnapshot) string { return fmt.Sprintf("%s/%s", vgs.Namespace, vgs.Name) } @@ -623,28 +623,28 @@ func GroupSnapshotRefKey(vgsref *v1.ObjectReference) string { return fmt.Sprintf("%s/%s", vgsref.Namespace, vgsref.Name) } -func IsGroupSnapshotReady(groupSnapshot *crdv1alpha1.VolumeGroupSnapshot) bool { +func IsGroupSnapshotReady(groupSnapshot *crdv1beta1.VolumeGroupSnapshot) bool { if groupSnapshot.Status == nil || groupSnapshot.Status.ReadyToUse == nil || *groupSnapshot.Status.ReadyToUse == false { return false } return true } -func IsBoundVolumeGroupSnapshotContentNameSet(groupSnapshot *crdv1alpha1.VolumeGroupSnapshot) bool { +func IsBoundVolumeGroupSnapshotContentNameSet(groupSnapshot *crdv1beta1.VolumeGroupSnapshot) bool { if groupSnapshot.Status == nil || groupSnapshot.Status.BoundVolumeGroupSnapshotContentName == nil || *groupSnapshot.Status.BoundVolumeGroupSnapshotContentName == "" { return false } return true } -func IsPVCVolumeSnapshotRefListSet(groupSnapshot *crdv1alpha1.VolumeGroupSnapshot) bool { +func IsPVCVolumeSnapshotRefListSet(groupSnapshot *crdv1beta1.VolumeGroupSnapshot) bool { if groupSnapshot.Status == nil || len(groupSnapshot.Status.PVCVolumeSnapshotRefList) == 0 { return false } return true } -func IsVolumeGroupSnapshotRefSet(groupSnapshot *crdv1alpha1.VolumeGroupSnapshot, content *crdv1alpha1.VolumeGroupSnapshotContent) bool { +func IsVolumeGroupSnapshotRefSet(groupSnapshot *crdv1beta1.VolumeGroupSnapshot, content *crdv1beta1.VolumeGroupSnapshotContent) bool { if content.Spec.VolumeGroupSnapshotRef.Name == groupSnapshot.Name && content.Spec.VolumeGroupSnapshotRef.Namespace == groupSnapshot.Namespace && content.Spec.VolumeGroupSnapshotRef.UID == groupSnapshot.UID { @@ -654,13 +654,13 @@ func IsVolumeGroupSnapshotRefSet(groupSnapshot *crdv1alpha1.VolumeGroupSnapshot, } // IsGroupSnapshotCreated indicates that the group snapshot has been cut on a storage system -func IsGroupSnapshotCreated(groupSnapshot *crdv1alpha1.VolumeGroupSnapshot) bool { +func IsGroupSnapshotCreated(groupSnapshot *crdv1beta1.VolumeGroupSnapshot) bool { return groupSnapshot.Status != nil && groupSnapshot.Status.CreationTime != nil } // GetDynamicSnapshotContentNameFoGrouprSnapshot returns a unique content name for the // passed in VolumeGroupSnapshot to dynamically provision a group snapshot. -func GetDynamicSnapshotContentNameForGroupSnapshot(groupSnapshot *crdv1alpha1.VolumeGroupSnapshot) string { +func GetDynamicSnapshotContentNameForGroupSnapshot(groupSnapshot *crdv1beta1.VolumeGroupSnapshot) string { return "groupsnapcontent-" + string(groupSnapshot.UID) } diff --git a/pkg/validation-webhook/groupsnapshot.go b/pkg/validation-webhook/groupsnapshot.go index 844164e4d..d2a14931c 100644 --- a/pkg/validation-webhook/groupsnapshot.go +++ b/pkg/validation-webhook/groupsnapshot.go @@ -19,8 +19,8 @@ package webhook import ( "fmt" - volumegroupsnapshotv1alpha1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1alpha1" - groupsnapshotlisters "github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1alpha1" + volumegroupsnapshotv1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta1" + groupsnapshotlisters "github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1beta1" "github.com/kubernetes-csi/external-snapshotter/v8/pkg/utils" v1 "k8s.io/api/admission/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -29,8 +29,8 @@ import ( ) var ( - // GroupSnapshotClassV1Apha1GVR is GroupVersionResource for v1alpha1 VolumeGroupSnapshotClasses - GroupSnapshotClassV1Apha1GVR = metav1.GroupVersionResource{Group: volumegroupsnapshotv1alpha1.GroupName, Version: "v1alpha1", Resource: "volumegroupsnapshotclasses"} + // GroupSnapshotClassV1Beta1GVR is GroupVersionResource for v1beta1 VolumeGroupSnapshotClasses + GroupSnapshotClassV1Beta1GVR = metav1.GroupVersionResource{Group: volumegroupsnapshotv1beta1.GroupName, Version: "v1beta1", Resource: "volumegroupsnapshotclasses"} ) type GroupSnapshotAdmitter interface { @@ -66,27 +66,27 @@ func (a groupSnapshotAdmitter) Admit(ar v1.AdmissionReview) *v1.AdmissionRespons deserializer := codecs.UniversalDeserializer() switch ar.Request.Resource { - case GroupSnapshotClassV1Apha1GVR: - groupSnapClass := &volumegroupsnapshotv1alpha1.VolumeGroupSnapshotClass{} + case GroupSnapshotClassV1Beta1GVR: + groupSnapClass := &volumegroupsnapshotv1beta1.VolumeGroupSnapshotClass{} if _, _, err := deserializer.Decode(raw, nil, groupSnapClass); err != nil { klog.Error(err) return toV1AdmissionResponse(err) } - oldGroupSnapClass := &volumegroupsnapshotv1alpha1.VolumeGroupSnapshotClass{} + oldGroupSnapClass := &volumegroupsnapshotv1beta1.VolumeGroupSnapshotClass{} if _, _, err := deserializer.Decode(oldRaw, nil, oldGroupSnapClass); err != nil { klog.Error(err) return toV1AdmissionResponse(err) } - return decideGroupSnapshotClassV1Alpha1(groupSnapClass, oldGroupSnapClass, a.lister) + return decideGroupSnapshotClassV1Beta1(groupSnapClass, oldGroupSnapClass, a.lister) default: err := fmt.Errorf("expect resource to be %s, but found %v", - GroupSnapshotClassV1Apha1GVR, ar.Request.Resource) + GroupSnapshotClassV1Beta1GVR, ar.Request.Resource) klog.Error(err) return toV1AdmissionResponse(err) } } -func decideGroupSnapshotClassV1Alpha1(groupSnapClass, oldGroupSnapClass *volumegroupsnapshotv1alpha1.VolumeGroupSnapshotClass, lister groupsnapshotlisters.VolumeGroupSnapshotClassLister) *v1.AdmissionResponse { +func decideGroupSnapshotClassV1Beta1(groupSnapClass, oldGroupSnapClass *volumegroupsnapshotv1beta1.VolumeGroupSnapshotClass, lister groupsnapshotlisters.VolumeGroupSnapshotClassLister) *v1.AdmissionResponse { reviewResponse := &v1.AdmissionResponse{ Allowed: true, Result: &metav1.Status{}, diff --git a/pkg/validation-webhook/groupsnapshot_test.go b/pkg/validation-webhook/groupsnapshot_test.go index 17fda56ba..b17555fa7 100644 --- a/pkg/validation-webhook/groupsnapshot_test.go +++ b/pkg/validation-webhook/groupsnapshot_test.go @@ -20,8 +20,8 @@ import ( "encoding/json" "testing" - volumegroupsnapshotv1alpha1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1alpha1" - groupsnapshotlisters "github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1alpha1" + volumegroupsnapshotv1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta1" + groupsnapshotlisters "github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1beta1" "github.com/kubernetes-csi/external-snapshotter/v8/pkg/utils" v1 "k8s.io/api/admission/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -30,14 +30,14 @@ import ( ) type fakeGroupSnapshotLister struct { - values []*volumegroupsnapshotv1alpha1.VolumeGroupSnapshotClass + values []*volumegroupsnapshotv1beta1.VolumeGroupSnapshotClass } -func (f *fakeGroupSnapshotLister) List(selector labels.Selector) (ret []*volumegroupsnapshotv1alpha1.VolumeGroupSnapshotClass, err error) { +func (f *fakeGroupSnapshotLister) List(selector labels.Selector) (ret []*volumegroupsnapshotv1beta1.VolumeGroupSnapshotClass, err error) { return f.values, nil } -func (f *fakeGroupSnapshotLister) Get(name string) (*volumegroupsnapshotv1alpha1.VolumeGroupSnapshotClass, error) { +func (f *fakeGroupSnapshotLister) Get(name string) (*volumegroupsnapshotv1beta1.VolumeGroupSnapshotClass, error) { for _, v := range f.values { if v.Name == name { return v, nil @@ -46,11 +46,11 @@ func (f *fakeGroupSnapshotLister) Get(name string) (*volumegroupsnapshotv1alpha1 return nil, nil } -func TestAdmitVolumeGroupSnapshotClassV1Alpha1(t *testing.T) { +func TestAdmitVolumeGroupSnapshotClassV1Beta1(t *testing.T) { testCases := []struct { name string - groupSnapClass *volumegroupsnapshotv1alpha1.VolumeGroupSnapshotClass - oldGroupSnapClass *volumegroupsnapshotv1alpha1.VolumeGroupSnapshotClass + groupSnapClass *volumegroupsnapshotv1beta1.VolumeGroupSnapshotClass + oldGroupSnapClass *volumegroupsnapshotv1beta1.VolumeGroupSnapshotClass shouldAdmit bool msg string operation v1.Operation @@ -58,7 +58,7 @@ func TestAdmitVolumeGroupSnapshotClassV1Alpha1(t *testing.T) { }{ { name: "new default for group snapshot class with no existing group snapshot classes", - groupSnapClass: &volumegroupsnapshotv1alpha1.VolumeGroupSnapshotClass{ + groupSnapClass: &volumegroupsnapshotv1beta1.VolumeGroupSnapshotClass{ TypeMeta: metav1.TypeMeta{}, ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ @@ -71,11 +71,11 @@ func TestAdmitVolumeGroupSnapshotClassV1Alpha1(t *testing.T) { shouldAdmit: true, msg: "", operation: v1.Create, - lister: &fakeGroupSnapshotLister{values: []*volumegroupsnapshotv1alpha1.VolumeGroupSnapshotClass{}}, + lister: &fakeGroupSnapshotLister{values: []*volumegroupsnapshotv1beta1.VolumeGroupSnapshotClass{}}, }, { name: "new default for group snapshot class for with existing default group snapshot class with different drivers", - groupSnapClass: &volumegroupsnapshotv1alpha1.VolumeGroupSnapshotClass{ + groupSnapClass: &volumegroupsnapshotv1beta1.VolumeGroupSnapshotClass{ TypeMeta: metav1.TypeMeta{}, ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ @@ -84,11 +84,11 @@ func TestAdmitVolumeGroupSnapshotClassV1Alpha1(t *testing.T) { }, Driver: "test.csi.io", }, - oldGroupSnapClass: &volumegroupsnapshotv1alpha1.VolumeGroupSnapshotClass{}, + oldGroupSnapClass: &volumegroupsnapshotv1beta1.VolumeGroupSnapshotClass{}, shouldAdmit: true, msg: "", operation: v1.Create, - lister: &fakeGroupSnapshotLister{values: []*volumegroupsnapshotv1alpha1.VolumeGroupSnapshotClass{ + lister: &fakeGroupSnapshotLister{values: []*volumegroupsnapshotv1beta1.VolumeGroupSnapshotClass{ { TypeMeta: metav1.TypeMeta{}, ObjectMeta: metav1.ObjectMeta{ @@ -102,7 +102,7 @@ func TestAdmitVolumeGroupSnapshotClassV1Alpha1(t *testing.T) { }, { name: "new default for group snapshot class with existing default group snapshot class same driver", - groupSnapClass: &volumegroupsnapshotv1alpha1.VolumeGroupSnapshotClass{ + groupSnapClass: &volumegroupsnapshotv1beta1.VolumeGroupSnapshotClass{ TypeMeta: metav1.TypeMeta{}, ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ @@ -111,11 +111,11 @@ func TestAdmitVolumeGroupSnapshotClassV1Alpha1(t *testing.T) { }, Driver: "test.csi.io", }, - oldGroupSnapClass: &volumegroupsnapshotv1alpha1.VolumeGroupSnapshotClass{}, + oldGroupSnapClass: &volumegroupsnapshotv1beta1.VolumeGroupSnapshotClass{}, shouldAdmit: false, msg: "default group snapshot class: driver-a already exists for driver: test.csi.io", operation: v1.Create, - lister: &fakeGroupSnapshotLister{values: []*volumegroupsnapshotv1alpha1.VolumeGroupSnapshotClass{ + lister: &fakeGroupSnapshotLister{values: []*volumegroupsnapshotv1beta1.VolumeGroupSnapshotClass{ { TypeMeta: metav1.TypeMeta{}, ObjectMeta: metav1.ObjectMeta{ @@ -130,7 +130,7 @@ func TestAdmitVolumeGroupSnapshotClassV1Alpha1(t *testing.T) { }, { name: "default for group snapshot class with existing default group snapshot class same driver update", - groupSnapClass: &volumegroupsnapshotv1alpha1.VolumeGroupSnapshotClass{ + groupSnapClass: &volumegroupsnapshotv1beta1.VolumeGroupSnapshotClass{ TypeMeta: metav1.TypeMeta{}, ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ @@ -139,7 +139,7 @@ func TestAdmitVolumeGroupSnapshotClassV1Alpha1(t *testing.T) { }, Driver: "test.csi.io", }, - oldGroupSnapClass: &volumegroupsnapshotv1alpha1.VolumeGroupSnapshotClass{ + oldGroupSnapClass: &volumegroupsnapshotv1beta1.VolumeGroupSnapshotClass{ TypeMeta: metav1.TypeMeta{}, ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ @@ -151,7 +151,7 @@ func TestAdmitVolumeGroupSnapshotClassV1Alpha1(t *testing.T) { shouldAdmit: true, msg: "", operation: v1.Update, - lister: &fakeGroupSnapshotLister{values: []*volumegroupsnapshotv1alpha1.VolumeGroupSnapshotClass{ + lister: &fakeGroupSnapshotLister{values: []*volumegroupsnapshotv1beta1.VolumeGroupSnapshotClass{ { TypeMeta: metav1.TypeMeta{}, ObjectMeta: metav1.ObjectMeta{ @@ -165,16 +165,16 @@ func TestAdmitVolumeGroupSnapshotClassV1Alpha1(t *testing.T) { }, { name: "new group snapshot for group snapshot class with existing default group snapshot class same driver", - groupSnapClass: &volumegroupsnapshotv1alpha1.VolumeGroupSnapshotClass{ + groupSnapClass: &volumegroupsnapshotv1beta1.VolumeGroupSnapshotClass{ TypeMeta: metav1.TypeMeta{}, ObjectMeta: metav1.ObjectMeta{}, Driver: "test.csi.io", }, - oldGroupSnapClass: &volumegroupsnapshotv1alpha1.VolumeGroupSnapshotClass{}, + oldGroupSnapClass: &volumegroupsnapshotv1beta1.VolumeGroupSnapshotClass{}, shouldAdmit: true, msg: "", operation: v1.Create, - lister: &fakeGroupSnapshotLister{values: []*volumegroupsnapshotv1alpha1.VolumeGroupSnapshotClass{ + lister: &fakeGroupSnapshotLister{values: []*volumegroupsnapshotv1beta1.VolumeGroupSnapshotClass{ { TypeMeta: metav1.TypeMeta{}, ObjectMeta: metav1.ObjectMeta{ @@ -188,7 +188,7 @@ func TestAdmitVolumeGroupSnapshotClassV1Alpha1(t *testing.T) { }, { name: "new group snapshot for group snapshot class with existing group snapshot default classes", - groupSnapClass: &volumegroupsnapshotv1alpha1.VolumeGroupSnapshotClass{ + groupSnapClass: &volumegroupsnapshotv1beta1.VolumeGroupSnapshotClass{ TypeMeta: metav1.TypeMeta{}, ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ @@ -197,11 +197,11 @@ func TestAdmitVolumeGroupSnapshotClassV1Alpha1(t *testing.T) { }, Driver: "test.csi.io", }, - oldGroupSnapClass: &volumegroupsnapshotv1alpha1.VolumeGroupSnapshotClass{}, + oldGroupSnapClass: &volumegroupsnapshotv1beta1.VolumeGroupSnapshotClass{}, shouldAdmit: false, msg: "default group snapshot class: driver-is-default already exists for driver: test.csi.io", operation: v1.Create, - lister: &fakeGroupSnapshotLister{[]*volumegroupsnapshotv1alpha1.VolumeGroupSnapshotClass{ + lister: &fakeGroupSnapshotLister{[]*volumegroupsnapshotv1beta1.VolumeGroupSnapshotClass{ { TypeMeta: metav1.TypeMeta{}, ObjectMeta: metav1.ObjectMeta{ @@ -225,7 +225,7 @@ func TestAdmitVolumeGroupSnapshotClassV1Alpha1(t *testing.T) { }, { name: "update group snapshot class to new driver with existing default group snapshot classes", - groupSnapClass: &volumegroupsnapshotv1alpha1.VolumeGroupSnapshotClass{ + groupSnapClass: &volumegroupsnapshotv1beta1.VolumeGroupSnapshotClass{ TypeMeta: metav1.TypeMeta{}, ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ @@ -234,7 +234,7 @@ func TestAdmitVolumeGroupSnapshotClassV1Alpha1(t *testing.T) { }, Driver: "driver.test.csi.io", }, - oldGroupSnapClass: &volumegroupsnapshotv1alpha1.VolumeGroupSnapshotClass{ + oldGroupSnapClass: &volumegroupsnapshotv1beta1.VolumeGroupSnapshotClass{ TypeMeta: metav1.TypeMeta{}, ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ @@ -246,7 +246,7 @@ func TestAdmitVolumeGroupSnapshotClassV1Alpha1(t *testing.T) { shouldAdmit: false, msg: "default group snapshot class: driver-test-default already exists for driver: driver.test.csi.io", operation: v1.Update, - lister: &fakeGroupSnapshotLister{values: []*volumegroupsnapshotv1alpha1.VolumeGroupSnapshotClass{ + lister: &fakeGroupSnapshotLister{values: []*volumegroupsnapshotv1beta1.VolumeGroupSnapshotClass{ { TypeMeta: metav1.TypeMeta{}, ObjectMeta: metav1.ObjectMeta{ @@ -291,7 +291,7 @@ func TestAdmitVolumeGroupSnapshotClassV1Alpha1(t *testing.T) { OldObject: runtime.RawExtension{ Raw: oldRaw, }, - Resource: GroupSnapshotClassV1Apha1GVR, + Resource: GroupSnapshotClassV1Beta1GVR, Operation: tc.operation, }, } diff --git a/pkg/validation-webhook/webhook.go b/pkg/validation-webhook/webhook.go index 190fbb6aa..27c1c0719 100644 --- a/pkg/validation-webhook/webhook.go +++ b/pkg/validation-webhook/webhook.go @@ -26,7 +26,7 @@ import ( "os" clientset "github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned" - groupsnapshotlisters "github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1alpha1" + groupsnapshotlisters "github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1beta1" snapshotlisters "github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumesnapshot/v1" "github.com/spf13/cobra" @@ -276,7 +276,7 @@ func main(cmd *cobra.Command, args []string) { snapshotLister := factory.Snapshot().V1().VolumeSnapshotClasses().Lister() var groupSnapshotLister groupsnapshotlisters.VolumeGroupSnapshotClassLister if enableVolumeGroupSnapshotWebhook { - groupSnapshotLister = factory.Groupsnapshot().V1alpha1().VolumeGroupSnapshotClasses().Lister() + groupSnapshotLister = factory.Groupsnapshot().V1beta1().VolumeGroupSnapshotClasses().Lister() } // Start the informers diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1alpha1/doc.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta1/doc.go similarity index 97% rename from vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1alpha1/doc.go rename to vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta1/doc.go index f3b8d19ef..f2fdf6b8b 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1alpha1/doc.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta1/doc.go @@ -17,4 +17,4 @@ limitations under the License. // +k8s:deepcopy-gen=package // +groupName=groupsnapshot.storage.k8s.io -package v1alpha1 +package v1beta1 diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1alpha1/register.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta1/register.go similarity index 98% rename from vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1alpha1/register.go rename to vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta1/register.go index 42b82aaee..22cebf945 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1alpha1/register.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta1/register.go @@ -11,7 +11,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha1 +package v1beta1 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -28,7 +28,7 @@ var ( // AddToScheme adds to scheme AddToScheme = SchemeBuilder.AddToScheme // 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 { diff --git a/client/apis/volumegroupsnapshot/v1alpha1/types.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta1/types.go similarity index 99% rename from client/apis/volumegroupsnapshot/v1alpha1/types.go rename to vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta1/types.go index c620440d2..909789cae 100644 --- a/client/apis/volumegroupsnapshot/v1alpha1/types.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta1/types.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ // +kubebuilder:object:generate=true -package v1alpha1 +package v1beta1 import ( core_v1 "k8s.io/api/core/v1" diff --git a/client/apis/volumegroupsnapshot/v1alpha1/zz_generated.deepcopy.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta1/zz_generated.deepcopy.go similarity index 99% rename from client/apis/volumegroupsnapshot/v1alpha1/zz_generated.deepcopy.go rename to vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta1/zz_generated.deepcopy.go index 82895edea..966ac4559 100644 --- a/client/apis/volumegroupsnapshot/v1alpha1/zz_generated.deepcopy.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta1/zz_generated.deepcopy.go @@ -19,7 +19,7 @@ limitations under the License. // Code generated by deepcopy-gen. DO NOT EDIT. -package v1alpha1 +package v1beta1 import ( v1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumesnapshot/v1" 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 f4e8bf3d0..050de3b87 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 @@ -22,7 +22,7 @@ import ( "fmt" "net/http" - groupsnapshotv1alpha1 "github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1alpha1" + groupsnapshotv1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1" 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" @@ -31,20 +31,20 @@ import ( type Interface interface { Discovery() discovery.DiscoveryInterface - GroupsnapshotV1alpha1() groupsnapshotv1alpha1.GroupsnapshotV1alpha1Interface + GroupsnapshotV1beta1() groupsnapshotv1beta1.GroupsnapshotV1beta1Interface SnapshotV1() snapshotv1.SnapshotV1Interface } // Clientset contains the clients for groups. type Clientset struct { *discovery.DiscoveryClient - groupsnapshotV1alpha1 *groupsnapshotv1alpha1.GroupsnapshotV1alpha1Client - snapshotV1 *snapshotv1.SnapshotV1Client + groupsnapshotV1beta1 *groupsnapshotv1beta1.GroupsnapshotV1beta1Client + snapshotV1 *snapshotv1.SnapshotV1Client } -// GroupsnapshotV1alpha1 retrieves the GroupsnapshotV1alpha1Client -func (c *Clientset) GroupsnapshotV1alpha1() groupsnapshotv1alpha1.GroupsnapshotV1alpha1Interface { - return c.groupsnapshotV1alpha1 +// GroupsnapshotV1beta1 retrieves the GroupsnapshotV1beta1Client +func (c *Clientset) GroupsnapshotV1beta1() groupsnapshotv1beta1.GroupsnapshotV1beta1Interface { + return c.groupsnapshotV1beta1 } // SnapshotV1 retrieves the SnapshotV1Client @@ -96,7 +96,7 @@ func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset, var cs Clientset var err error - cs.groupsnapshotV1alpha1, err = groupsnapshotv1alpha1.NewForConfigAndClient(&configShallowCopy, httpClient) + cs.groupsnapshotV1beta1, err = groupsnapshotv1beta1.NewForConfigAndClient(&configShallowCopy, httpClient) if err != nil { return nil, err } @@ -125,7 +125,7 @@ func NewForConfigOrDie(c *rest.Config) *Clientset { // New creates a new Clientset for the given RESTClient. func New(c rest.Interface) *Clientset { var cs Clientset - cs.groupsnapshotV1alpha1 = groupsnapshotv1alpha1.New(c) + cs.groupsnapshotV1beta1 = groupsnapshotv1beta1.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 4a6f63b23..637c89f34 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 @@ -20,8 +20,8 @@ package fake import ( clientset "github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned" - groupsnapshotv1alpha1 "github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1alpha1" - fakegroupsnapshotv1alpha1 "github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/fake" + 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" 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" @@ -81,9 +81,9 @@ var ( _ testing.FakeClient = &Clientset{} ) -// GroupsnapshotV1alpha1 retrieves the GroupsnapshotV1alpha1Client -func (c *Clientset) GroupsnapshotV1alpha1() groupsnapshotv1alpha1.GroupsnapshotV1alpha1Interface { - return &fakegroupsnapshotv1alpha1.FakeGroupsnapshotV1alpha1{Fake: &c.Fake} +// GroupsnapshotV1beta1 retrieves the GroupsnapshotV1beta1Client +func (c *Clientset) GroupsnapshotV1beta1() groupsnapshotv1beta1.GroupsnapshotV1beta1Interface { + return &fakegroupsnapshotv1beta1.FakeGroupsnapshotV1beta1{Fake: &c.Fake} } // SnapshotV1 retrieves the SnapshotV1Client 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 bb5a6212c..c1e1e26d0 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 @@ -19,7 +19,7 @@ limitations under the License. package fake 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" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" @@ -32,7 +32,7 @@ var scheme = runtime.NewScheme() var codecs = serializer.NewCodecFactory(scheme) var localSchemeBuilder = runtime.SchemeBuilder{ - groupsnapshotv1alpha1.AddToScheme, + groupsnapshotv1beta1.AddToScheme, snapshotv1.AddToScheme, } 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 7ecf08084..6f8c4fdf0 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 @@ -19,7 +19,7 @@ limitations under the License. package scheme 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" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" @@ -32,7 +32,7 @@ var Scheme = runtime.NewScheme() var Codecs = serializer.NewCodecFactory(Scheme) var ParameterCodec = runtime.NewParameterCodec(Scheme) var localSchemeBuilder = runtime.SchemeBuilder{ - groupsnapshotv1alpha1.AddToScheme, + groupsnapshotv1beta1.AddToScheme, snapshotv1.AddToScheme, } diff --git a/client/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/doc.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/doc.go similarity index 97% rename from client/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/doc.go rename to vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/doc.go index ecc546221..c70a3f531 100644 --- a/client/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/doc.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/doc.go @@ -17,4 +17,4 @@ limitations under the License. // Code generated by client-gen. DO NOT EDIT. // This package has the automatically generated typed clients. -package v1alpha1 +package v1beta1 diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/fake/doc.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/doc.go similarity index 100% rename from vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/fake/doc.go rename to vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/doc.go diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/fake/fake_volumegroupsnapshot.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/fake_volumegroupsnapshot.go similarity index 68% rename from vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/fake/fake_volumegroupsnapshot.go rename to vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/fake_volumegroupsnapshot.go index 355335e5f..9cb98c4ae 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/fake/fake_volumegroupsnapshot.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/fake_volumegroupsnapshot.go @@ -21,7 +21,7 @@ package fake import ( "context" - v1alpha1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1alpha1" + v1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" types "k8s.io/apimachinery/pkg/types" @@ -31,29 +31,29 @@ import ( // FakeVolumeGroupSnapshots implements VolumeGroupSnapshotInterface type FakeVolumeGroupSnapshots struct { - Fake *FakeGroupsnapshotV1alpha1 + Fake *FakeGroupsnapshotV1beta1 ns string } -var volumegroupsnapshotsResource = v1alpha1.SchemeGroupVersion.WithResource("volumegroupsnapshots") +var volumegroupsnapshotsResource = v1beta1.SchemeGroupVersion.WithResource("volumegroupsnapshots") -var volumegroupsnapshotsKind = v1alpha1.SchemeGroupVersion.WithKind("VolumeGroupSnapshot") +var volumegroupsnapshotsKind = v1beta1.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 *v1alpha1.VolumeGroupSnapshot, err error) { +func (c *FakeVolumeGroupSnapshots) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.VolumeGroupSnapshot, err error) { obj, err := c.Fake. - Invokes(testing.NewGetAction(volumegroupsnapshotsResource, c.ns, name), &v1alpha1.VolumeGroupSnapshot{}) + Invokes(testing.NewGetAction(volumegroupsnapshotsResource, c.ns, name), &v1beta1.VolumeGroupSnapshot{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.VolumeGroupSnapshot), err + return obj.(*v1beta1.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 *v1alpha1.VolumeGroupSnapshotList, err error) { +func (c *FakeVolumeGroupSnapshots) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.VolumeGroupSnapshotList, err error) { obj, err := c.Fake. - Invokes(testing.NewListAction(volumegroupsnapshotsResource, volumegroupsnapshotsKind, c.ns, opts), &v1alpha1.VolumeGroupSnapshotList{}) + Invokes(testing.NewListAction(volumegroupsnapshotsResource, volumegroupsnapshotsKind, c.ns, opts), &v1beta1.VolumeGroupSnapshotList{}) if obj == nil { return nil, err @@ -63,8 +63,8 @@ func (c *FakeVolumeGroupSnapshots) List(ctx context.Context, opts v1.ListOptions if label == nil { label = labels.Everything() } - list := &v1alpha1.VolumeGroupSnapshotList{ListMeta: obj.(*v1alpha1.VolumeGroupSnapshotList).ListMeta} - for _, item := range obj.(*v1alpha1.VolumeGroupSnapshotList).Items { + list := &v1beta1.VolumeGroupSnapshotList{ListMeta: obj.(*v1beta1.VolumeGroupSnapshotList).ListMeta} + for _, item := range obj.(*v1beta1.VolumeGroupSnapshotList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -80,43 +80,43 @@ func (c *FakeVolumeGroupSnapshots) Watch(ctx context.Context, opts v1.ListOption } // 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 *v1alpha1.VolumeGroupSnapshot, opts v1.CreateOptions) (result *v1alpha1.VolumeGroupSnapshot, err error) { +func (c *FakeVolumeGroupSnapshots) Create(ctx context.Context, volumeGroupSnapshot *v1beta1.VolumeGroupSnapshot, opts v1.CreateOptions) (result *v1beta1.VolumeGroupSnapshot, err error) { obj, err := c.Fake. - Invokes(testing.NewCreateAction(volumegroupsnapshotsResource, c.ns, volumeGroupSnapshot), &v1alpha1.VolumeGroupSnapshot{}) + Invokes(testing.NewCreateAction(volumegroupsnapshotsResource, c.ns, volumeGroupSnapshot), &v1beta1.VolumeGroupSnapshot{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.VolumeGroupSnapshot), err + return obj.(*v1beta1.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 *v1alpha1.VolumeGroupSnapshot, opts v1.UpdateOptions) (result *v1alpha1.VolumeGroupSnapshot, err error) { +func (c *FakeVolumeGroupSnapshots) Update(ctx context.Context, volumeGroupSnapshot *v1beta1.VolumeGroupSnapshot, opts v1.UpdateOptions) (result *v1beta1.VolumeGroupSnapshot, err error) { obj, err := c.Fake. - Invokes(testing.NewUpdateAction(volumegroupsnapshotsResource, c.ns, volumeGroupSnapshot), &v1alpha1.VolumeGroupSnapshot{}) + Invokes(testing.NewUpdateAction(volumegroupsnapshotsResource, c.ns, volumeGroupSnapshot), &v1beta1.VolumeGroupSnapshot{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.VolumeGroupSnapshot), err + return obj.(*v1beta1.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 *v1alpha1.VolumeGroupSnapshot, opts v1.UpdateOptions) (*v1alpha1.VolumeGroupSnapshot, error) { +func (c *FakeVolumeGroupSnapshots) UpdateStatus(ctx context.Context, volumeGroupSnapshot *v1beta1.VolumeGroupSnapshot, opts v1.UpdateOptions) (*v1beta1.VolumeGroupSnapshot, error) { obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(volumegroupsnapshotsResource, "status", c.ns, volumeGroupSnapshot), &v1alpha1.VolumeGroupSnapshot{}) + Invokes(testing.NewUpdateSubresourceAction(volumegroupsnapshotsResource, "status", c.ns, volumeGroupSnapshot), &v1beta1.VolumeGroupSnapshot{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.VolumeGroupSnapshot), err + return obj.(*v1beta1.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), &v1alpha1.VolumeGroupSnapshot{}) + Invokes(testing.NewDeleteActionWithOptions(volumegroupsnapshotsResource, c.ns, name, opts), &v1beta1.VolumeGroupSnapshot{}) return err } @@ -125,17 +125,17 @@ func (c *FakeVolumeGroupSnapshots) Delete(ctx context.Context, name string, opts 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, &v1alpha1.VolumeGroupSnapshotList{}) + _, err := c.Fake.Invokes(action, &v1beta1.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 *v1alpha1.VolumeGroupSnapshot, err error) { +func (c *FakeVolumeGroupSnapshots) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.VolumeGroupSnapshot, err error) { obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(volumegroupsnapshotsResource, c.ns, name, pt, data, subresources...), &v1alpha1.VolumeGroupSnapshot{}) + Invokes(testing.NewPatchSubresourceAction(volumegroupsnapshotsResource, c.ns, name, pt, data, subresources...), &v1beta1.VolumeGroupSnapshot{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.VolumeGroupSnapshot), err + return obj.(*v1beta1.VolumeGroupSnapshot), err } diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/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 similarity index 64% rename from vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/fake/fake_volumegroupsnapshot_client.go rename to vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/fake_volumegroupsnapshot_client.go index f8e247dcf..47ce2cb4f 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/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 @@ -19,30 +19,30 @@ limitations under the License. package fake import ( - v1alpha1 "github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1alpha1" + v1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1" rest "k8s.io/client-go/rest" testing "k8s.io/client-go/testing" ) -type FakeGroupsnapshotV1alpha1 struct { +type FakeGroupsnapshotV1beta1 struct { *testing.Fake } -func (c *FakeGroupsnapshotV1alpha1) VolumeGroupSnapshots(namespace string) v1alpha1.VolumeGroupSnapshotInterface { +func (c *FakeGroupsnapshotV1beta1) VolumeGroupSnapshots(namespace string) v1beta1.VolumeGroupSnapshotInterface { return &FakeVolumeGroupSnapshots{c, namespace} } -func (c *FakeGroupsnapshotV1alpha1) VolumeGroupSnapshotClasses() v1alpha1.VolumeGroupSnapshotClassInterface { +func (c *FakeGroupsnapshotV1beta1) VolumeGroupSnapshotClasses() v1beta1.VolumeGroupSnapshotClassInterface { return &FakeVolumeGroupSnapshotClasses{c} } -func (c *FakeGroupsnapshotV1alpha1) VolumeGroupSnapshotContents() v1alpha1.VolumeGroupSnapshotContentInterface { +func (c *FakeGroupsnapshotV1beta1) VolumeGroupSnapshotContents() v1beta1.VolumeGroupSnapshotContentInterface { return &FakeVolumeGroupSnapshotContents{c} } // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeGroupsnapshotV1alpha1) RESTClient() rest.Interface { +func (c *FakeGroupsnapshotV1beta1) RESTClient() rest.Interface { var ret *rest.RESTClient return ret } diff --git a/client/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/fake/fake_volumegroupsnapshotclass.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/fake_volumegroupsnapshotclass.go similarity index 67% rename from client/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/fake/fake_volumegroupsnapshotclass.go rename to vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/fake_volumegroupsnapshotclass.go index 99577cd89..1ca15d7e0 100644 --- a/client/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/fake/fake_volumegroupsnapshotclass.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/fake_volumegroupsnapshotclass.go @@ -21,7 +21,7 @@ package fake import ( "context" - v1alpha1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1alpha1" + v1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" types "k8s.io/apimachinery/pkg/types" @@ -31,27 +31,27 @@ import ( // FakeVolumeGroupSnapshotClasses implements VolumeGroupSnapshotClassInterface type FakeVolumeGroupSnapshotClasses struct { - Fake *FakeGroupsnapshotV1alpha1 + Fake *FakeGroupsnapshotV1beta1 } -var volumegroupsnapshotclassesResource = v1alpha1.SchemeGroupVersion.WithResource("volumegroupsnapshotclasses") +var volumegroupsnapshotclassesResource = v1beta1.SchemeGroupVersion.WithResource("volumegroupsnapshotclasses") -var volumegroupsnapshotclassesKind = v1alpha1.SchemeGroupVersion.WithKind("VolumeGroupSnapshotClass") +var volumegroupsnapshotclassesKind = v1beta1.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 *v1alpha1.VolumeGroupSnapshotClass, err error) { +func (c *FakeVolumeGroupSnapshotClasses) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.VolumeGroupSnapshotClass, err error) { obj, err := c.Fake. - Invokes(testing.NewRootGetAction(volumegroupsnapshotclassesResource, name), &v1alpha1.VolumeGroupSnapshotClass{}) + Invokes(testing.NewRootGetAction(volumegroupsnapshotclassesResource, name), &v1beta1.VolumeGroupSnapshotClass{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.VolumeGroupSnapshotClass), err + return obj.(*v1beta1.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 *v1alpha1.VolumeGroupSnapshotClassList, err error) { +func (c *FakeVolumeGroupSnapshotClasses) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.VolumeGroupSnapshotClassList, err error) { obj, err := c.Fake. - Invokes(testing.NewRootListAction(volumegroupsnapshotclassesResource, volumegroupsnapshotclassesKind, opts), &v1alpha1.VolumeGroupSnapshotClassList{}) + Invokes(testing.NewRootListAction(volumegroupsnapshotclassesResource, volumegroupsnapshotclassesKind, opts), &v1beta1.VolumeGroupSnapshotClassList{}) if obj == nil { return nil, err } @@ -60,8 +60,8 @@ func (c *FakeVolumeGroupSnapshotClasses) List(ctx context.Context, opts v1.ListO if label == nil { label = labels.Everything() } - list := &v1alpha1.VolumeGroupSnapshotClassList{ListMeta: obj.(*v1alpha1.VolumeGroupSnapshotClassList).ListMeta} - for _, item := range obj.(*v1alpha1.VolumeGroupSnapshotClassList).Items { + list := &v1beta1.VolumeGroupSnapshotClassList{ListMeta: obj.(*v1beta1.VolumeGroupSnapshotClassList).ListMeta} + for _, item := range obj.(*v1beta1.VolumeGroupSnapshotClassList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -76,29 +76,29 @@ func (c *FakeVolumeGroupSnapshotClasses) Watch(ctx context.Context, opts v1.List } // 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 *v1alpha1.VolumeGroupSnapshotClass, opts v1.CreateOptions) (result *v1alpha1.VolumeGroupSnapshotClass, err error) { +func (c *FakeVolumeGroupSnapshotClasses) Create(ctx context.Context, volumeGroupSnapshotClass *v1beta1.VolumeGroupSnapshotClass, opts v1.CreateOptions) (result *v1beta1.VolumeGroupSnapshotClass, err error) { obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(volumegroupsnapshotclassesResource, volumeGroupSnapshotClass), &v1alpha1.VolumeGroupSnapshotClass{}) + Invokes(testing.NewRootCreateAction(volumegroupsnapshotclassesResource, volumeGroupSnapshotClass), &v1beta1.VolumeGroupSnapshotClass{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.VolumeGroupSnapshotClass), err + return obj.(*v1beta1.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 *v1alpha1.VolumeGroupSnapshotClass, opts v1.UpdateOptions) (result *v1alpha1.VolumeGroupSnapshotClass, err error) { +func (c *FakeVolumeGroupSnapshotClasses) Update(ctx context.Context, volumeGroupSnapshotClass *v1beta1.VolumeGroupSnapshotClass, opts v1.UpdateOptions) (result *v1beta1.VolumeGroupSnapshotClass, err error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(volumegroupsnapshotclassesResource, volumeGroupSnapshotClass), &v1alpha1.VolumeGroupSnapshotClass{}) + Invokes(testing.NewRootUpdateAction(volumegroupsnapshotclassesResource, volumeGroupSnapshotClass), &v1beta1.VolumeGroupSnapshotClass{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.VolumeGroupSnapshotClass), err + return obj.(*v1beta1.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), &v1alpha1.VolumeGroupSnapshotClass{}) + Invokes(testing.NewRootDeleteActionWithOptions(volumegroupsnapshotclassesResource, name, opts), &v1beta1.VolumeGroupSnapshotClass{}) return err } @@ -106,16 +106,16 @@ func (c *FakeVolumeGroupSnapshotClasses) Delete(ctx context.Context, name string func (c *FakeVolumeGroupSnapshotClasses) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { action := testing.NewRootDeleteCollectionAction(volumegroupsnapshotclassesResource, listOpts) - _, err := c.Fake.Invokes(action, &v1alpha1.VolumeGroupSnapshotClassList{}) + _, err := c.Fake.Invokes(action, &v1beta1.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 *v1alpha1.VolumeGroupSnapshotClass, err error) { +func (c *FakeVolumeGroupSnapshotClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.VolumeGroupSnapshotClass, err error) { obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(volumegroupsnapshotclassesResource, name, pt, data, subresources...), &v1alpha1.VolumeGroupSnapshotClass{}) + Invokes(testing.NewRootPatchSubresourceAction(volumegroupsnapshotclassesResource, name, pt, data, subresources...), &v1beta1.VolumeGroupSnapshotClass{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.VolumeGroupSnapshotClass), err + return obj.(*v1beta1.VolumeGroupSnapshotClass), err } diff --git a/client/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/fake/fake_volumegroupsnapshotcontent.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/fake_volumegroupsnapshotcontent.go similarity index 66% rename from client/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/fake/fake_volumegroupsnapshotcontent.go rename to vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/fake_volumegroupsnapshotcontent.go index 159e246e4..738f0cd4b 100644 --- a/client/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/fake/fake_volumegroupsnapshotcontent.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/fake_volumegroupsnapshotcontent.go @@ -21,7 +21,7 @@ package fake import ( "context" - v1alpha1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1alpha1" + v1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" types "k8s.io/apimachinery/pkg/types" @@ -31,27 +31,27 @@ import ( // FakeVolumeGroupSnapshotContents implements VolumeGroupSnapshotContentInterface type FakeVolumeGroupSnapshotContents struct { - Fake *FakeGroupsnapshotV1alpha1 + Fake *FakeGroupsnapshotV1beta1 } -var volumegroupsnapshotcontentsResource = v1alpha1.SchemeGroupVersion.WithResource("volumegroupsnapshotcontents") +var volumegroupsnapshotcontentsResource = v1beta1.SchemeGroupVersion.WithResource("volumegroupsnapshotcontents") -var volumegroupsnapshotcontentsKind = v1alpha1.SchemeGroupVersion.WithKind("VolumeGroupSnapshotContent") +var volumegroupsnapshotcontentsKind = v1beta1.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 *v1alpha1.VolumeGroupSnapshotContent, err error) { +func (c *FakeVolumeGroupSnapshotContents) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.VolumeGroupSnapshotContent, err error) { obj, err := c.Fake. - Invokes(testing.NewRootGetAction(volumegroupsnapshotcontentsResource, name), &v1alpha1.VolumeGroupSnapshotContent{}) + Invokes(testing.NewRootGetAction(volumegroupsnapshotcontentsResource, name), &v1beta1.VolumeGroupSnapshotContent{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.VolumeGroupSnapshotContent), err + return obj.(*v1beta1.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 *v1alpha1.VolumeGroupSnapshotContentList, err error) { +func (c *FakeVolumeGroupSnapshotContents) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.VolumeGroupSnapshotContentList, err error) { obj, err := c.Fake. - Invokes(testing.NewRootListAction(volumegroupsnapshotcontentsResource, volumegroupsnapshotcontentsKind, opts), &v1alpha1.VolumeGroupSnapshotContentList{}) + Invokes(testing.NewRootListAction(volumegroupsnapshotcontentsResource, volumegroupsnapshotcontentsKind, opts), &v1beta1.VolumeGroupSnapshotContentList{}) if obj == nil { return nil, err } @@ -60,8 +60,8 @@ func (c *FakeVolumeGroupSnapshotContents) List(ctx context.Context, opts v1.List if label == nil { label = labels.Everything() } - list := &v1alpha1.VolumeGroupSnapshotContentList{ListMeta: obj.(*v1alpha1.VolumeGroupSnapshotContentList).ListMeta} - for _, item := range obj.(*v1alpha1.VolumeGroupSnapshotContentList).Items { + list := &v1beta1.VolumeGroupSnapshotContentList{ListMeta: obj.(*v1beta1.VolumeGroupSnapshotContentList).ListMeta} + for _, item := range obj.(*v1beta1.VolumeGroupSnapshotContentList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -76,40 +76,40 @@ func (c *FakeVolumeGroupSnapshotContents) Watch(ctx context.Context, opts v1.Lis } // 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 *v1alpha1.VolumeGroupSnapshotContent, opts v1.CreateOptions) (result *v1alpha1.VolumeGroupSnapshotContent, err error) { +func (c *FakeVolumeGroupSnapshotContents) Create(ctx context.Context, volumeGroupSnapshotContent *v1beta1.VolumeGroupSnapshotContent, opts v1.CreateOptions) (result *v1beta1.VolumeGroupSnapshotContent, err error) { obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(volumegroupsnapshotcontentsResource, volumeGroupSnapshotContent), &v1alpha1.VolumeGroupSnapshotContent{}) + Invokes(testing.NewRootCreateAction(volumegroupsnapshotcontentsResource, volumeGroupSnapshotContent), &v1beta1.VolumeGroupSnapshotContent{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.VolumeGroupSnapshotContent), err + return obj.(*v1beta1.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 *v1alpha1.VolumeGroupSnapshotContent, opts v1.UpdateOptions) (result *v1alpha1.VolumeGroupSnapshotContent, err error) { +func (c *FakeVolumeGroupSnapshotContents) Update(ctx context.Context, volumeGroupSnapshotContent *v1beta1.VolumeGroupSnapshotContent, opts v1.UpdateOptions) (result *v1beta1.VolumeGroupSnapshotContent, err error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(volumegroupsnapshotcontentsResource, volumeGroupSnapshotContent), &v1alpha1.VolumeGroupSnapshotContent{}) + Invokes(testing.NewRootUpdateAction(volumegroupsnapshotcontentsResource, volumeGroupSnapshotContent), &v1beta1.VolumeGroupSnapshotContent{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.VolumeGroupSnapshotContent), err + return obj.(*v1beta1.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 *v1alpha1.VolumeGroupSnapshotContent, opts v1.UpdateOptions) (*v1alpha1.VolumeGroupSnapshotContent, error) { +func (c *FakeVolumeGroupSnapshotContents) UpdateStatus(ctx context.Context, volumeGroupSnapshotContent *v1beta1.VolumeGroupSnapshotContent, opts v1.UpdateOptions) (*v1beta1.VolumeGroupSnapshotContent, error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(volumegroupsnapshotcontentsResource, "status", volumeGroupSnapshotContent), &v1alpha1.VolumeGroupSnapshotContent{}) + Invokes(testing.NewRootUpdateSubresourceAction(volumegroupsnapshotcontentsResource, "status", volumeGroupSnapshotContent), &v1beta1.VolumeGroupSnapshotContent{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.VolumeGroupSnapshotContent), err + return obj.(*v1beta1.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), &v1alpha1.VolumeGroupSnapshotContent{}) + Invokes(testing.NewRootDeleteActionWithOptions(volumegroupsnapshotcontentsResource, name, opts), &v1beta1.VolumeGroupSnapshotContent{}) return err } @@ -117,16 +117,16 @@ func (c *FakeVolumeGroupSnapshotContents) Delete(ctx context.Context, name strin func (c *FakeVolumeGroupSnapshotContents) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { action := testing.NewRootDeleteCollectionAction(volumegroupsnapshotcontentsResource, listOpts) - _, err := c.Fake.Invokes(action, &v1alpha1.VolumeGroupSnapshotContentList{}) + _, err := c.Fake.Invokes(action, &v1beta1.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 *v1alpha1.VolumeGroupSnapshotContent, err error) { +func (c *FakeVolumeGroupSnapshotContents) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.VolumeGroupSnapshotContent, err error) { obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(volumegroupsnapshotcontentsResource, name, pt, data, subresources...), &v1alpha1.VolumeGroupSnapshotContent{}) + Invokes(testing.NewRootPatchSubresourceAction(volumegroupsnapshotcontentsResource, name, pt, data, subresources...), &v1beta1.VolumeGroupSnapshotContent{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.VolumeGroupSnapshotContent), err + return obj.(*v1beta1.VolumeGroupSnapshotContent), err } diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/generated_expansion.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/generated_expansion.go similarity index 97% rename from vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/generated_expansion.go rename to vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/generated_expansion.go index 76c6ee96a..10f62712e 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/generated_expansion.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/generated_expansion.go @@ -16,7 +16,7 @@ limitations under the License. // Code generated by client-gen. DO NOT EDIT. -package v1alpha1 +package v1beta1 type VolumeGroupSnapshotExpansion interface{} diff --git a/client/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/volumegroupsnapshot.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/volumegroupsnapshot.go similarity index 77% rename from client/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/volumegroupsnapshot.go rename to vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/volumegroupsnapshot.go index 413d6bcac..8687a330f 100644 --- a/client/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/volumegroupsnapshot.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/volumegroupsnapshot.go @@ -16,13 +16,13 @@ limitations under the License. // Code generated by client-gen. DO NOT EDIT. -package v1alpha1 +package v1beta1 import ( "context" "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" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -38,15 +38,15 @@ type VolumeGroupSnapshotsGetter interface { // VolumeGroupSnapshotInterface has methods to work with VolumeGroupSnapshot resources. type VolumeGroupSnapshotInterface interface { - Create(ctx context.Context, volumeGroupSnapshot *v1alpha1.VolumeGroupSnapshot, opts v1.CreateOptions) (*v1alpha1.VolumeGroupSnapshot, error) - Update(ctx context.Context, volumeGroupSnapshot *v1alpha1.VolumeGroupSnapshot, opts v1.UpdateOptions) (*v1alpha1.VolumeGroupSnapshot, error) - UpdateStatus(ctx context.Context, volumeGroupSnapshot *v1alpha1.VolumeGroupSnapshot, opts v1.UpdateOptions) (*v1alpha1.VolumeGroupSnapshot, error) + Create(ctx context.Context, volumeGroupSnapshot *v1beta1.VolumeGroupSnapshot, opts v1.CreateOptions) (*v1beta1.VolumeGroupSnapshot, error) + Update(ctx context.Context, volumeGroupSnapshot *v1beta1.VolumeGroupSnapshot, opts v1.UpdateOptions) (*v1beta1.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 DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.VolumeGroupSnapshot, error) - List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.VolumeGroupSnapshotList, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.VolumeGroupSnapshot, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta1.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 *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 } @@ -57,7 +57,7 @@ type volumeGroupSnapshots struct { } // newVolumeGroupSnapshots returns a VolumeGroupSnapshots -func newVolumeGroupSnapshots(c *GroupsnapshotV1alpha1Client, namespace string) *volumeGroupSnapshots { +func newVolumeGroupSnapshots(c *GroupsnapshotV1beta1Client, namespace string) *volumeGroupSnapshots { return &volumeGroupSnapshots{ client: c.RESTClient(), 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. -func (c *volumeGroupSnapshots) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.VolumeGroupSnapshot, err error) { - result = &v1alpha1.VolumeGroupSnapshot{} +func (c *volumeGroupSnapshots) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.VolumeGroupSnapshot, err error) { + result = &v1beta1.VolumeGroupSnapshot{} err = c.client.Get(). Namespace(c.ns). 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. -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 if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second } - result = &v1alpha1.VolumeGroupSnapshotList{} + result = &v1beta1.VolumeGroupSnapshotList{} err = c.client.Get(). Namespace(c.ns). 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. -func (c *volumeGroupSnapshots) Create(ctx context.Context, volumeGroupSnapshot *v1alpha1.VolumeGroupSnapshot, opts v1.CreateOptions) (result *v1alpha1.VolumeGroupSnapshot, err error) { - result = &v1alpha1.VolumeGroupSnapshot{} +func (c *volumeGroupSnapshots) Create(ctx context.Context, volumeGroupSnapshot *v1beta1.VolumeGroupSnapshot, opts v1.CreateOptions) (result *v1beta1.VolumeGroupSnapshot, err error) { + result = &v1beta1.VolumeGroupSnapshot{} err = c.client.Post(). Namespace(c.ns). 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. -func (c *volumeGroupSnapshots) Update(ctx context.Context, volumeGroupSnapshot *v1alpha1.VolumeGroupSnapshot, opts v1.UpdateOptions) (result *v1alpha1.VolumeGroupSnapshot, err error) { - result = &v1alpha1.VolumeGroupSnapshot{} +func (c *volumeGroupSnapshots) Update(ctx context.Context, volumeGroupSnapshot *v1beta1.VolumeGroupSnapshot, opts v1.UpdateOptions) (result *v1beta1.VolumeGroupSnapshot, err error) { + result = &v1beta1.VolumeGroupSnapshot{} err = c.client.Put(). Namespace(c.ns). Resource("volumegroupsnapshots"). @@ -138,8 +138,8 @@ func (c *volumeGroupSnapshots) Update(ctx context.Context, volumeGroupSnapshot * // 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 *v1alpha1.VolumeGroupSnapshot, opts v1.UpdateOptions) (result *v1alpha1.VolumeGroupSnapshot, err error) { - result = &v1alpha1.VolumeGroupSnapshot{} +func (c *volumeGroupSnapshots) UpdateStatus(ctx context.Context, volumeGroupSnapshot *v1beta1.VolumeGroupSnapshot, opts v1.UpdateOptions) (result *v1beta1.VolumeGroupSnapshot, err error) { + result = &v1beta1.VolumeGroupSnapshot{} err = c.client.Put(). Namespace(c.ns). 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. -func (c *volumeGroupSnapshots) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.VolumeGroupSnapshot, err error) { - result = &v1alpha1.VolumeGroupSnapshot{} +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 = &v1beta1.VolumeGroupSnapshot{} err = c.client.Patch(pt). Namespace(c.ns). Resource("volumegroupsnapshots"). diff --git a/client/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/volumegroupsnapshot_client.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/volumegroupsnapshot_client.go similarity index 62% rename from client/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/volumegroupsnapshot_client.go rename to vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/volumegroupsnapshot_client.go index 14cf7707d..49ecc7cf5 100644 --- a/client/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/volumegroupsnapshot_client.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/volumegroupsnapshot_client.go @@ -16,44 +16,44 @@ limitations under the License. // Code generated by client-gen. DO NOT EDIT. -package v1alpha1 +package v1beta1 import ( "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" rest "k8s.io/client-go/rest" ) -type GroupsnapshotV1alpha1Interface interface { +type GroupsnapshotV1beta1Interface interface { RESTClient() rest.Interface VolumeGroupSnapshotsGetter VolumeGroupSnapshotClassesGetter VolumeGroupSnapshotContentsGetter } -// GroupsnapshotV1alpha1Client is used to interact with features provided by the groupsnapshot.storage.k8s.io group. -type GroupsnapshotV1alpha1Client struct { +// GroupsnapshotV1beta1Client is used to interact with features provided by the groupsnapshot.storage.k8s.io group. +type GroupsnapshotV1beta1Client struct { restClient rest.Interface } -func (c *GroupsnapshotV1alpha1Client) VolumeGroupSnapshots(namespace string) VolumeGroupSnapshotInterface { +func (c *GroupsnapshotV1beta1Client) VolumeGroupSnapshots(namespace string) VolumeGroupSnapshotInterface { return newVolumeGroupSnapshots(c, namespace) } -func (c *GroupsnapshotV1alpha1Client) VolumeGroupSnapshotClasses() VolumeGroupSnapshotClassInterface { +func (c *GroupsnapshotV1beta1Client) VolumeGroupSnapshotClasses() VolumeGroupSnapshotClassInterface { return newVolumeGroupSnapshotClasses(c) } -func (c *GroupsnapshotV1alpha1Client) VolumeGroupSnapshotContents() VolumeGroupSnapshotContentInterface { +func (c *GroupsnapshotV1beta1Client) VolumeGroupSnapshotContents() VolumeGroupSnapshotContentInterface { 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), // where httpClient was generated with rest.HTTPClientFor(c). -func NewForConfig(c *rest.Config) (*GroupsnapshotV1alpha1Client, error) { +func NewForConfig(c *rest.Config) (*GroupsnapshotV1beta1Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err @@ -65,9 +65,9 @@ func NewForConfig(c *rest.Config) (*GroupsnapshotV1alpha1Client, error) { 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. -func NewForConfigAndClient(c *rest.Config, h *http.Client) (*GroupsnapshotV1alpha1Client, error) { +func NewForConfigAndClient(c *rest.Config, h *http.Client) (*GroupsnapshotV1beta1Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err @@ -76,12 +76,12 @@ func NewForConfigAndClient(c *rest.Config, h *http.Client) (*GroupsnapshotV1alph if err != nil { 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. -func NewForConfigOrDie(c *rest.Config) *GroupsnapshotV1alpha1Client { +func NewForConfigOrDie(c *rest.Config) *GroupsnapshotV1beta1Client { client, err := NewForConfig(c) if err != nil { panic(err) @@ -89,13 +89,13 @@ func NewForConfigOrDie(c *rest.Config) *GroupsnapshotV1alpha1Client { return client } -// New creates a new GroupsnapshotV1alpha1Client for the given RESTClient. -func New(c rest.Interface) *GroupsnapshotV1alpha1Client { - return &GroupsnapshotV1alpha1Client{c} +// New creates a new GroupsnapshotV1beta1Client for the given RESTClient. +func New(c rest.Interface) *GroupsnapshotV1beta1Client { + return &GroupsnapshotV1beta1Client{c} } func setConfigDefaults(config *rest.Config) error { - gv := v1alpha1.SchemeGroupVersion + gv := v1beta1.SchemeGroupVersion config.GroupVersion = &gv config.APIPath = "/apis" config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() @@ -109,7 +109,7 @@ func setConfigDefaults(config *rest.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *GroupsnapshotV1alpha1Client) RESTClient() rest.Interface { +func (c *GroupsnapshotV1beta1Client) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/volumegroupsnapshotclass.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/volumegroupsnapshotclass.go similarity index 77% rename from vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/volumegroupsnapshotclass.go rename to vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/volumegroupsnapshotclass.go index 7abdf2c6b..642cedd70 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/volumegroupsnapshotclass.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/volumegroupsnapshotclass.go @@ -16,13 +16,13 @@ limitations under the License. // Code generated by client-gen. DO NOT EDIT. -package v1alpha1 +package v1beta1 import ( "context" "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" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -38,14 +38,14 @@ type VolumeGroupSnapshotClassesGetter interface { // VolumeGroupSnapshotClassInterface has methods to work with VolumeGroupSnapshotClass resources. type VolumeGroupSnapshotClassInterface interface { - Create(ctx context.Context, volumeGroupSnapshotClass *v1alpha1.VolumeGroupSnapshotClass, opts v1.CreateOptions) (*v1alpha1.VolumeGroupSnapshotClass, error) - Update(ctx context.Context, volumeGroupSnapshotClass *v1alpha1.VolumeGroupSnapshotClass, opts v1.UpdateOptions) (*v1alpha1.VolumeGroupSnapshotClass, error) + Create(ctx context.Context, volumeGroupSnapshotClass *v1beta1.VolumeGroupSnapshotClass, opts v1.CreateOptions) (*v1beta1.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 DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.VolumeGroupSnapshotClass, error) - List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.VolumeGroupSnapshotClassList, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.VolumeGroupSnapshotClass, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta1.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 *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 } @@ -55,15 +55,15 @@ type volumeGroupSnapshotClasses struct { } // newVolumeGroupSnapshotClasses returns a VolumeGroupSnapshotClasses -func newVolumeGroupSnapshotClasses(c *GroupsnapshotV1alpha1Client) *volumeGroupSnapshotClasses { +func newVolumeGroupSnapshotClasses(c *GroupsnapshotV1beta1Client) *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 *v1alpha1.VolumeGroupSnapshotClass, err error) { - result = &v1alpha1.VolumeGroupSnapshotClass{} +func (c *volumeGroupSnapshotClasses) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.VolumeGroupSnapshotClass, err error) { + result = &v1beta1.VolumeGroupSnapshotClass{} err = c.client.Get(). Resource("volumegroupsnapshotclasses"). 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. -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 if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second } - result = &v1alpha1.VolumeGroupSnapshotClassList{} + result = &v1beta1.VolumeGroupSnapshotClassList{} err = c.client.Get(). Resource("volumegroupsnapshotclasses"). 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. -func (c *volumeGroupSnapshotClasses) Create(ctx context.Context, volumeGroupSnapshotClass *v1alpha1.VolumeGroupSnapshotClass, opts v1.CreateOptions) (result *v1alpha1.VolumeGroupSnapshotClass, err error) { - result = &v1alpha1.VolumeGroupSnapshotClass{} +func (c *volumeGroupSnapshotClasses) Create(ctx context.Context, volumeGroupSnapshotClass *v1beta1.VolumeGroupSnapshotClass, opts v1.CreateOptions) (result *v1beta1.VolumeGroupSnapshotClass, err error) { + result = &v1beta1.VolumeGroupSnapshotClass{} err = c.client.Post(). Resource("volumegroupsnapshotclasses"). 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. -func (c *volumeGroupSnapshotClasses) Update(ctx context.Context, volumeGroupSnapshotClass *v1alpha1.VolumeGroupSnapshotClass, opts v1.UpdateOptions) (result *v1alpha1.VolumeGroupSnapshotClass, err error) { - result = &v1alpha1.VolumeGroupSnapshotClass{} +func (c *volumeGroupSnapshotClasses) Update(ctx context.Context, volumeGroupSnapshotClass *v1beta1.VolumeGroupSnapshotClass, opts v1.UpdateOptions) (result *v1beta1.VolumeGroupSnapshotClass, err error) { + result = &v1beta1.VolumeGroupSnapshotClass{} err = c.client.Put(). Resource("volumegroupsnapshotclasses"). Name(volumeGroupSnapshotClass.Name). @@ -154,8 +154,8 @@ func (c *volumeGroupSnapshotClasses) DeleteCollection(ctx context.Context, opts } // 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) { - result = &v1alpha1.VolumeGroupSnapshotClass{} +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 = &v1beta1.VolumeGroupSnapshotClass{} err = c.client.Patch(pt). Resource("volumegroupsnapshotclasses"). Name(name). diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/volumegroupsnapshotcontent.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/volumegroupsnapshotcontent.go similarity index 76% rename from vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/volumegroupsnapshotcontent.go rename to vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/volumegroupsnapshotcontent.go index e27f3d092..eafada589 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/volumegroupsnapshotcontent.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/volumegroupsnapshotcontent.go @@ -16,13 +16,13 @@ limitations under the License. // Code generated by client-gen. DO NOT EDIT. -package v1alpha1 +package v1beta1 import ( "context" "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" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -38,15 +38,15 @@ type VolumeGroupSnapshotContentsGetter interface { // VolumeGroupSnapshotContentInterface has methods to work with VolumeGroupSnapshotContent resources. type VolumeGroupSnapshotContentInterface interface { - Create(ctx context.Context, volumeGroupSnapshotContent *v1alpha1.VolumeGroupSnapshotContent, opts v1.CreateOptions) (*v1alpha1.VolumeGroupSnapshotContent, error) - Update(ctx context.Context, volumeGroupSnapshotContent *v1alpha1.VolumeGroupSnapshotContent, opts v1.UpdateOptions) (*v1alpha1.VolumeGroupSnapshotContent, error) - UpdateStatus(ctx context.Context, volumeGroupSnapshotContent *v1alpha1.VolumeGroupSnapshotContent, opts v1.UpdateOptions) (*v1alpha1.VolumeGroupSnapshotContent, error) + Create(ctx context.Context, volumeGroupSnapshotContent *v1beta1.VolumeGroupSnapshotContent, opts v1.CreateOptions) (*v1beta1.VolumeGroupSnapshotContent, error) + Update(ctx context.Context, volumeGroupSnapshotContent *v1beta1.VolumeGroupSnapshotContent, opts v1.UpdateOptions) (*v1beta1.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 DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.VolumeGroupSnapshotContent, error) - List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.VolumeGroupSnapshotContentList, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.VolumeGroupSnapshotContent, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta1.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 *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 } @@ -56,15 +56,15 @@ type volumeGroupSnapshotContents struct { } // newVolumeGroupSnapshotContents returns a VolumeGroupSnapshotContents -func newVolumeGroupSnapshotContents(c *GroupsnapshotV1alpha1Client) *volumeGroupSnapshotContents { +func newVolumeGroupSnapshotContents(c *GroupsnapshotV1beta1Client) *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 *v1alpha1.VolumeGroupSnapshotContent, err error) { - result = &v1alpha1.VolumeGroupSnapshotContent{} +func (c *volumeGroupSnapshotContents) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.VolumeGroupSnapshotContent, err error) { + result = &v1beta1.VolumeGroupSnapshotContent{} err = c.client.Get(). Resource("volumegroupsnapshotcontents"). 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. -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 if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second } - result = &v1alpha1.VolumeGroupSnapshotContentList{} + result = &v1beta1.VolumeGroupSnapshotContentList{} err = c.client.Get(). Resource("volumegroupsnapshotcontents"). 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. -func (c *volumeGroupSnapshotContents) Create(ctx context.Context, volumeGroupSnapshotContent *v1alpha1.VolumeGroupSnapshotContent, opts v1.CreateOptions) (result *v1alpha1.VolumeGroupSnapshotContent, err error) { - result = &v1alpha1.VolumeGroupSnapshotContent{} +func (c *volumeGroupSnapshotContents) Create(ctx context.Context, volumeGroupSnapshotContent *v1beta1.VolumeGroupSnapshotContent, opts v1.CreateOptions) (result *v1beta1.VolumeGroupSnapshotContent, err error) { + result = &v1beta1.VolumeGroupSnapshotContent{} err = c.client.Post(). Resource("volumegroupsnapshotcontents"). 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. -func (c *volumeGroupSnapshotContents) Update(ctx context.Context, volumeGroupSnapshotContent *v1alpha1.VolumeGroupSnapshotContent, opts v1.UpdateOptions) (result *v1alpha1.VolumeGroupSnapshotContent, err error) { - result = &v1alpha1.VolumeGroupSnapshotContent{} +func (c *volumeGroupSnapshotContents) Update(ctx context.Context, volumeGroupSnapshotContent *v1beta1.VolumeGroupSnapshotContent, opts v1.UpdateOptions) (result *v1beta1.VolumeGroupSnapshotContent, err error) { + result = &v1beta1.VolumeGroupSnapshotContent{} err = c.client.Put(). Resource("volumegroupsnapshotcontents"). 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. // 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) { - result = &v1alpha1.VolumeGroupSnapshotContent{} +func (c *volumeGroupSnapshotContents) UpdateStatus(ctx context.Context, volumeGroupSnapshotContent *v1beta1.VolumeGroupSnapshotContent, opts v1.UpdateOptions) (result *v1beta1.VolumeGroupSnapshotContent, err error) { + result = &v1beta1.VolumeGroupSnapshotContent{} err = c.client.Put(). Resource("volumegroupsnapshotcontents"). Name(volumeGroupSnapshotContent.Name). @@ -170,8 +170,8 @@ func (c *volumeGroupSnapshotContents) DeleteCollection(ctx context.Context, opts } // 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) { - result = &v1alpha1.VolumeGroupSnapshotContent{} +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 = &v1beta1.VolumeGroupSnapshotContent{} err = c.client.Patch(pt). Resource("volumegroupsnapshotcontents"). Name(name). 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 c29dc0574..3f4fb8ee5 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 @@ -21,7 +21,7 @@ package externalversions import ( "fmt" - v1alpha1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1alpha1" + v1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta1" 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" @@ -53,13 +53,13 @@ func (f *genericInformer) Lister() cache.GenericLister { // TODO extend this to unknown resources with a client pool func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource) (GenericInformer, error) { switch resource { - // Group=groupsnapshot.storage.k8s.io, Version=v1alpha1 - case v1alpha1.SchemeGroupVersion.WithResource("volumegroupsnapshots"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Groupsnapshot().V1alpha1().VolumeGroupSnapshots().Informer()}, nil - case v1alpha1.SchemeGroupVersion.WithResource("volumegroupsnapshotclasses"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Groupsnapshot().V1alpha1().VolumeGroupSnapshotClasses().Informer()}, nil - case v1alpha1.SchemeGroupVersion.WithResource("volumegroupsnapshotcontents"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Groupsnapshot().V1alpha1().VolumeGroupSnapshotContents().Informer()}, nil + // Group=groupsnapshot.storage.k8s.io, Version=v1beta1 + case v1beta1.SchemeGroupVersion.WithResource("volumegroupsnapshots"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Groupsnapshot().V1beta1().VolumeGroupSnapshots().Informer()}, nil + case v1beta1.SchemeGroupVersion.WithResource("volumegroupsnapshotclasses"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Groupsnapshot().V1beta1().VolumeGroupSnapshotClasses().Informer()}, nil + case v1beta1.SchemeGroupVersion.WithResource("volumegroupsnapshotcontents"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Groupsnapshot().V1beta1().VolumeGroupSnapshotContents().Informer()}, nil // Group=snapshot.storage.k8s.io, Version=v1 case v1.SchemeGroupVersion.WithResource("volumesnapshots"): 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 f3843d5d0..e75bc2edf 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 @@ -20,13 +20,13 @@ package volumegroupsnapshot import ( internalinterfaces "github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/internalinterfaces" - v1alpha1 "github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumegroupsnapshot/v1alpha1" + v1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumegroupsnapshot/v1beta1" ) // Interface provides access to each of this group's versions. type Interface interface { - // V1alpha1 provides access to shared informers for resources in V1alpha1. - V1alpha1() v1alpha1.Interface + // V1beta1 provides access to shared informers for resources in V1beta1. + V1beta1() v1beta1.Interface } type group struct { @@ -40,7 +40,7 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} } -// V1alpha1 returns a new v1alpha1.Interface. -func (g *group) V1alpha1() v1alpha1.Interface { - return v1alpha1.New(g.factory, g.namespace, g.tweakListOptions) +// V1beta1 returns a new v1beta1.Interface. +func (g *group) V1beta1() v1beta1.Interface { + return v1beta1.New(g.factory, g.namespace, g.tweakListOptions) } diff --git a/client/informers/externalversions/volumegroupsnapshot/v1alpha1/interface.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumegroupsnapshot/v1beta1/interface.go similarity index 99% rename from client/informers/externalversions/volumegroupsnapshot/v1alpha1/interface.go rename to vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumegroupsnapshot/v1beta1/interface.go index 500e17ba3..3bcbe139f 100644 --- a/client/informers/externalversions/volumegroupsnapshot/v1alpha1/interface.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumegroupsnapshot/v1beta1/interface.go @@ -16,7 +16,7 @@ limitations under the License. // Code generated by informer-gen. DO NOT EDIT. -package v1alpha1 +package v1beta1 import ( internalinterfaces "github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/internalinterfaces" diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumegroupsnapshot/v1alpha1/volumegroupsnapshot.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumegroupsnapshot/v1beta1/volumegroupsnapshot.go similarity index 79% rename from vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumegroupsnapshot/v1alpha1/volumegroupsnapshot.go rename to vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumegroupsnapshot/v1beta1/volumegroupsnapshot.go index 765d0c71d..25343f6c1 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumegroupsnapshot/v1alpha1/volumegroupsnapshot.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumegroupsnapshot/v1beta1/volumegroupsnapshot.go @@ -16,16 +16,16 @@ limitations under the License. // Code generated by informer-gen. DO NOT EDIT. -package v1alpha1 +package v1beta1 import ( "context" time "time" - volumegroupsnapshotv1alpha1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1alpha1" + volumegroupsnapshotv1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta1" versioned "github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned" internalinterfaces "github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/internalinterfaces" - v1alpha1 "github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1alpha1" + v1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -36,7 +36,7 @@ import ( // VolumeGroupSnapshots. type VolumeGroupSnapshotInformer interface { Informer() cache.SharedIndexInformer - Lister() v1alpha1.VolumeGroupSnapshotLister + Lister() v1beta1.VolumeGroupSnapshotLister } type volumeGroupSnapshotInformer struct { @@ -62,16 +62,16 @@ func NewFilteredVolumeGroupSnapshotInformer(client versioned.Interface, namespac if tweakListOptions != nil { tweakListOptions(&options) } - return client.GroupsnapshotV1alpha1().VolumeGroupSnapshots(namespace).List(context.TODO(), options) + return client.GroupsnapshotV1beta1().VolumeGroupSnapshots(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.GroupsnapshotV1alpha1().VolumeGroupSnapshots(namespace).Watch(context.TODO(), options) + return client.GroupsnapshotV1beta1().VolumeGroupSnapshots(namespace).Watch(context.TODO(), options) }, }, - &volumegroupsnapshotv1alpha1.VolumeGroupSnapshot{}, + &volumegroupsnapshotv1beta1.VolumeGroupSnapshot{}, resyncPeriod, indexers, ) @@ -82,9 +82,9 @@ func (f *volumeGroupSnapshotInformer) defaultInformer(client versioned.Interface } func (f *volumeGroupSnapshotInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&volumegroupsnapshotv1alpha1.VolumeGroupSnapshot{}, f.defaultInformer) + return f.factory.InformerFor(&volumegroupsnapshotv1beta1.VolumeGroupSnapshot{}, f.defaultInformer) } -func (f *volumeGroupSnapshotInformer) Lister() v1alpha1.VolumeGroupSnapshotLister { - return v1alpha1.NewVolumeGroupSnapshotLister(f.Informer().GetIndexer()) +func (f *volumeGroupSnapshotInformer) Lister() v1beta1.VolumeGroupSnapshotLister { + return v1beta1.NewVolumeGroupSnapshotLister(f.Informer().GetIndexer()) } diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumegroupsnapshot/v1alpha1/volumegroupsnapshotclass.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumegroupsnapshot/v1beta1/volumegroupsnapshotclass.go similarity index 79% rename from vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumegroupsnapshot/v1alpha1/volumegroupsnapshotclass.go rename to vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumegroupsnapshot/v1beta1/volumegroupsnapshotclass.go index 2491efe71..c3fa376ec 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumegroupsnapshot/v1alpha1/volumegroupsnapshotclass.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumegroupsnapshot/v1beta1/volumegroupsnapshotclass.go @@ -16,16 +16,16 @@ limitations under the License. // Code generated by informer-gen. DO NOT EDIT. -package v1alpha1 +package v1beta1 import ( "context" time "time" - volumegroupsnapshotv1alpha1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1alpha1" + volumegroupsnapshotv1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta1" versioned "github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned" internalinterfaces "github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/internalinterfaces" - v1alpha1 "github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1alpha1" + v1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -36,7 +36,7 @@ import ( // VolumeGroupSnapshotClasses. type VolumeGroupSnapshotClassInformer interface { Informer() cache.SharedIndexInformer - Lister() v1alpha1.VolumeGroupSnapshotClassLister + Lister() v1beta1.VolumeGroupSnapshotClassLister } type volumeGroupSnapshotClassInformer struct { @@ -61,16 +61,16 @@ func NewFilteredVolumeGroupSnapshotClassInformer(client versioned.Interface, res if tweakListOptions != nil { tweakListOptions(&options) } - return client.GroupsnapshotV1alpha1().VolumeGroupSnapshotClasses().List(context.TODO(), options) + return client.GroupsnapshotV1beta1().VolumeGroupSnapshotClasses().List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.GroupsnapshotV1alpha1().VolumeGroupSnapshotClasses().Watch(context.TODO(), options) + return client.GroupsnapshotV1beta1().VolumeGroupSnapshotClasses().Watch(context.TODO(), options) }, }, - &volumegroupsnapshotv1alpha1.VolumeGroupSnapshotClass{}, + &volumegroupsnapshotv1beta1.VolumeGroupSnapshotClass{}, resyncPeriod, indexers, ) @@ -81,9 +81,9 @@ func (f *volumeGroupSnapshotClassInformer) defaultInformer(client versioned.Inte } func (f *volumeGroupSnapshotClassInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&volumegroupsnapshotv1alpha1.VolumeGroupSnapshotClass{}, f.defaultInformer) + return f.factory.InformerFor(&volumegroupsnapshotv1beta1.VolumeGroupSnapshotClass{}, f.defaultInformer) } -func (f *volumeGroupSnapshotClassInformer) Lister() v1alpha1.VolumeGroupSnapshotClassLister { - return v1alpha1.NewVolumeGroupSnapshotClassLister(f.Informer().GetIndexer()) +func (f *volumeGroupSnapshotClassInformer) Lister() v1beta1.VolumeGroupSnapshotClassLister { + return v1beta1.NewVolumeGroupSnapshotClassLister(f.Informer().GetIndexer()) } diff --git a/client/informers/externalversions/volumegroupsnapshot/v1alpha1/volumegroupsnapshotcontent.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumegroupsnapshot/v1beta1/volumegroupsnapshotcontent.go similarity index 79% rename from client/informers/externalversions/volumegroupsnapshot/v1alpha1/volumegroupsnapshotcontent.go rename to vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumegroupsnapshot/v1beta1/volumegroupsnapshotcontent.go index 256b59d4d..8d15f85cc 100644 --- a/client/informers/externalversions/volumegroupsnapshot/v1alpha1/volumegroupsnapshotcontent.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumegroupsnapshot/v1beta1/volumegroupsnapshotcontent.go @@ -16,16 +16,16 @@ limitations under the License. // Code generated by informer-gen. DO NOT EDIT. -package v1alpha1 +package v1beta1 import ( "context" time "time" - volumegroupsnapshotv1alpha1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1alpha1" + volumegroupsnapshotv1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta1" versioned "github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned" internalinterfaces "github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/internalinterfaces" - v1alpha1 "github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1alpha1" + v1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -36,7 +36,7 @@ import ( // VolumeGroupSnapshotContents. type VolumeGroupSnapshotContentInformer interface { Informer() cache.SharedIndexInformer - Lister() v1alpha1.VolumeGroupSnapshotContentLister + Lister() v1beta1.VolumeGroupSnapshotContentLister } type volumeGroupSnapshotContentInformer struct { @@ -61,16 +61,16 @@ func NewFilteredVolumeGroupSnapshotContentInformer(client versioned.Interface, r if tweakListOptions != nil { tweakListOptions(&options) } - return client.GroupsnapshotV1alpha1().VolumeGroupSnapshotContents().List(context.TODO(), options) + return client.GroupsnapshotV1beta1().VolumeGroupSnapshotContents().List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.GroupsnapshotV1alpha1().VolumeGroupSnapshotContents().Watch(context.TODO(), options) + return client.GroupsnapshotV1beta1().VolumeGroupSnapshotContents().Watch(context.TODO(), options) }, }, - &volumegroupsnapshotv1alpha1.VolumeGroupSnapshotContent{}, + &volumegroupsnapshotv1beta1.VolumeGroupSnapshotContent{}, resyncPeriod, indexers, ) @@ -81,9 +81,9 @@ func (f *volumeGroupSnapshotContentInformer) defaultInformer(client versioned.In } func (f *volumeGroupSnapshotContentInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&volumegroupsnapshotv1alpha1.VolumeGroupSnapshotContent{}, f.defaultInformer) + return f.factory.InformerFor(&volumegroupsnapshotv1beta1.VolumeGroupSnapshotContent{}, f.defaultInformer) } -func (f *volumeGroupSnapshotContentInformer) Lister() v1alpha1.VolumeGroupSnapshotContentLister { - return v1alpha1.NewVolumeGroupSnapshotContentLister(f.Informer().GetIndexer()) +func (f *volumeGroupSnapshotContentInformer) Lister() v1beta1.VolumeGroupSnapshotContentLister { + return v1beta1.NewVolumeGroupSnapshotContentLister(f.Informer().GetIndexer()) } diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1alpha1/expansion_generated.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1beta1/expansion_generated.go similarity index 98% rename from vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1alpha1/expansion_generated.go rename to vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1beta1/expansion_generated.go index 9884212d1..1b4044bbd 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1alpha1/expansion_generated.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1beta1/expansion_generated.go @@ -16,7 +16,7 @@ limitations under the License. // Code generated by lister-gen. DO NOT EDIT. -package v1alpha1 +package v1beta1 // VolumeGroupSnapshotListerExpansion allows custom methods to be added to // VolumeGroupSnapshotLister. diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1alpha1/volumegroupsnapshot.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1beta1/volumegroupsnapshot.go similarity index 81% rename from vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1alpha1/volumegroupsnapshot.go rename to vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1beta1/volumegroupsnapshot.go index 1f9cbc5b8..f2edc34a7 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1alpha1/volumegroupsnapshot.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1beta1/volumegroupsnapshot.go @@ -16,10 +16,10 @@ limitations under the License. // Code generated by lister-gen. DO NOT EDIT. -package v1alpha1 +package v1beta1 import ( - v1alpha1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1alpha1" + v1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache" @@ -30,7 +30,7 @@ import ( type VolumeGroupSnapshotLister interface { // List lists all VolumeGroupSnapshots in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1alpha1.VolumeGroupSnapshot, err error) + List(selector labels.Selector) (ret []*v1beta1.VolumeGroupSnapshot, err error) // VolumeGroupSnapshots returns an object that can list and get VolumeGroupSnapshots. VolumeGroupSnapshots(namespace string) VolumeGroupSnapshotNamespaceLister VolumeGroupSnapshotListerExpansion @@ -47,9 +47,9 @@ func NewVolumeGroupSnapshotLister(indexer cache.Indexer) VolumeGroupSnapshotList } // List lists all VolumeGroupSnapshots in the indexer. -func (s *volumeGroupSnapshotLister) List(selector labels.Selector) (ret []*v1alpha1.VolumeGroupSnapshot, err error) { +func (s *volumeGroupSnapshotLister) List(selector labels.Selector) (ret []*v1beta1.VolumeGroupSnapshot, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1alpha1.VolumeGroupSnapshot)) + ret = append(ret, m.(*v1beta1.VolumeGroupSnapshot)) }) return ret, err } @@ -64,10 +64,10 @@ func (s *volumeGroupSnapshotLister) VolumeGroupSnapshots(namespace string) Volum 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 []*v1alpha1.VolumeGroupSnapshot, err error) + List(selector labels.Selector) (ret []*v1beta1.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) (*v1alpha1.VolumeGroupSnapshot, error) + Get(name string) (*v1beta1.VolumeGroupSnapshot, error) VolumeGroupSnapshotNamespaceListerExpansion } @@ -79,21 +79,21 @@ type volumeGroupSnapshotNamespaceLister struct { } // List lists all VolumeGroupSnapshots in the indexer for a given namespace. -func (s volumeGroupSnapshotNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.VolumeGroupSnapshot, err error) { +func (s volumeGroupSnapshotNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.VolumeGroupSnapshot, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*v1alpha1.VolumeGroupSnapshot)) + ret = append(ret, m.(*v1beta1.VolumeGroupSnapshot)) }) return ret, err } // Get retrieves the VolumeGroupSnapshot from the indexer for a given namespace and name. -func (s volumeGroupSnapshotNamespaceLister) Get(name string) (*v1alpha1.VolumeGroupSnapshot, error) { +func (s volumeGroupSnapshotNamespaceLister) Get(name string) (*v1beta1.VolumeGroupSnapshot, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err } if !exists { - return nil, errors.NewNotFound(v1alpha1.Resource("volumegroupsnapshot"), name) + return nil, errors.NewNotFound(v1beta1.Resource("volumegroupsnapshot"), name) } - return obj.(*v1alpha1.VolumeGroupSnapshot), nil + return obj.(*v1beta1.VolumeGroupSnapshot), nil } diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1alpha1/volumegroupsnapshotclass.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1beta1/volumegroupsnapshotclass.go similarity index 75% rename from vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1alpha1/volumegroupsnapshotclass.go rename to vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1beta1/volumegroupsnapshotclass.go index 3ad700f18..351e37e91 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1alpha1/volumegroupsnapshotclass.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1beta1/volumegroupsnapshotclass.go @@ -16,10 +16,10 @@ limitations under the License. // Code generated by lister-gen. DO NOT EDIT. -package v1alpha1 +package v1beta1 import ( - v1alpha1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1alpha1" + v1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache" @@ -30,10 +30,10 @@ import ( type VolumeGroupSnapshotClassLister interface { // List lists all VolumeGroupSnapshotClasses in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1alpha1.VolumeGroupSnapshotClass, err error) + List(selector labels.Selector) (ret []*v1beta1.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) (*v1alpha1.VolumeGroupSnapshotClass, error) + Get(name string) (*v1beta1.VolumeGroupSnapshotClass, error) VolumeGroupSnapshotClassListerExpansion } @@ -48,21 +48,21 @@ func NewVolumeGroupSnapshotClassLister(indexer cache.Indexer) VolumeGroupSnapsho } // List lists all VolumeGroupSnapshotClasses in the indexer. -func (s *volumeGroupSnapshotClassLister) List(selector labels.Selector) (ret []*v1alpha1.VolumeGroupSnapshotClass, err error) { +func (s *volumeGroupSnapshotClassLister) List(selector labels.Selector) (ret []*v1beta1.VolumeGroupSnapshotClass, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1alpha1.VolumeGroupSnapshotClass)) + ret = append(ret, m.(*v1beta1.VolumeGroupSnapshotClass)) }) return ret, err } // Get retrieves the VolumeGroupSnapshotClass from the index for a given name. -func (s *volumeGroupSnapshotClassLister) Get(name string) (*v1alpha1.VolumeGroupSnapshotClass, error) { +func (s *volumeGroupSnapshotClassLister) Get(name string) (*v1beta1.VolumeGroupSnapshotClass, error) { obj, exists, err := s.indexer.GetByKey(name) if err != nil { return nil, err } if !exists { - return nil, errors.NewNotFound(v1alpha1.Resource("volumegroupsnapshotclass"), name) + return nil, errors.NewNotFound(v1beta1.Resource("volumegroupsnapshotclass"), name) } - return obj.(*v1alpha1.VolumeGroupSnapshotClass), nil + return obj.(*v1beta1.VolumeGroupSnapshotClass), nil } diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1alpha1/volumegroupsnapshotcontent.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1beta1/volumegroupsnapshotcontent.go similarity index 78% rename from vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1alpha1/volumegroupsnapshotcontent.go rename to vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1beta1/volumegroupsnapshotcontent.go index 162a2163b..576302795 100644 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1alpha1/volumegroupsnapshotcontent.go +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1beta1/volumegroupsnapshotcontent.go @@ -16,10 +16,10 @@ limitations under the License. // Code generated by lister-gen. DO NOT EDIT. -package v1alpha1 +package v1beta1 import ( - v1alpha1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1alpha1" + v1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache" @@ -30,10 +30,10 @@ import ( type VolumeGroupSnapshotContentLister interface { // List lists all VolumeGroupSnapshotContents in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1alpha1.VolumeGroupSnapshotContent, err error) + List(selector labels.Selector) (ret []*v1beta1.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) (*v1alpha1.VolumeGroupSnapshotContent, error) + Get(name string) (*v1beta1.VolumeGroupSnapshotContent, error) VolumeGroupSnapshotContentListerExpansion } @@ -48,21 +48,21 @@ func NewVolumeGroupSnapshotContentLister(indexer cache.Indexer) VolumeGroupSnaps } // List lists all VolumeGroupSnapshotContents in the indexer. -func (s *volumeGroupSnapshotContentLister) List(selector labels.Selector) (ret []*v1alpha1.VolumeGroupSnapshotContent, err error) { +func (s *volumeGroupSnapshotContentLister) List(selector labels.Selector) (ret []*v1beta1.VolumeGroupSnapshotContent, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1alpha1.VolumeGroupSnapshotContent)) + ret = append(ret, m.(*v1beta1.VolumeGroupSnapshotContent)) }) return ret, err } // Get retrieves the VolumeGroupSnapshotContent from the index for a given name. -func (s *volumeGroupSnapshotContentLister) Get(name string) (*v1alpha1.VolumeGroupSnapshotContent, error) { +func (s *volumeGroupSnapshotContentLister) Get(name string) (*v1beta1.VolumeGroupSnapshotContent, error) { obj, exists, err := s.indexer.GetByKey(name) if err != nil { return nil, err } if !exists { - return nil, errors.NewNotFound(v1alpha1.Resource("volumegroupsnapshotcontent"), name) + return nil, errors.NewNotFound(v1beta1.Resource("volumegroupsnapshotcontent"), name) } - return obj.(*v1alpha1.VolumeGroupSnapshotContent), nil + return obj.(*v1beta1.VolumeGroupSnapshotContent), nil } diff --git a/vendor/modules.txt b/vendor/modules.txt index aed2a1603..ad506f719 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -119,22 +119,22 @@ github.com/kubernetes-csi/csi-test/v5/driver github.com/kubernetes-csi/csi-test/v5/utils # github.com/kubernetes-csi/external-snapshotter/client/v8 v8.0.0 => ./client ## 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/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/v1alpha1 -github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/fake +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/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/v1alpha1 +github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/volumegroupsnapshot/v1beta1 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/v1alpha1 +github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumegroupsnapshot/v1beta1 github.com/kubernetes-csi/external-snapshotter/client/v8/listers/volumesnapshot/v1 # github.com/mailru/easyjson v0.7.7 ## explicit; go 1.12