diff --git a/cmd/csi-snapshotter/create_crd.go b/cmd/csi-snapshotter/create_crd.go index 0460f691f..36fb8ae8d 100644 --- a/cmd/csi-snapshotter/create_crd.go +++ b/cmd/csi-snapshotter/create_crd.go @@ -16,7 +16,7 @@ package main import ( "reflect" - crdv1 "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1alpha1" + crdv1 "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1beta1" apiextensionsv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" apiextensionsclient "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset" apierrors "k8s.io/apimachinery/pkg/api/errors" diff --git a/cmd/csi-snapshotter/main.go b/cmd/csi-snapshotter/main.go index 048ebcaf9..eae2782fc 100644 --- a/cmd/csi-snapshotter/main.go +++ b/cmd/csi-snapshotter/main.go @@ -184,9 +184,9 @@ func main() { snapClient, kubeClient, *snapshotterName, - factory.Snapshot().V1alpha1().VolumeSnapshots(), - factory.Snapshot().V1alpha1().VolumeSnapshotContents(), - factory.Snapshot().V1alpha1().VolumeSnapshotClasses(), + factory.Snapshot().V1beta1().VolumeSnapshots(), + factory.Snapshot().V1beta1().VolumeSnapshotContents(), + factory.Snapshot().V1beta1().VolumeSnapshotClasses(), coreFactory.Core().V1().PersistentVolumeClaims(), *createSnapshotContentRetryCount, *createSnapshotContentInterval, diff --git a/hack/update-generated-code.sh b/hack/update-generated-code.sh index f48150d77..d682028f2 100755 --- a/hack/update-generated-code.sh +++ b/hack/update-generated-code.sh @@ -29,7 +29,7 @@ CODEGEN_PKG=${CODEGEN_PKG:-$(cd ${SCRIPT_ROOT}; ls -d -1 ./vendor/k8s.io/code-ge # instead of the $GOPATH directly. For normal projects this can be dropped. ${CODEGEN_PKG}/generate-groups.sh "deepcopy,client,informer,lister" \ github.com/kubernetes-csi/external-snapshotter/pkg/client github.com/kubernetes-csi/external-snapshotter/pkg/apis \ - volumesnapshot:v1alpha1 \ + volumesnapshot:v1beta1 \ --go-header-file ${SCRIPT_ROOT}/hack/boilerplate.go.txt # To use your own boilerplate text use: diff --git a/pkg/apis/volumesnapshot/v1alpha1/doc.go b/pkg/apis/volumesnapshot/v1beta1/doc.go similarity index 97% rename from pkg/apis/volumesnapshot/v1alpha1/doc.go rename to pkg/apis/volumesnapshot/v1beta1/doc.go index 90642a58b..d8a1f5dad 100644 --- a/pkg/apis/volumesnapshot/v1alpha1/doc.go +++ b/pkg/apis/volumesnapshot/v1beta1/doc.go @@ -17,4 +17,4 @@ limitations under the License. // +k8s:deepcopy-gen=package // +groupName=snapshot.storage.k8s.io -package v1alpha1 +package v1beta1 diff --git a/pkg/apis/volumesnapshot/v1alpha1/register.go b/pkg/apis/volumesnapshot/v1beta1/register.go similarity index 98% rename from pkg/apis/volumesnapshot/v1alpha1/register.go rename to pkg/apis/volumesnapshot/v1beta1/register.go index e7c38b6ba..91f451424 100644 --- a/pkg/apis/volumesnapshot/v1alpha1/register.go +++ b/pkg/apis/volumesnapshot/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"} ) // Resource takes an unqualified resource and returns a Group-qualified GroupResource. diff --git a/pkg/apis/volumesnapshot/v1alpha1/types.go b/pkg/apis/volumesnapshot/v1beta1/types.go similarity index 99% rename from pkg/apis/volumesnapshot/v1alpha1/types.go rename to pkg/apis/volumesnapshot/v1beta1/types.go index 65c1aafaa..2fb0b8e75 100644 --- a/pkg/apis/volumesnapshot/v1alpha1/types.go +++ b/pkg/apis/volumesnapshot/v1beta1/types.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha1 +package v1beta1 import ( core_v1 "k8s.io/api/core/v1" diff --git a/pkg/apis/volumesnapshot/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/volumesnapshot/v1beta1/zz_generated.deepcopy.go similarity index 99% rename from pkg/apis/volumesnapshot/v1alpha1/zz_generated.deepcopy.go rename to pkg/apis/volumesnapshot/v1beta1/zz_generated.deepcopy.go index 38db004a8..5bc2c2028 100644 --- a/pkg/apis/volumesnapshot/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/volumesnapshot/v1beta1/zz_generated.deepcopy.go @@ -18,11 +18,11 @@ limitations under the License. // Code generated by deepcopy-gen. DO NOT EDIT. -package v1alpha1 +package v1beta1 import ( v1 "k8s.io/api/core/v1" - v1beta1 "k8s.io/api/storage/v1beta1" + storagev1beta1 "k8s.io/api/storage/v1beta1" runtime "k8s.io/apimachinery/pkg/runtime" ) @@ -342,7 +342,7 @@ func (in *VolumeSnapshotStatus) DeepCopyInto(out *VolumeSnapshotStatus) { } if in.Error != nil { in, out := &in.Error, &out.Error - *out = new(v1beta1.VolumeError) + *out = new(storagev1beta1.VolumeError) (*in).DeepCopyInto(*out) } return diff --git a/pkg/client/clientset/versioned/clientset.go b/pkg/client/clientset/versioned/clientset.go index 5bcff9985..25be21b49 100644 --- a/pkg/client/clientset/versioned/clientset.go +++ b/pkg/client/clientset/versioned/clientset.go @@ -19,7 +19,7 @@ limitations under the License. package versioned import ( - snapshotv1alpha1 "github.com/kubernetes-csi/external-snapshotter/pkg/client/clientset/versioned/typed/volumesnapshot/v1alpha1" + snapshotv1beta1 "github.com/kubernetes-csi/external-snapshotter/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1" discovery "k8s.io/client-go/discovery" rest "k8s.io/client-go/rest" flowcontrol "k8s.io/client-go/util/flowcontrol" @@ -27,19 +27,19 @@ import ( type Interface interface { Discovery() discovery.DiscoveryInterface - SnapshotV1alpha1() snapshotv1alpha1.SnapshotV1alpha1Interface + SnapshotV1beta1() snapshotv1beta1.SnapshotV1beta1Interface } // Clientset contains the clients for groups. Each group has exactly one // version included in a Clientset. type Clientset struct { *discovery.DiscoveryClient - snapshotV1alpha1 *snapshotv1alpha1.SnapshotV1alpha1Client + snapshotV1beta1 *snapshotv1beta1.SnapshotV1beta1Client } -// SnapshotV1alpha1 retrieves the SnapshotV1alpha1Client -func (c *Clientset) SnapshotV1alpha1() snapshotv1alpha1.SnapshotV1alpha1Interface { - return c.snapshotV1alpha1 +// SnapshotV1beta1 retrieves the SnapshotV1beta1Client +func (c *Clientset) SnapshotV1beta1() snapshotv1beta1.SnapshotV1beta1Interface { + return c.snapshotV1beta1 } // Discovery retrieves the DiscoveryClient @@ -58,7 +58,7 @@ func NewForConfig(c *rest.Config) (*Clientset, error) { } var cs Clientset var err error - cs.snapshotV1alpha1, err = snapshotv1alpha1.NewForConfig(&configShallowCopy) + cs.snapshotV1beta1, err = snapshotv1beta1.NewForConfig(&configShallowCopy) if err != nil { return nil, err } @@ -74,7 +74,7 @@ func NewForConfig(c *rest.Config) (*Clientset, error) { // panics if there is an error in the config. func NewForConfigOrDie(c *rest.Config) *Clientset { var cs Clientset - cs.snapshotV1alpha1 = snapshotv1alpha1.NewForConfigOrDie(c) + cs.snapshotV1beta1 = snapshotv1beta1.NewForConfigOrDie(c) cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c) return &cs @@ -83,7 +83,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.snapshotV1alpha1 = snapshotv1alpha1.New(c) + cs.snapshotV1beta1 = snapshotv1beta1.New(c) cs.DiscoveryClient = discovery.NewDiscoveryClient(c) return &cs diff --git a/pkg/client/clientset/versioned/fake/clientset_generated.go b/pkg/client/clientset/versioned/fake/clientset_generated.go index 0c5b82937..b05e85ea7 100644 --- a/pkg/client/clientset/versioned/fake/clientset_generated.go +++ b/pkg/client/clientset/versioned/fake/clientset_generated.go @@ -20,8 +20,8 @@ package fake import ( clientset "github.com/kubernetes-csi/external-snapshotter/pkg/client/clientset/versioned" - snapshotv1alpha1 "github.com/kubernetes-csi/external-snapshotter/pkg/client/clientset/versioned/typed/volumesnapshot/v1alpha1" - fakesnapshotv1alpha1 "github.com/kubernetes-csi/external-snapshotter/pkg/client/clientset/versioned/typed/volumesnapshot/v1alpha1/fake" + snapshotv1beta1 "github.com/kubernetes-csi/external-snapshotter/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1" + fakesnapshotv1beta1 "github.com/kubernetes-csi/external-snapshotter/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/fake" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/watch" "k8s.io/client-go/discovery" @@ -71,7 +71,7 @@ func (c *Clientset) Discovery() discovery.DiscoveryInterface { var _ clientset.Interface = &Clientset{} -// SnapshotV1alpha1 retrieves the SnapshotV1alpha1Client -func (c *Clientset) SnapshotV1alpha1() snapshotv1alpha1.SnapshotV1alpha1Interface { - return &fakesnapshotv1alpha1.FakeSnapshotV1alpha1{Fake: &c.Fake} +// SnapshotV1beta1 retrieves the SnapshotV1beta1Client +func (c *Clientset) SnapshotV1beta1() snapshotv1beta1.SnapshotV1beta1Interface { + return &fakesnapshotv1beta1.FakeSnapshotV1beta1{Fake: &c.Fake} } diff --git a/pkg/client/clientset/versioned/fake/register.go b/pkg/client/clientset/versioned/fake/register.go index 903889fd9..4c92bf112 100644 --- a/pkg/client/clientset/versioned/fake/register.go +++ b/pkg/client/clientset/versioned/fake/register.go @@ -19,7 +19,7 @@ limitations under the License. package fake import ( - snapshotv1alpha1 "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1alpha1" + snapshotv1beta1 "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -31,7 +31,7 @@ var scheme = runtime.NewScheme() var codecs = serializer.NewCodecFactory(scheme) var parameterCodec = runtime.NewParameterCodec(scheme) var localSchemeBuilder = runtime.SchemeBuilder{ - snapshotv1alpha1.AddToScheme, + snapshotv1beta1.AddToScheme, } // AddToScheme adds all types of this clientset into the given scheme. This allows composition diff --git a/pkg/client/clientset/versioned/scheme/register.go b/pkg/client/clientset/versioned/scheme/register.go index 46efa8fe5..296f7fa70 100644 --- a/pkg/client/clientset/versioned/scheme/register.go +++ b/pkg/client/clientset/versioned/scheme/register.go @@ -19,7 +19,7 @@ limitations under the License. package scheme import ( - snapshotv1alpha1 "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1alpha1" + snapshotv1beta1 "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -31,7 +31,7 @@ var Scheme = runtime.NewScheme() var Codecs = serializer.NewCodecFactory(Scheme) var ParameterCodec = runtime.NewParameterCodec(Scheme) var localSchemeBuilder = runtime.SchemeBuilder{ - snapshotv1alpha1.AddToScheme, + snapshotv1beta1.AddToScheme, } // AddToScheme adds all types of this clientset into the given scheme. This allows composition diff --git a/pkg/client/clientset/versioned/typed/volumesnapshot/v1alpha1/doc.go b/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/doc.go similarity index 97% rename from pkg/client/clientset/versioned/typed/volumesnapshot/v1alpha1/doc.go rename to pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/doc.go index 9752e759c..305440eb2 100644 --- a/pkg/client/clientset/versioned/typed/volumesnapshot/v1alpha1/doc.go +++ b/pkg/client/clientset/versioned/typed/volumesnapshot/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/pkg/client/clientset/versioned/typed/volumesnapshot/v1alpha1/fake/doc.go b/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/fake/doc.go similarity index 100% rename from pkg/client/clientset/versioned/typed/volumesnapshot/v1alpha1/fake/doc.go rename to pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/fake/doc.go diff --git a/pkg/client/clientset/versioned/typed/volumesnapshot/v1alpha1/fake/fake_volumesnapshot.go b/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/fake/fake_volumesnapshot.go similarity index 70% rename from pkg/client/clientset/versioned/typed/volumesnapshot/v1alpha1/fake/fake_volumesnapshot.go rename to pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/fake/fake_volumesnapshot.go index 05016a1a2..72faad7d8 100644 --- a/pkg/client/clientset/versioned/typed/volumesnapshot/v1alpha1/fake/fake_volumesnapshot.go +++ b/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/fake/fake_volumesnapshot.go @@ -19,7 +19,7 @@ limitations under the License. package fake import ( - v1alpha1 "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1alpha1" + v1beta1 "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -30,29 +30,29 @@ import ( // FakeVolumeSnapshots implements VolumeSnapshotInterface type FakeVolumeSnapshots struct { - Fake *FakeSnapshotV1alpha1 + Fake *FakeSnapshotV1beta1 ns string } -var volumesnapshotsResource = schema.GroupVersionResource{Group: "snapshot.storage.k8s.io", Version: "v1alpha1", Resource: "volumesnapshots"} +var volumesnapshotsResource = schema.GroupVersionResource{Group: "snapshot.storage.k8s.io", Version: "v1beta1", Resource: "volumesnapshots"} -var volumesnapshotsKind = schema.GroupVersionKind{Group: "snapshot.storage.k8s.io", Version: "v1alpha1", Kind: "VolumeSnapshot"} +var volumesnapshotsKind = schema.GroupVersionKind{Group: "snapshot.storage.k8s.io", Version: "v1beta1", Kind: "VolumeSnapshot"} // Get takes name of the volumeSnapshot, and returns the corresponding volumeSnapshot object, and an error if there is any. -func (c *FakeVolumeSnapshots) Get(name string, options v1.GetOptions) (result *v1alpha1.VolumeSnapshot, err error) { +func (c *FakeVolumeSnapshots) Get(name string, options v1.GetOptions) (result *v1beta1.VolumeSnapshot, err error) { obj, err := c.Fake. - Invokes(testing.NewGetAction(volumesnapshotsResource, c.ns, name), &v1alpha1.VolumeSnapshot{}) + Invokes(testing.NewGetAction(volumesnapshotsResource, c.ns, name), &v1beta1.VolumeSnapshot{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.VolumeSnapshot), err + return obj.(*v1beta1.VolumeSnapshot), err } // List takes label and field selectors, and returns the list of VolumeSnapshots that match those selectors. -func (c *FakeVolumeSnapshots) List(opts v1.ListOptions) (result *v1alpha1.VolumeSnapshotList, err error) { +func (c *FakeVolumeSnapshots) List(opts v1.ListOptions) (result *v1beta1.VolumeSnapshotList, err error) { obj, err := c.Fake. - Invokes(testing.NewListAction(volumesnapshotsResource, volumesnapshotsKind, c.ns, opts), &v1alpha1.VolumeSnapshotList{}) + Invokes(testing.NewListAction(volumesnapshotsResource, volumesnapshotsKind, c.ns, opts), &v1beta1.VolumeSnapshotList{}) if obj == nil { return nil, err @@ -62,8 +62,8 @@ func (c *FakeVolumeSnapshots) List(opts v1.ListOptions) (result *v1alpha1.Volume if label == nil { label = labels.Everything() } - list := &v1alpha1.VolumeSnapshotList{ListMeta: obj.(*v1alpha1.VolumeSnapshotList).ListMeta} - for _, item := range obj.(*v1alpha1.VolumeSnapshotList).Items { + list := &v1beta1.VolumeSnapshotList{ListMeta: obj.(*v1beta1.VolumeSnapshotList).ListMeta} + for _, item := range obj.(*v1beta1.VolumeSnapshotList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -79,43 +79,43 @@ func (c *FakeVolumeSnapshots) Watch(opts v1.ListOptions) (watch.Interface, error } // Create takes the representation of a volumeSnapshot and creates it. Returns the server's representation of the volumeSnapshot, and an error, if there is any. -func (c *FakeVolumeSnapshots) Create(volumeSnapshot *v1alpha1.VolumeSnapshot) (result *v1alpha1.VolumeSnapshot, err error) { +func (c *FakeVolumeSnapshots) Create(volumeSnapshot *v1beta1.VolumeSnapshot) (result *v1beta1.VolumeSnapshot, err error) { obj, err := c.Fake. - Invokes(testing.NewCreateAction(volumesnapshotsResource, c.ns, volumeSnapshot), &v1alpha1.VolumeSnapshot{}) + Invokes(testing.NewCreateAction(volumesnapshotsResource, c.ns, volumeSnapshot), &v1beta1.VolumeSnapshot{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.VolumeSnapshot), err + return obj.(*v1beta1.VolumeSnapshot), err } // Update takes the representation of a volumeSnapshot and updates it. Returns the server's representation of the volumeSnapshot, and an error, if there is any. -func (c *FakeVolumeSnapshots) Update(volumeSnapshot *v1alpha1.VolumeSnapshot) (result *v1alpha1.VolumeSnapshot, err error) { +func (c *FakeVolumeSnapshots) Update(volumeSnapshot *v1beta1.VolumeSnapshot) (result *v1beta1.VolumeSnapshot, err error) { obj, err := c.Fake. - Invokes(testing.NewUpdateAction(volumesnapshotsResource, c.ns, volumeSnapshot), &v1alpha1.VolumeSnapshot{}) + Invokes(testing.NewUpdateAction(volumesnapshotsResource, c.ns, volumeSnapshot), &v1beta1.VolumeSnapshot{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.VolumeSnapshot), err + return obj.(*v1beta1.VolumeSnapshot), 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 *FakeVolumeSnapshots) UpdateStatus(volumeSnapshot *v1alpha1.VolumeSnapshot) (*v1alpha1.VolumeSnapshot, error) { +func (c *FakeVolumeSnapshots) UpdateStatus(volumeSnapshot *v1beta1.VolumeSnapshot) (*v1beta1.VolumeSnapshot, error) { obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(volumesnapshotsResource, "status", c.ns, volumeSnapshot), &v1alpha1.VolumeSnapshot{}) + Invokes(testing.NewUpdateSubresourceAction(volumesnapshotsResource, "status", c.ns, volumeSnapshot), &v1beta1.VolumeSnapshot{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.VolumeSnapshot), err + return obj.(*v1beta1.VolumeSnapshot), err } // Delete takes name of the volumeSnapshot and deletes it. Returns an error if one occurs. func (c *FakeVolumeSnapshots) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewDeleteAction(volumesnapshotsResource, c.ns, name), &v1alpha1.VolumeSnapshot{}) + Invokes(testing.NewDeleteAction(volumesnapshotsResource, c.ns, name), &v1beta1.VolumeSnapshot{}) return err } @@ -124,17 +124,17 @@ func (c *FakeVolumeSnapshots) Delete(name string, options *v1.DeleteOptions) err func (c *FakeVolumeSnapshots) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := testing.NewDeleteCollectionAction(volumesnapshotsResource, c.ns, listOptions) - _, err := c.Fake.Invokes(action, &v1alpha1.VolumeSnapshotList{}) + _, err := c.Fake.Invokes(action, &v1beta1.VolumeSnapshotList{}) return err } // Patch applies the patch and returns the patched volumeSnapshot. -func (c *FakeVolumeSnapshots) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.VolumeSnapshot, err error) { +func (c *FakeVolumeSnapshots) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.VolumeSnapshot, err error) { obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(volumesnapshotsResource, c.ns, name, pt, data, subresources...), &v1alpha1.VolumeSnapshot{}) + Invokes(testing.NewPatchSubresourceAction(volumesnapshotsResource, c.ns, name, pt, data, subresources...), &v1beta1.VolumeSnapshot{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.VolumeSnapshot), err + return obj.(*v1beta1.VolumeSnapshot), err } diff --git a/pkg/client/clientset/versioned/typed/volumesnapshot/v1alpha1/fake/fake_volumesnapshot_client.go b/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/fake/fake_volumesnapshot_client.go similarity index 66% rename from pkg/client/clientset/versioned/typed/volumesnapshot/v1alpha1/fake/fake_volumesnapshot_client.go rename to pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/fake/fake_volumesnapshot_client.go index 6c8b11a57..56f7a0dd1 100644 --- a/pkg/client/clientset/versioned/typed/volumesnapshot/v1alpha1/fake/fake_volumesnapshot_client.go +++ b/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/fake/fake_volumesnapshot_client.go @@ -19,30 +19,30 @@ limitations under the License. package fake import ( - v1alpha1 "github.com/kubernetes-csi/external-snapshotter/pkg/client/clientset/versioned/typed/volumesnapshot/v1alpha1" + v1beta1 "github.com/kubernetes-csi/external-snapshotter/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1" rest "k8s.io/client-go/rest" testing "k8s.io/client-go/testing" ) -type FakeSnapshotV1alpha1 struct { +type FakeSnapshotV1beta1 struct { *testing.Fake } -func (c *FakeSnapshotV1alpha1) VolumeSnapshots(namespace string) v1alpha1.VolumeSnapshotInterface { +func (c *FakeSnapshotV1beta1) VolumeSnapshots(namespace string) v1beta1.VolumeSnapshotInterface { return &FakeVolumeSnapshots{c, namespace} } -func (c *FakeSnapshotV1alpha1) VolumeSnapshotClasses() v1alpha1.VolumeSnapshotClassInterface { +func (c *FakeSnapshotV1beta1) VolumeSnapshotClasses() v1beta1.VolumeSnapshotClassInterface { return &FakeVolumeSnapshotClasses{c} } -func (c *FakeSnapshotV1alpha1) VolumeSnapshotContents() v1alpha1.VolumeSnapshotContentInterface { +func (c *FakeSnapshotV1beta1) VolumeSnapshotContents() v1beta1.VolumeSnapshotContentInterface { return &FakeVolumeSnapshotContents{c} } // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeSnapshotV1alpha1) RESTClient() rest.Interface { +func (c *FakeSnapshotV1beta1) RESTClient() rest.Interface { var ret *rest.RESTClient return ret } diff --git a/pkg/client/clientset/versioned/typed/volumesnapshot/v1alpha1/fake/fake_volumesnapshotclass.go b/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/fake/fake_volumesnapshotclass.go similarity index 72% rename from pkg/client/clientset/versioned/typed/volumesnapshot/v1alpha1/fake/fake_volumesnapshotclass.go rename to pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/fake/fake_volumesnapshotclass.go index 5c756b20b..bd4013c39 100644 --- a/pkg/client/clientset/versioned/typed/volumesnapshot/v1alpha1/fake/fake_volumesnapshotclass.go +++ b/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/fake/fake_volumesnapshotclass.go @@ -19,7 +19,7 @@ limitations under the License. package fake import ( - v1alpha1 "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1alpha1" + v1beta1 "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -30,27 +30,27 @@ import ( // FakeVolumeSnapshotClasses implements VolumeSnapshotClassInterface type FakeVolumeSnapshotClasses struct { - Fake *FakeSnapshotV1alpha1 + Fake *FakeSnapshotV1beta1 } -var volumesnapshotclassesResource = schema.GroupVersionResource{Group: "snapshot.storage.k8s.io", Version: "v1alpha1", Resource: "volumesnapshotclasses"} +var volumesnapshotclassesResource = schema.GroupVersionResource{Group: "snapshot.storage.k8s.io", Version: "v1beta1", Resource: "volumesnapshotclasses"} -var volumesnapshotclassesKind = schema.GroupVersionKind{Group: "snapshot.storage.k8s.io", Version: "v1alpha1", Kind: "VolumeSnapshotClass"} +var volumesnapshotclassesKind = schema.GroupVersionKind{Group: "snapshot.storage.k8s.io", Version: "v1beta1", Kind: "VolumeSnapshotClass"} // Get takes name of the volumeSnapshotClass, and returns the corresponding volumeSnapshotClass object, and an error if there is any. -func (c *FakeVolumeSnapshotClasses) Get(name string, options v1.GetOptions) (result *v1alpha1.VolumeSnapshotClass, err error) { +func (c *FakeVolumeSnapshotClasses) Get(name string, options v1.GetOptions) (result *v1beta1.VolumeSnapshotClass, err error) { obj, err := c.Fake. - Invokes(testing.NewRootGetAction(volumesnapshotclassesResource, name), &v1alpha1.VolumeSnapshotClass{}) + Invokes(testing.NewRootGetAction(volumesnapshotclassesResource, name), &v1beta1.VolumeSnapshotClass{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.VolumeSnapshotClass), err + return obj.(*v1beta1.VolumeSnapshotClass), err } // List takes label and field selectors, and returns the list of VolumeSnapshotClasses that match those selectors. -func (c *FakeVolumeSnapshotClasses) List(opts v1.ListOptions) (result *v1alpha1.VolumeSnapshotClassList, err error) { +func (c *FakeVolumeSnapshotClasses) List(opts v1.ListOptions) (result *v1beta1.VolumeSnapshotClassList, err error) { obj, err := c.Fake. - Invokes(testing.NewRootListAction(volumesnapshotclassesResource, volumesnapshotclassesKind, opts), &v1alpha1.VolumeSnapshotClassList{}) + Invokes(testing.NewRootListAction(volumesnapshotclassesResource, volumesnapshotclassesKind, opts), &v1beta1.VolumeSnapshotClassList{}) if obj == nil { return nil, err } @@ -59,8 +59,8 @@ func (c *FakeVolumeSnapshotClasses) List(opts v1.ListOptions) (result *v1alpha1. if label == nil { label = labels.Everything() } - list := &v1alpha1.VolumeSnapshotClassList{ListMeta: obj.(*v1alpha1.VolumeSnapshotClassList).ListMeta} - for _, item := range obj.(*v1alpha1.VolumeSnapshotClassList).Items { + list := &v1beta1.VolumeSnapshotClassList{ListMeta: obj.(*v1beta1.VolumeSnapshotClassList).ListMeta} + for _, item := range obj.(*v1beta1.VolumeSnapshotClassList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -75,29 +75,29 @@ func (c *FakeVolumeSnapshotClasses) Watch(opts v1.ListOptions) (watch.Interface, } // Create takes the representation of a volumeSnapshotClass and creates it. Returns the server's representation of the volumeSnapshotClass, and an error, if there is any. -func (c *FakeVolumeSnapshotClasses) Create(volumeSnapshotClass *v1alpha1.VolumeSnapshotClass) (result *v1alpha1.VolumeSnapshotClass, err error) { +func (c *FakeVolumeSnapshotClasses) Create(volumeSnapshotClass *v1beta1.VolumeSnapshotClass) (result *v1beta1.VolumeSnapshotClass, err error) { obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(volumesnapshotclassesResource, volumeSnapshotClass), &v1alpha1.VolumeSnapshotClass{}) + Invokes(testing.NewRootCreateAction(volumesnapshotclassesResource, volumeSnapshotClass), &v1beta1.VolumeSnapshotClass{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.VolumeSnapshotClass), err + return obj.(*v1beta1.VolumeSnapshotClass), err } // Update takes the representation of a volumeSnapshotClass and updates it. Returns the server's representation of the volumeSnapshotClass, and an error, if there is any. -func (c *FakeVolumeSnapshotClasses) Update(volumeSnapshotClass *v1alpha1.VolumeSnapshotClass) (result *v1alpha1.VolumeSnapshotClass, err error) { +func (c *FakeVolumeSnapshotClasses) Update(volumeSnapshotClass *v1beta1.VolumeSnapshotClass) (result *v1beta1.VolumeSnapshotClass, err error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(volumesnapshotclassesResource, volumeSnapshotClass), &v1alpha1.VolumeSnapshotClass{}) + Invokes(testing.NewRootUpdateAction(volumesnapshotclassesResource, volumeSnapshotClass), &v1beta1.VolumeSnapshotClass{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.VolumeSnapshotClass), err + return obj.(*v1beta1.VolumeSnapshotClass), err } // Delete takes name of the volumeSnapshotClass and deletes it. Returns an error if one occurs. func (c *FakeVolumeSnapshotClasses) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewRootDeleteAction(volumesnapshotclassesResource, name), &v1alpha1.VolumeSnapshotClass{}) + Invokes(testing.NewRootDeleteAction(volumesnapshotclassesResource, name), &v1beta1.VolumeSnapshotClass{}) return err } @@ -105,16 +105,16 @@ func (c *FakeVolumeSnapshotClasses) Delete(name string, options *v1.DeleteOption func (c *FakeVolumeSnapshotClasses) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := testing.NewRootDeleteCollectionAction(volumesnapshotclassesResource, listOptions) - _, err := c.Fake.Invokes(action, &v1alpha1.VolumeSnapshotClassList{}) + _, err := c.Fake.Invokes(action, &v1beta1.VolumeSnapshotClassList{}) return err } // Patch applies the patch and returns the patched volumeSnapshotClass. -func (c *FakeVolumeSnapshotClasses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.VolumeSnapshotClass, err error) { +func (c *FakeVolumeSnapshotClasses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.VolumeSnapshotClass, err error) { obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(volumesnapshotclassesResource, name, pt, data, subresources...), &v1alpha1.VolumeSnapshotClass{}) + Invokes(testing.NewRootPatchSubresourceAction(volumesnapshotclassesResource, name, pt, data, subresources...), &v1beta1.VolumeSnapshotClass{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.VolumeSnapshotClass), err + return obj.(*v1beta1.VolumeSnapshotClass), err } diff --git a/pkg/client/clientset/versioned/typed/volumesnapshot/v1alpha1/fake/fake_volumesnapshotcontent.go b/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/fake/fake_volumesnapshotcontent.go similarity index 71% rename from pkg/client/clientset/versioned/typed/volumesnapshot/v1alpha1/fake/fake_volumesnapshotcontent.go rename to pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/fake/fake_volumesnapshotcontent.go index f646d1d9d..3593a8448 100644 --- a/pkg/client/clientset/versioned/typed/volumesnapshot/v1alpha1/fake/fake_volumesnapshotcontent.go +++ b/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/fake/fake_volumesnapshotcontent.go @@ -19,7 +19,7 @@ limitations under the License. package fake import ( - v1alpha1 "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1alpha1" + v1beta1 "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -30,27 +30,27 @@ import ( // FakeVolumeSnapshotContents implements VolumeSnapshotContentInterface type FakeVolumeSnapshotContents struct { - Fake *FakeSnapshotV1alpha1 + Fake *FakeSnapshotV1beta1 } -var volumesnapshotcontentsResource = schema.GroupVersionResource{Group: "snapshot.storage.k8s.io", Version: "v1alpha1", Resource: "volumesnapshotcontents"} +var volumesnapshotcontentsResource = schema.GroupVersionResource{Group: "snapshot.storage.k8s.io", Version: "v1beta1", Resource: "volumesnapshotcontents"} -var volumesnapshotcontentsKind = schema.GroupVersionKind{Group: "snapshot.storage.k8s.io", Version: "v1alpha1", Kind: "VolumeSnapshotContent"} +var volumesnapshotcontentsKind = schema.GroupVersionKind{Group: "snapshot.storage.k8s.io", Version: "v1beta1", Kind: "VolumeSnapshotContent"} // Get takes name of the volumeSnapshotContent, and returns the corresponding volumeSnapshotContent object, and an error if there is any. -func (c *FakeVolumeSnapshotContents) Get(name string, options v1.GetOptions) (result *v1alpha1.VolumeSnapshotContent, err error) { +func (c *FakeVolumeSnapshotContents) Get(name string, options v1.GetOptions) (result *v1beta1.VolumeSnapshotContent, err error) { obj, err := c.Fake. - Invokes(testing.NewRootGetAction(volumesnapshotcontentsResource, name), &v1alpha1.VolumeSnapshotContent{}) + Invokes(testing.NewRootGetAction(volumesnapshotcontentsResource, name), &v1beta1.VolumeSnapshotContent{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.VolumeSnapshotContent), err + return obj.(*v1beta1.VolumeSnapshotContent), err } // List takes label and field selectors, and returns the list of VolumeSnapshotContents that match those selectors. -func (c *FakeVolumeSnapshotContents) List(opts v1.ListOptions) (result *v1alpha1.VolumeSnapshotContentList, err error) { +func (c *FakeVolumeSnapshotContents) List(opts v1.ListOptions) (result *v1beta1.VolumeSnapshotContentList, err error) { obj, err := c.Fake. - Invokes(testing.NewRootListAction(volumesnapshotcontentsResource, volumesnapshotcontentsKind, opts), &v1alpha1.VolumeSnapshotContentList{}) + Invokes(testing.NewRootListAction(volumesnapshotcontentsResource, volumesnapshotcontentsKind, opts), &v1beta1.VolumeSnapshotContentList{}) if obj == nil { return nil, err } @@ -59,8 +59,8 @@ func (c *FakeVolumeSnapshotContents) List(opts v1.ListOptions) (result *v1alpha1 if label == nil { label = labels.Everything() } - list := &v1alpha1.VolumeSnapshotContentList{ListMeta: obj.(*v1alpha1.VolumeSnapshotContentList).ListMeta} - for _, item := range obj.(*v1alpha1.VolumeSnapshotContentList).Items { + list := &v1beta1.VolumeSnapshotContentList{ListMeta: obj.(*v1beta1.VolumeSnapshotContentList).ListMeta} + for _, item := range obj.(*v1beta1.VolumeSnapshotContentList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -75,29 +75,29 @@ func (c *FakeVolumeSnapshotContents) Watch(opts v1.ListOptions) (watch.Interface } // Create takes the representation of a volumeSnapshotContent and creates it. Returns the server's representation of the volumeSnapshotContent, and an error, if there is any. -func (c *FakeVolumeSnapshotContents) Create(volumeSnapshotContent *v1alpha1.VolumeSnapshotContent) (result *v1alpha1.VolumeSnapshotContent, err error) { +func (c *FakeVolumeSnapshotContents) Create(volumeSnapshotContent *v1beta1.VolumeSnapshotContent) (result *v1beta1.VolumeSnapshotContent, err error) { obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(volumesnapshotcontentsResource, volumeSnapshotContent), &v1alpha1.VolumeSnapshotContent{}) + Invokes(testing.NewRootCreateAction(volumesnapshotcontentsResource, volumeSnapshotContent), &v1beta1.VolumeSnapshotContent{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.VolumeSnapshotContent), err + return obj.(*v1beta1.VolumeSnapshotContent), err } // Update takes the representation of a volumeSnapshotContent and updates it. Returns the server's representation of the volumeSnapshotContent, and an error, if there is any. -func (c *FakeVolumeSnapshotContents) Update(volumeSnapshotContent *v1alpha1.VolumeSnapshotContent) (result *v1alpha1.VolumeSnapshotContent, err error) { +func (c *FakeVolumeSnapshotContents) Update(volumeSnapshotContent *v1beta1.VolumeSnapshotContent) (result *v1beta1.VolumeSnapshotContent, err error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(volumesnapshotcontentsResource, volumeSnapshotContent), &v1alpha1.VolumeSnapshotContent{}) + Invokes(testing.NewRootUpdateAction(volumesnapshotcontentsResource, volumeSnapshotContent), &v1beta1.VolumeSnapshotContent{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.VolumeSnapshotContent), err + return obj.(*v1beta1.VolumeSnapshotContent), err } // Delete takes name of the volumeSnapshotContent and deletes it. Returns an error if one occurs. func (c *FakeVolumeSnapshotContents) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewRootDeleteAction(volumesnapshotcontentsResource, name), &v1alpha1.VolumeSnapshotContent{}) + Invokes(testing.NewRootDeleteAction(volumesnapshotcontentsResource, name), &v1beta1.VolumeSnapshotContent{}) return err } @@ -105,16 +105,16 @@ func (c *FakeVolumeSnapshotContents) Delete(name string, options *v1.DeleteOptio func (c *FakeVolumeSnapshotContents) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := testing.NewRootDeleteCollectionAction(volumesnapshotcontentsResource, listOptions) - _, err := c.Fake.Invokes(action, &v1alpha1.VolumeSnapshotContentList{}) + _, err := c.Fake.Invokes(action, &v1beta1.VolumeSnapshotContentList{}) return err } // Patch applies the patch and returns the patched volumeSnapshotContent. -func (c *FakeVolumeSnapshotContents) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.VolumeSnapshotContent, err error) { +func (c *FakeVolumeSnapshotContents) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.VolumeSnapshotContent, err error) { obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(volumesnapshotcontentsResource, name, pt, data, subresources...), &v1alpha1.VolumeSnapshotContent{}) + Invokes(testing.NewRootPatchSubresourceAction(volumesnapshotcontentsResource, name, pt, data, subresources...), &v1beta1.VolumeSnapshotContent{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.VolumeSnapshotContent), err + return obj.(*v1beta1.VolumeSnapshotContent), err } diff --git a/pkg/client/clientset/versioned/typed/volumesnapshot/v1alpha1/generated_expansion.go b/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/generated_expansion.go similarity index 97% rename from pkg/client/clientset/versioned/typed/volumesnapshot/v1alpha1/generated_expansion.go rename to pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/generated_expansion.go index 9b641f106..3ed3d11f2 100644 --- a/pkg/client/clientset/versioned/typed/volumesnapshot/v1alpha1/generated_expansion.go +++ b/pkg/client/clientset/versioned/typed/volumesnapshot/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 VolumeSnapshotExpansion interface{} diff --git a/pkg/client/clientset/versioned/typed/volumesnapshot/v1alpha1/volumesnapshot.go b/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/volumesnapshot.go similarity index 77% rename from pkg/client/clientset/versioned/typed/volumesnapshot/v1alpha1/volumesnapshot.go rename to pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/volumesnapshot.go index a2f80805a..f9ef41512 100644 --- a/pkg/client/clientset/versioned/typed/volumesnapshot/v1alpha1/volumesnapshot.go +++ b/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/volumesnapshot.go @@ -16,12 +16,12 @@ limitations under the License. // Code generated by client-gen. DO NOT EDIT. -package v1alpha1 +package v1beta1 import ( "time" - v1alpha1 "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1alpha1" + v1beta1 "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1beta1" scheme "github.com/kubernetes-csi/external-snapshotter/pkg/client/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -37,15 +37,15 @@ type VolumeSnapshotsGetter interface { // VolumeSnapshotInterface has methods to work with VolumeSnapshot resources. type VolumeSnapshotInterface interface { - Create(*v1alpha1.VolumeSnapshot) (*v1alpha1.VolumeSnapshot, error) - Update(*v1alpha1.VolumeSnapshot) (*v1alpha1.VolumeSnapshot, error) - UpdateStatus(*v1alpha1.VolumeSnapshot) (*v1alpha1.VolumeSnapshot, error) + Create(*v1beta1.VolumeSnapshot) (*v1beta1.VolumeSnapshot, error) + Update(*v1beta1.VolumeSnapshot) (*v1beta1.VolumeSnapshot, error) + UpdateStatus(*v1beta1.VolumeSnapshot) (*v1beta1.VolumeSnapshot, error) Delete(name string, options *v1.DeleteOptions) error DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1alpha1.VolumeSnapshot, error) - List(opts v1.ListOptions) (*v1alpha1.VolumeSnapshotList, error) + Get(name string, options v1.GetOptions) (*v1beta1.VolumeSnapshot, error) + List(opts v1.ListOptions) (*v1beta1.VolumeSnapshotList, error) Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.VolumeSnapshot, err error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.VolumeSnapshot, err error) VolumeSnapshotExpansion } @@ -56,7 +56,7 @@ type volumeSnapshots struct { } // newVolumeSnapshots returns a VolumeSnapshots -func newVolumeSnapshots(c *SnapshotV1alpha1Client, namespace string) *volumeSnapshots { +func newVolumeSnapshots(c *SnapshotV1beta1Client, namespace string) *volumeSnapshots { return &volumeSnapshots{ client: c.RESTClient(), ns: namespace, @@ -64,8 +64,8 @@ func newVolumeSnapshots(c *SnapshotV1alpha1Client, namespace string) *volumeSnap } // Get takes name of the volumeSnapshot, and returns the corresponding volumeSnapshot object, and an error if there is any. -func (c *volumeSnapshots) Get(name string, options v1.GetOptions) (result *v1alpha1.VolumeSnapshot, err error) { - result = &v1alpha1.VolumeSnapshot{} +func (c *volumeSnapshots) Get(name string, options v1.GetOptions) (result *v1beta1.VolumeSnapshot, err error) { + result = &v1beta1.VolumeSnapshot{} err = c.client.Get(). Namespace(c.ns). Resource("volumesnapshots"). @@ -77,12 +77,12 @@ func (c *volumeSnapshots) Get(name string, options v1.GetOptions) (result *v1alp } // List takes label and field selectors, and returns the list of VolumeSnapshots that match those selectors. -func (c *volumeSnapshots) List(opts v1.ListOptions) (result *v1alpha1.VolumeSnapshotList, err error) { +func (c *volumeSnapshots) List(opts v1.ListOptions) (result *v1beta1.VolumeSnapshotList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second } - result = &v1alpha1.VolumeSnapshotList{} + result = &v1beta1.VolumeSnapshotList{} err = c.client.Get(). Namespace(c.ns). Resource("volumesnapshots"). @@ -109,8 +109,8 @@ func (c *volumeSnapshots) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Create takes the representation of a volumeSnapshot and creates it. Returns the server's representation of the volumeSnapshot, and an error, if there is any. -func (c *volumeSnapshots) Create(volumeSnapshot *v1alpha1.VolumeSnapshot) (result *v1alpha1.VolumeSnapshot, err error) { - result = &v1alpha1.VolumeSnapshot{} +func (c *volumeSnapshots) Create(volumeSnapshot *v1beta1.VolumeSnapshot) (result *v1beta1.VolumeSnapshot, err error) { + result = &v1beta1.VolumeSnapshot{} err = c.client.Post(). Namespace(c.ns). Resource("volumesnapshots"). @@ -121,8 +121,8 @@ func (c *volumeSnapshots) Create(volumeSnapshot *v1alpha1.VolumeSnapshot) (resul } // Update takes the representation of a volumeSnapshot and updates it. Returns the server's representation of the volumeSnapshot, and an error, if there is any. -func (c *volumeSnapshots) Update(volumeSnapshot *v1alpha1.VolumeSnapshot) (result *v1alpha1.VolumeSnapshot, err error) { - result = &v1alpha1.VolumeSnapshot{} +func (c *volumeSnapshots) Update(volumeSnapshot *v1beta1.VolumeSnapshot) (result *v1beta1.VolumeSnapshot, err error) { + result = &v1beta1.VolumeSnapshot{} err = c.client.Put(). Namespace(c.ns). Resource("volumesnapshots"). @@ -136,8 +136,8 @@ func (c *volumeSnapshots) Update(volumeSnapshot *v1alpha1.VolumeSnapshot) (resul // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *volumeSnapshots) UpdateStatus(volumeSnapshot *v1alpha1.VolumeSnapshot) (result *v1alpha1.VolumeSnapshot, err error) { - result = &v1alpha1.VolumeSnapshot{} +func (c *volumeSnapshots) UpdateStatus(volumeSnapshot *v1beta1.VolumeSnapshot) (result *v1beta1.VolumeSnapshot, err error) { + result = &v1beta1.VolumeSnapshot{} err = c.client.Put(). Namespace(c.ns). Resource("volumesnapshots"). @@ -177,8 +177,8 @@ func (c *volumeSnapshots) DeleteCollection(options *v1.DeleteOptions, listOption } // Patch applies the patch and returns the patched volumeSnapshot. -func (c *volumeSnapshots) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.VolumeSnapshot, err error) { - result = &v1alpha1.VolumeSnapshot{} +func (c *volumeSnapshots) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.VolumeSnapshot, err error) { + result = &v1beta1.VolumeSnapshot{} err = c.client.Patch(pt). Namespace(c.ns). Resource("volumesnapshots"). diff --git a/pkg/client/clientset/versioned/typed/volumesnapshot/v1alpha1/volumesnapshot_client.go b/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/volumesnapshot_client.go similarity index 61% rename from pkg/client/clientset/versioned/typed/volumesnapshot/v1alpha1/volumesnapshot_client.go rename to pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/volumesnapshot_client.go index ba06f6576..574860496 100644 --- a/pkg/client/clientset/versioned/typed/volumesnapshot/v1alpha1/volumesnapshot_client.go +++ b/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/volumesnapshot_client.go @@ -16,41 +16,41 @@ limitations under the License. // Code generated by client-gen. DO NOT EDIT. -package v1alpha1 +package v1beta1 import ( - v1alpha1 "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1alpha1" + v1beta1 "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1beta1" "github.com/kubernetes-csi/external-snapshotter/pkg/client/clientset/versioned/scheme" serializer "k8s.io/apimachinery/pkg/runtime/serializer" rest "k8s.io/client-go/rest" ) -type SnapshotV1alpha1Interface interface { +type SnapshotV1beta1Interface interface { RESTClient() rest.Interface VolumeSnapshotsGetter VolumeSnapshotClassesGetter VolumeSnapshotContentsGetter } -// SnapshotV1alpha1Client is used to interact with features provided by the snapshot.storage.k8s.io group. -type SnapshotV1alpha1Client struct { +// SnapshotV1beta1Client is used to interact with features provided by the snapshot.storage.k8s.io group. +type SnapshotV1beta1Client struct { restClient rest.Interface } -func (c *SnapshotV1alpha1Client) VolumeSnapshots(namespace string) VolumeSnapshotInterface { +func (c *SnapshotV1beta1Client) VolumeSnapshots(namespace string) VolumeSnapshotInterface { return newVolumeSnapshots(c, namespace) } -func (c *SnapshotV1alpha1Client) VolumeSnapshotClasses() VolumeSnapshotClassInterface { +func (c *SnapshotV1beta1Client) VolumeSnapshotClasses() VolumeSnapshotClassInterface { return newVolumeSnapshotClasses(c) } -func (c *SnapshotV1alpha1Client) VolumeSnapshotContents() VolumeSnapshotContentInterface { +func (c *SnapshotV1beta1Client) VolumeSnapshotContents() VolumeSnapshotContentInterface { return newVolumeSnapshotContents(c) } -// NewForConfig creates a new SnapshotV1alpha1Client for the given config. -func NewForConfig(c *rest.Config) (*SnapshotV1alpha1Client, error) { +// NewForConfig creates a new SnapshotV1beta1Client for the given config. +func NewForConfig(c *rest.Config) (*SnapshotV1beta1Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err @@ -59,12 +59,12 @@ func NewForConfig(c *rest.Config) (*SnapshotV1alpha1Client, error) { if err != nil { return nil, err } - return &SnapshotV1alpha1Client{client}, nil + return &SnapshotV1beta1Client{client}, nil } -// NewForConfigOrDie creates a new SnapshotV1alpha1Client for the given config and +// NewForConfigOrDie creates a new SnapshotV1beta1Client for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *SnapshotV1alpha1Client { +func NewForConfigOrDie(c *rest.Config) *SnapshotV1beta1Client { client, err := NewForConfig(c) if err != nil { panic(err) @@ -72,13 +72,13 @@ func NewForConfigOrDie(c *rest.Config) *SnapshotV1alpha1Client { return client } -// New creates a new SnapshotV1alpha1Client for the given RESTClient. -func New(c rest.Interface) *SnapshotV1alpha1Client { - return &SnapshotV1alpha1Client{c} +// New creates a new SnapshotV1beta1Client for the given RESTClient. +func New(c rest.Interface) *SnapshotV1beta1Client { + return &SnapshotV1beta1Client{c} } func setConfigDefaults(config *rest.Config) error { - gv := v1alpha1.SchemeGroupVersion + gv := v1beta1.SchemeGroupVersion config.GroupVersion = &gv config.APIPath = "/apis" config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs} @@ -92,7 +92,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 *SnapshotV1alpha1Client) RESTClient() rest.Interface { +func (c *SnapshotV1beta1Client) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/pkg/client/clientset/versioned/typed/volumesnapshot/v1alpha1/volumesnapshotclass.go b/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/volumesnapshotclass.go similarity index 79% rename from pkg/client/clientset/versioned/typed/volumesnapshot/v1alpha1/volumesnapshotclass.go rename to pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/volumesnapshotclass.go index 8b788df4a..4a8e1d324 100644 --- a/pkg/client/clientset/versioned/typed/volumesnapshot/v1alpha1/volumesnapshotclass.go +++ b/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/volumesnapshotclass.go @@ -16,12 +16,12 @@ limitations under the License. // Code generated by client-gen. DO NOT EDIT. -package v1alpha1 +package v1beta1 import ( "time" - v1alpha1 "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1alpha1" + v1beta1 "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1beta1" scheme "github.com/kubernetes-csi/external-snapshotter/pkg/client/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -37,14 +37,14 @@ type VolumeSnapshotClassesGetter interface { // VolumeSnapshotClassInterface has methods to work with VolumeSnapshotClass resources. type VolumeSnapshotClassInterface interface { - Create(*v1alpha1.VolumeSnapshotClass) (*v1alpha1.VolumeSnapshotClass, error) - Update(*v1alpha1.VolumeSnapshotClass) (*v1alpha1.VolumeSnapshotClass, error) + Create(*v1beta1.VolumeSnapshotClass) (*v1beta1.VolumeSnapshotClass, error) + Update(*v1beta1.VolumeSnapshotClass) (*v1beta1.VolumeSnapshotClass, error) Delete(name string, options *v1.DeleteOptions) error DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1alpha1.VolumeSnapshotClass, error) - List(opts v1.ListOptions) (*v1alpha1.VolumeSnapshotClassList, error) + Get(name string, options v1.GetOptions) (*v1beta1.VolumeSnapshotClass, error) + List(opts v1.ListOptions) (*v1beta1.VolumeSnapshotClassList, error) Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.VolumeSnapshotClass, err error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.VolumeSnapshotClass, err error) VolumeSnapshotClassExpansion } @@ -54,15 +54,15 @@ type volumeSnapshotClasses struct { } // newVolumeSnapshotClasses returns a VolumeSnapshotClasses -func newVolumeSnapshotClasses(c *SnapshotV1alpha1Client) *volumeSnapshotClasses { +func newVolumeSnapshotClasses(c *SnapshotV1beta1Client) *volumeSnapshotClasses { return &volumeSnapshotClasses{ client: c.RESTClient(), } } // Get takes name of the volumeSnapshotClass, and returns the corresponding volumeSnapshotClass object, and an error if there is any. -func (c *volumeSnapshotClasses) Get(name string, options v1.GetOptions) (result *v1alpha1.VolumeSnapshotClass, err error) { - result = &v1alpha1.VolumeSnapshotClass{} +func (c *volumeSnapshotClasses) Get(name string, options v1.GetOptions) (result *v1beta1.VolumeSnapshotClass, err error) { + result = &v1beta1.VolumeSnapshotClass{} err = c.client.Get(). Resource("volumesnapshotclasses"). Name(name). @@ -73,12 +73,12 @@ func (c *volumeSnapshotClasses) Get(name string, options v1.GetOptions) (result } // List takes label and field selectors, and returns the list of VolumeSnapshotClasses that match those selectors. -func (c *volumeSnapshotClasses) List(opts v1.ListOptions) (result *v1alpha1.VolumeSnapshotClassList, err error) { +func (c *volumeSnapshotClasses) List(opts v1.ListOptions) (result *v1beta1.VolumeSnapshotClassList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second } - result = &v1alpha1.VolumeSnapshotClassList{} + result = &v1beta1.VolumeSnapshotClassList{} err = c.client.Get(). Resource("volumesnapshotclasses"). VersionedParams(&opts, scheme.ParameterCodec). @@ -103,8 +103,8 @@ func (c *volumeSnapshotClasses) Watch(opts v1.ListOptions) (watch.Interface, err } // Create takes the representation of a volumeSnapshotClass and creates it. Returns the server's representation of the volumeSnapshotClass, and an error, if there is any. -func (c *volumeSnapshotClasses) Create(volumeSnapshotClass *v1alpha1.VolumeSnapshotClass) (result *v1alpha1.VolumeSnapshotClass, err error) { - result = &v1alpha1.VolumeSnapshotClass{} +func (c *volumeSnapshotClasses) Create(volumeSnapshotClass *v1beta1.VolumeSnapshotClass) (result *v1beta1.VolumeSnapshotClass, err error) { + result = &v1beta1.VolumeSnapshotClass{} err = c.client.Post(). Resource("volumesnapshotclasses"). Body(volumeSnapshotClass). @@ -114,8 +114,8 @@ func (c *volumeSnapshotClasses) Create(volumeSnapshotClass *v1alpha1.VolumeSnaps } // Update takes the representation of a volumeSnapshotClass and updates it. Returns the server's representation of the volumeSnapshotClass, and an error, if there is any. -func (c *volumeSnapshotClasses) Update(volumeSnapshotClass *v1alpha1.VolumeSnapshotClass) (result *v1alpha1.VolumeSnapshotClass, err error) { - result = &v1alpha1.VolumeSnapshotClass{} +func (c *volumeSnapshotClasses) Update(volumeSnapshotClass *v1beta1.VolumeSnapshotClass) (result *v1beta1.VolumeSnapshotClass, err error) { + result = &v1beta1.VolumeSnapshotClass{} err = c.client.Put(). Resource("volumesnapshotclasses"). Name(volumeSnapshotClass.Name). @@ -151,8 +151,8 @@ func (c *volumeSnapshotClasses) DeleteCollection(options *v1.DeleteOptions, list } // Patch applies the patch and returns the patched volumeSnapshotClass. -func (c *volumeSnapshotClasses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.VolumeSnapshotClass, err error) { - result = &v1alpha1.VolumeSnapshotClass{} +func (c *volumeSnapshotClasses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.VolumeSnapshotClass, err error) { + result = &v1beta1.VolumeSnapshotClass{} err = c.client.Patch(pt). Resource("volumesnapshotclasses"). SubResource(subresources...). diff --git a/pkg/client/clientset/versioned/typed/volumesnapshot/v1alpha1/volumesnapshotcontent.go b/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/volumesnapshotcontent.go similarity index 80% rename from pkg/client/clientset/versioned/typed/volumesnapshot/v1alpha1/volumesnapshotcontent.go rename to pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/volumesnapshotcontent.go index e393ccdfe..5f5e3d7a6 100644 --- a/pkg/client/clientset/versioned/typed/volumesnapshot/v1alpha1/volumesnapshotcontent.go +++ b/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/volumesnapshotcontent.go @@ -16,12 +16,12 @@ limitations under the License. // Code generated by client-gen. DO NOT EDIT. -package v1alpha1 +package v1beta1 import ( "time" - v1alpha1 "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1alpha1" + v1beta1 "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1beta1" scheme "github.com/kubernetes-csi/external-snapshotter/pkg/client/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -37,14 +37,14 @@ type VolumeSnapshotContentsGetter interface { // VolumeSnapshotContentInterface has methods to work with VolumeSnapshotContent resources. type VolumeSnapshotContentInterface interface { - Create(*v1alpha1.VolumeSnapshotContent) (*v1alpha1.VolumeSnapshotContent, error) - Update(*v1alpha1.VolumeSnapshotContent) (*v1alpha1.VolumeSnapshotContent, error) + Create(*v1beta1.VolumeSnapshotContent) (*v1beta1.VolumeSnapshotContent, error) + Update(*v1beta1.VolumeSnapshotContent) (*v1beta1.VolumeSnapshotContent, error) Delete(name string, options *v1.DeleteOptions) error DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1alpha1.VolumeSnapshotContent, error) - List(opts v1.ListOptions) (*v1alpha1.VolumeSnapshotContentList, error) + Get(name string, options v1.GetOptions) (*v1beta1.VolumeSnapshotContent, error) + List(opts v1.ListOptions) (*v1beta1.VolumeSnapshotContentList, error) Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.VolumeSnapshotContent, err error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.VolumeSnapshotContent, err error) VolumeSnapshotContentExpansion } @@ -54,15 +54,15 @@ type volumeSnapshotContents struct { } // newVolumeSnapshotContents returns a VolumeSnapshotContents -func newVolumeSnapshotContents(c *SnapshotV1alpha1Client) *volumeSnapshotContents { +func newVolumeSnapshotContents(c *SnapshotV1beta1Client) *volumeSnapshotContents { return &volumeSnapshotContents{ client: c.RESTClient(), } } // Get takes name of the volumeSnapshotContent, and returns the corresponding volumeSnapshotContent object, and an error if there is any. -func (c *volumeSnapshotContents) Get(name string, options v1.GetOptions) (result *v1alpha1.VolumeSnapshotContent, err error) { - result = &v1alpha1.VolumeSnapshotContent{} +func (c *volumeSnapshotContents) Get(name string, options v1.GetOptions) (result *v1beta1.VolumeSnapshotContent, err error) { + result = &v1beta1.VolumeSnapshotContent{} err = c.client.Get(). Resource("volumesnapshotcontents"). Name(name). @@ -73,12 +73,12 @@ func (c *volumeSnapshotContents) Get(name string, options v1.GetOptions) (result } // List takes label and field selectors, and returns the list of VolumeSnapshotContents that match those selectors. -func (c *volumeSnapshotContents) List(opts v1.ListOptions) (result *v1alpha1.VolumeSnapshotContentList, err error) { +func (c *volumeSnapshotContents) List(opts v1.ListOptions) (result *v1beta1.VolumeSnapshotContentList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second } - result = &v1alpha1.VolumeSnapshotContentList{} + result = &v1beta1.VolumeSnapshotContentList{} err = c.client.Get(). Resource("volumesnapshotcontents"). VersionedParams(&opts, scheme.ParameterCodec). @@ -103,8 +103,8 @@ func (c *volumeSnapshotContents) Watch(opts v1.ListOptions) (watch.Interface, er } // Create takes the representation of a volumeSnapshotContent and creates it. Returns the server's representation of the volumeSnapshotContent, and an error, if there is any. -func (c *volumeSnapshotContents) Create(volumeSnapshotContent *v1alpha1.VolumeSnapshotContent) (result *v1alpha1.VolumeSnapshotContent, err error) { - result = &v1alpha1.VolumeSnapshotContent{} +func (c *volumeSnapshotContents) Create(volumeSnapshotContent *v1beta1.VolumeSnapshotContent) (result *v1beta1.VolumeSnapshotContent, err error) { + result = &v1beta1.VolumeSnapshotContent{} err = c.client.Post(). Resource("volumesnapshotcontents"). Body(volumeSnapshotContent). @@ -114,8 +114,8 @@ func (c *volumeSnapshotContents) Create(volumeSnapshotContent *v1alpha1.VolumeSn } // Update takes the representation of a volumeSnapshotContent and updates it. Returns the server's representation of the volumeSnapshotContent, and an error, if there is any. -func (c *volumeSnapshotContents) Update(volumeSnapshotContent *v1alpha1.VolumeSnapshotContent) (result *v1alpha1.VolumeSnapshotContent, err error) { - result = &v1alpha1.VolumeSnapshotContent{} +func (c *volumeSnapshotContents) Update(volumeSnapshotContent *v1beta1.VolumeSnapshotContent) (result *v1beta1.VolumeSnapshotContent, err error) { + result = &v1beta1.VolumeSnapshotContent{} err = c.client.Put(). Resource("volumesnapshotcontents"). Name(volumeSnapshotContent.Name). @@ -151,8 +151,8 @@ func (c *volumeSnapshotContents) DeleteCollection(options *v1.DeleteOptions, lis } // Patch applies the patch and returns the patched volumeSnapshotContent. -func (c *volumeSnapshotContents) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.VolumeSnapshotContent, err error) { - result = &v1alpha1.VolumeSnapshotContent{} +func (c *volumeSnapshotContents) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.VolumeSnapshotContent, err error) { + result = &v1beta1.VolumeSnapshotContent{} err = c.client.Patch(pt). Resource("volumesnapshotcontents"). SubResource(subresources...). diff --git a/pkg/client/informers/externalversions/generic.go b/pkg/client/informers/externalversions/generic.go index 193942d0e..abf7d5fa8 100644 --- a/pkg/client/informers/externalversions/generic.go +++ b/pkg/client/informers/externalversions/generic.go @@ -21,7 +21,7 @@ package externalversions import ( "fmt" - v1alpha1 "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1alpha1" + v1beta1 "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1beta1" schema "k8s.io/apimachinery/pkg/runtime/schema" cache "k8s.io/client-go/tools/cache" ) @@ -52,13 +52,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=snapshot.storage.k8s.io, Version=v1alpha1 - case v1alpha1.SchemeGroupVersion.WithResource("volumesnapshots"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Snapshot().V1alpha1().VolumeSnapshots().Informer()}, nil - case v1alpha1.SchemeGroupVersion.WithResource("volumesnapshotclasses"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Snapshot().V1alpha1().VolumeSnapshotClasses().Informer()}, nil - case v1alpha1.SchemeGroupVersion.WithResource("volumesnapshotcontents"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Snapshot().V1alpha1().VolumeSnapshotContents().Informer()}, nil + // Group=snapshot.storage.k8s.io, Version=v1beta1 + case v1beta1.SchemeGroupVersion.WithResource("volumesnapshots"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Snapshot().V1beta1().VolumeSnapshots().Informer()}, nil + case v1beta1.SchemeGroupVersion.WithResource("volumesnapshotclasses"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Snapshot().V1beta1().VolumeSnapshotClasses().Informer()}, nil + case v1beta1.SchemeGroupVersion.WithResource("volumesnapshotcontents"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Snapshot().V1beta1().VolumeSnapshotContents().Informer()}, nil } diff --git a/pkg/client/informers/externalversions/volumesnapshot/interface.go b/pkg/client/informers/externalversions/volumesnapshot/interface.go index ba406ea94..874ea3dc1 100644 --- a/pkg/client/informers/externalversions/volumesnapshot/interface.go +++ b/pkg/client/informers/externalversions/volumesnapshot/interface.go @@ -20,13 +20,13 @@ package snapshot import ( internalinterfaces "github.com/kubernetes-csi/external-snapshotter/pkg/client/informers/externalversions/internalinterfaces" - v1alpha1 "github.com/kubernetes-csi/external-snapshotter/pkg/client/informers/externalversions/volumesnapshot/v1alpha1" + v1beta1 "github.com/kubernetes-csi/external-snapshotter/pkg/client/informers/externalversions/volumesnapshot/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/pkg/client/informers/externalversions/volumesnapshot/v1alpha1/interface.go b/pkg/client/informers/externalversions/volumesnapshot/v1beta1/interface.go similarity index 99% rename from pkg/client/informers/externalversions/volumesnapshot/v1alpha1/interface.go rename to pkg/client/informers/externalversions/volumesnapshot/v1beta1/interface.go index ded10e911..ecccf563e 100644 --- a/pkg/client/informers/externalversions/volumesnapshot/v1alpha1/interface.go +++ b/pkg/client/informers/externalversions/volumesnapshot/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/pkg/client/informers/externalversions/internalinterfaces" diff --git a/pkg/client/informers/externalversions/volumesnapshot/v1alpha1/volumesnapshot.go b/pkg/client/informers/externalversions/volumesnapshot/v1beta1/volumesnapshot.go similarity index 81% rename from pkg/client/informers/externalversions/volumesnapshot/v1alpha1/volumesnapshot.go rename to pkg/client/informers/externalversions/volumesnapshot/v1beta1/volumesnapshot.go index babb79b87..211b6f5f1 100644 --- a/pkg/client/informers/externalversions/volumesnapshot/v1alpha1/volumesnapshot.go +++ b/pkg/client/informers/externalversions/volumesnapshot/v1beta1/volumesnapshot.go @@ -16,15 +16,15 @@ limitations under the License. // Code generated by informer-gen. DO NOT EDIT. -package v1alpha1 +package v1beta1 import ( time "time" - volumesnapshotv1alpha1 "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1alpha1" + volumesnapshotv1beta1 "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1beta1" versioned "github.com/kubernetes-csi/external-snapshotter/pkg/client/clientset/versioned" internalinterfaces "github.com/kubernetes-csi/external-snapshotter/pkg/client/informers/externalversions/internalinterfaces" - v1alpha1 "github.com/kubernetes-csi/external-snapshotter/pkg/client/listers/volumesnapshot/v1alpha1" + v1beta1 "github.com/kubernetes-csi/external-snapshotter/pkg/client/listers/volumesnapshot/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -35,7 +35,7 @@ import ( // VolumeSnapshots. type VolumeSnapshotInformer interface { Informer() cache.SharedIndexInformer - Lister() v1alpha1.VolumeSnapshotLister + Lister() v1beta1.VolumeSnapshotLister } type volumeSnapshotInformer struct { @@ -61,16 +61,16 @@ func NewFilteredVolumeSnapshotInformer(client versioned.Interface, namespace str if tweakListOptions != nil { tweakListOptions(&options) } - return client.SnapshotV1alpha1().VolumeSnapshots(namespace).List(options) + return client.SnapshotV1beta1().VolumeSnapshots(namespace).List(options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.SnapshotV1alpha1().VolumeSnapshots(namespace).Watch(options) + return client.SnapshotV1beta1().VolumeSnapshots(namespace).Watch(options) }, }, - &volumesnapshotv1alpha1.VolumeSnapshot{}, + &volumesnapshotv1beta1.VolumeSnapshot{}, resyncPeriod, indexers, ) @@ -81,9 +81,9 @@ func (f *volumeSnapshotInformer) defaultInformer(client versioned.Interface, res } func (f *volumeSnapshotInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&volumesnapshotv1alpha1.VolumeSnapshot{}, f.defaultInformer) + return f.factory.InformerFor(&volumesnapshotv1beta1.VolumeSnapshot{}, f.defaultInformer) } -func (f *volumeSnapshotInformer) Lister() v1alpha1.VolumeSnapshotLister { - return v1alpha1.NewVolumeSnapshotLister(f.Informer().GetIndexer()) +func (f *volumeSnapshotInformer) Lister() v1beta1.VolumeSnapshotLister { + return v1beta1.NewVolumeSnapshotLister(f.Informer().GetIndexer()) } diff --git a/pkg/client/informers/externalversions/volumesnapshot/v1alpha1/volumesnapshotclass.go b/pkg/client/informers/externalversions/volumesnapshot/v1beta1/volumesnapshotclass.go similarity index 81% rename from pkg/client/informers/externalversions/volumesnapshot/v1alpha1/volumesnapshotclass.go rename to pkg/client/informers/externalversions/volumesnapshot/v1beta1/volumesnapshotclass.go index 0026e5572..800e12428 100644 --- a/pkg/client/informers/externalversions/volumesnapshot/v1alpha1/volumesnapshotclass.go +++ b/pkg/client/informers/externalversions/volumesnapshot/v1beta1/volumesnapshotclass.go @@ -16,15 +16,15 @@ limitations under the License. // Code generated by informer-gen. DO NOT EDIT. -package v1alpha1 +package v1beta1 import ( time "time" - volumesnapshotv1alpha1 "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1alpha1" + volumesnapshotv1beta1 "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1beta1" versioned "github.com/kubernetes-csi/external-snapshotter/pkg/client/clientset/versioned" internalinterfaces "github.com/kubernetes-csi/external-snapshotter/pkg/client/informers/externalversions/internalinterfaces" - v1alpha1 "github.com/kubernetes-csi/external-snapshotter/pkg/client/listers/volumesnapshot/v1alpha1" + v1beta1 "github.com/kubernetes-csi/external-snapshotter/pkg/client/listers/volumesnapshot/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -35,7 +35,7 @@ import ( // VolumeSnapshotClasses. type VolumeSnapshotClassInformer interface { Informer() cache.SharedIndexInformer - Lister() v1alpha1.VolumeSnapshotClassLister + Lister() v1beta1.VolumeSnapshotClassLister } type volumeSnapshotClassInformer struct { @@ -60,16 +60,16 @@ func NewFilteredVolumeSnapshotClassInformer(client versioned.Interface, resyncPe if tweakListOptions != nil { tweakListOptions(&options) } - return client.SnapshotV1alpha1().VolumeSnapshotClasses().List(options) + return client.SnapshotV1beta1().VolumeSnapshotClasses().List(options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.SnapshotV1alpha1().VolumeSnapshotClasses().Watch(options) + return client.SnapshotV1beta1().VolumeSnapshotClasses().Watch(options) }, }, - &volumesnapshotv1alpha1.VolumeSnapshotClass{}, + &volumesnapshotv1beta1.VolumeSnapshotClass{}, resyncPeriod, indexers, ) @@ -80,9 +80,9 @@ func (f *volumeSnapshotClassInformer) defaultInformer(client versioned.Interface } func (f *volumeSnapshotClassInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&volumesnapshotv1alpha1.VolumeSnapshotClass{}, f.defaultInformer) + return f.factory.InformerFor(&volumesnapshotv1beta1.VolumeSnapshotClass{}, f.defaultInformer) } -func (f *volumeSnapshotClassInformer) Lister() v1alpha1.VolumeSnapshotClassLister { - return v1alpha1.NewVolumeSnapshotClassLister(f.Informer().GetIndexer()) +func (f *volumeSnapshotClassInformer) Lister() v1beta1.VolumeSnapshotClassLister { + return v1beta1.NewVolumeSnapshotClassLister(f.Informer().GetIndexer()) } diff --git a/pkg/client/informers/externalversions/volumesnapshot/v1alpha1/volumesnapshotcontent.go b/pkg/client/informers/externalversions/volumesnapshot/v1beta1/volumesnapshotcontent.go similarity index 81% rename from pkg/client/informers/externalversions/volumesnapshot/v1alpha1/volumesnapshotcontent.go rename to pkg/client/informers/externalversions/volumesnapshot/v1beta1/volumesnapshotcontent.go index 2b34344d5..835292145 100644 --- a/pkg/client/informers/externalversions/volumesnapshot/v1alpha1/volumesnapshotcontent.go +++ b/pkg/client/informers/externalversions/volumesnapshot/v1beta1/volumesnapshotcontent.go @@ -16,15 +16,15 @@ limitations under the License. // Code generated by informer-gen. DO NOT EDIT. -package v1alpha1 +package v1beta1 import ( time "time" - volumesnapshotv1alpha1 "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1alpha1" + volumesnapshotv1beta1 "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1beta1" versioned "github.com/kubernetes-csi/external-snapshotter/pkg/client/clientset/versioned" internalinterfaces "github.com/kubernetes-csi/external-snapshotter/pkg/client/informers/externalversions/internalinterfaces" - v1alpha1 "github.com/kubernetes-csi/external-snapshotter/pkg/client/listers/volumesnapshot/v1alpha1" + v1beta1 "github.com/kubernetes-csi/external-snapshotter/pkg/client/listers/volumesnapshot/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -35,7 +35,7 @@ import ( // VolumeSnapshotContents. type VolumeSnapshotContentInformer interface { Informer() cache.SharedIndexInformer - Lister() v1alpha1.VolumeSnapshotContentLister + Lister() v1beta1.VolumeSnapshotContentLister } type volumeSnapshotContentInformer struct { @@ -60,16 +60,16 @@ func NewFilteredVolumeSnapshotContentInformer(client versioned.Interface, resync if tweakListOptions != nil { tweakListOptions(&options) } - return client.SnapshotV1alpha1().VolumeSnapshotContents().List(options) + return client.SnapshotV1beta1().VolumeSnapshotContents().List(options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.SnapshotV1alpha1().VolumeSnapshotContents().Watch(options) + return client.SnapshotV1beta1().VolumeSnapshotContents().Watch(options) }, }, - &volumesnapshotv1alpha1.VolumeSnapshotContent{}, + &volumesnapshotv1beta1.VolumeSnapshotContent{}, resyncPeriod, indexers, ) @@ -80,9 +80,9 @@ func (f *volumeSnapshotContentInformer) defaultInformer(client versioned.Interfa } func (f *volumeSnapshotContentInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&volumesnapshotv1alpha1.VolumeSnapshotContent{}, f.defaultInformer) + return f.factory.InformerFor(&volumesnapshotv1beta1.VolumeSnapshotContent{}, f.defaultInformer) } -func (f *volumeSnapshotContentInformer) Lister() v1alpha1.VolumeSnapshotContentLister { - return v1alpha1.NewVolumeSnapshotContentLister(f.Informer().GetIndexer()) +func (f *volumeSnapshotContentInformer) Lister() v1beta1.VolumeSnapshotContentLister { + return v1beta1.NewVolumeSnapshotContentLister(f.Informer().GetIndexer()) } diff --git a/pkg/client/listers/volumesnapshot/v1alpha1/expansion_generated.go b/pkg/client/listers/volumesnapshot/v1beta1/expansion_generated.go similarity index 98% rename from pkg/client/listers/volumesnapshot/v1alpha1/expansion_generated.go rename to pkg/client/listers/volumesnapshot/v1beta1/expansion_generated.go index f92624ed7..100865bcb 100644 --- a/pkg/client/listers/volumesnapshot/v1alpha1/expansion_generated.go +++ b/pkg/client/listers/volumesnapshot/v1beta1/expansion_generated.go @@ -16,7 +16,7 @@ limitations under the License. // Code generated by lister-gen. DO NOT EDIT. -package v1alpha1 +package v1beta1 // VolumeSnapshotListerExpansion allows custom methods to be added to // VolumeSnapshotLister. diff --git a/pkg/client/listers/volumesnapshot/v1alpha1/volumesnapshot.go b/pkg/client/listers/volumesnapshot/v1beta1/volumesnapshot.go similarity index 79% rename from pkg/client/listers/volumesnapshot/v1alpha1/volumesnapshot.go rename to pkg/client/listers/volumesnapshot/v1beta1/volumesnapshot.go index ffa8f16d8..4309a30e6 100644 --- a/pkg/client/listers/volumesnapshot/v1alpha1/volumesnapshot.go +++ b/pkg/client/listers/volumesnapshot/v1beta1/volumesnapshot.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/pkg/apis/volumesnapshot/v1alpha1" + v1beta1 "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1beta1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache" @@ -28,7 +28,7 @@ import ( // VolumeSnapshotLister helps list VolumeSnapshots. type VolumeSnapshotLister interface { // List lists all VolumeSnapshots in the indexer. - List(selector labels.Selector) (ret []*v1alpha1.VolumeSnapshot, err error) + List(selector labels.Selector) (ret []*v1beta1.VolumeSnapshot, err error) // VolumeSnapshots returns an object that can list and get VolumeSnapshots. VolumeSnapshots(namespace string) VolumeSnapshotNamespaceLister VolumeSnapshotListerExpansion @@ -45,9 +45,9 @@ func NewVolumeSnapshotLister(indexer cache.Indexer) VolumeSnapshotLister { } // List lists all VolumeSnapshots in the indexer. -func (s *volumeSnapshotLister) List(selector labels.Selector) (ret []*v1alpha1.VolumeSnapshot, err error) { +func (s *volumeSnapshotLister) List(selector labels.Selector) (ret []*v1beta1.VolumeSnapshot, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1alpha1.VolumeSnapshot)) + ret = append(ret, m.(*v1beta1.VolumeSnapshot)) }) return ret, err } @@ -60,9 +60,9 @@ func (s *volumeSnapshotLister) VolumeSnapshots(namespace string) VolumeSnapshotN // VolumeSnapshotNamespaceLister helps list and get VolumeSnapshots. type VolumeSnapshotNamespaceLister interface { // List lists all VolumeSnapshots in the indexer for a given namespace. - List(selector labels.Selector) (ret []*v1alpha1.VolumeSnapshot, err error) + List(selector labels.Selector) (ret []*v1beta1.VolumeSnapshot, err error) // Get retrieves the VolumeSnapshot from the indexer for a given namespace and name. - Get(name string) (*v1alpha1.VolumeSnapshot, error) + Get(name string) (*v1beta1.VolumeSnapshot, error) VolumeSnapshotNamespaceListerExpansion } @@ -74,21 +74,21 @@ type volumeSnapshotNamespaceLister struct { } // List lists all VolumeSnapshots in the indexer for a given namespace. -func (s volumeSnapshotNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.VolumeSnapshot, err error) { +func (s volumeSnapshotNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.VolumeSnapshot, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*v1alpha1.VolumeSnapshot)) + ret = append(ret, m.(*v1beta1.VolumeSnapshot)) }) return ret, err } // Get retrieves the VolumeSnapshot from the indexer for a given namespace and name. -func (s volumeSnapshotNamespaceLister) Get(name string) (*v1alpha1.VolumeSnapshot, error) { +func (s volumeSnapshotNamespaceLister) Get(name string) (*v1beta1.VolumeSnapshot, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err } if !exists { - return nil, errors.NewNotFound(v1alpha1.Resource("volumesnapshot"), name) + return nil, errors.NewNotFound(v1beta1.Resource("volumesnapshot"), name) } - return obj.(*v1alpha1.VolumeSnapshot), nil + return obj.(*v1beta1.VolumeSnapshot), nil } diff --git a/pkg/client/listers/volumesnapshot/v1alpha1/volumesnapshotclass.go b/pkg/client/listers/volumesnapshot/v1beta1/volumesnapshotclass.go similarity index 75% rename from pkg/client/listers/volumesnapshot/v1alpha1/volumesnapshotclass.go rename to pkg/client/listers/volumesnapshot/v1beta1/volumesnapshotclass.go index 505d397bf..2d56d5d54 100644 --- a/pkg/client/listers/volumesnapshot/v1alpha1/volumesnapshotclass.go +++ b/pkg/client/listers/volumesnapshot/v1beta1/volumesnapshotclass.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/pkg/apis/volumesnapshot/v1alpha1" + v1beta1 "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1beta1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache" @@ -28,9 +28,9 @@ import ( // VolumeSnapshotClassLister helps list VolumeSnapshotClasses. type VolumeSnapshotClassLister interface { // List lists all VolumeSnapshotClasses in the indexer. - List(selector labels.Selector) (ret []*v1alpha1.VolumeSnapshotClass, err error) + List(selector labels.Selector) (ret []*v1beta1.VolumeSnapshotClass, err error) // Get retrieves the VolumeSnapshotClass from the index for a given name. - Get(name string) (*v1alpha1.VolumeSnapshotClass, error) + Get(name string) (*v1beta1.VolumeSnapshotClass, error) VolumeSnapshotClassListerExpansion } @@ -45,21 +45,21 @@ func NewVolumeSnapshotClassLister(indexer cache.Indexer) VolumeSnapshotClassList } // List lists all VolumeSnapshotClasses in the indexer. -func (s *volumeSnapshotClassLister) List(selector labels.Selector) (ret []*v1alpha1.VolumeSnapshotClass, err error) { +func (s *volumeSnapshotClassLister) List(selector labels.Selector) (ret []*v1beta1.VolumeSnapshotClass, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1alpha1.VolumeSnapshotClass)) + ret = append(ret, m.(*v1beta1.VolumeSnapshotClass)) }) return ret, err } // Get retrieves the VolumeSnapshotClass from the index for a given name. -func (s *volumeSnapshotClassLister) Get(name string) (*v1alpha1.VolumeSnapshotClass, error) { +func (s *volumeSnapshotClassLister) Get(name string) (*v1beta1.VolumeSnapshotClass, error) { obj, exists, err := s.indexer.GetByKey(name) if err != nil { return nil, err } if !exists { - return nil, errors.NewNotFound(v1alpha1.Resource("volumesnapshotclass"), name) + return nil, errors.NewNotFound(v1beta1.Resource("volumesnapshotclass"), name) } - return obj.(*v1alpha1.VolumeSnapshotClass), nil + return obj.(*v1beta1.VolumeSnapshotClass), nil } diff --git a/pkg/client/listers/volumesnapshot/v1alpha1/volumesnapshotcontent.go b/pkg/client/listers/volumesnapshot/v1beta1/volumesnapshotcontent.go similarity index 74% rename from pkg/client/listers/volumesnapshot/v1alpha1/volumesnapshotcontent.go rename to pkg/client/listers/volumesnapshot/v1beta1/volumesnapshotcontent.go index 97d4e90aa..87edbc8fc 100644 --- a/pkg/client/listers/volumesnapshot/v1alpha1/volumesnapshotcontent.go +++ b/pkg/client/listers/volumesnapshot/v1beta1/volumesnapshotcontent.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/pkg/apis/volumesnapshot/v1alpha1" + v1beta1 "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1beta1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache" @@ -28,9 +28,9 @@ import ( // VolumeSnapshotContentLister helps list VolumeSnapshotContents. type VolumeSnapshotContentLister interface { // List lists all VolumeSnapshotContents in the indexer. - List(selector labels.Selector) (ret []*v1alpha1.VolumeSnapshotContent, err error) + List(selector labels.Selector) (ret []*v1beta1.VolumeSnapshotContent, err error) // Get retrieves the VolumeSnapshotContent from the index for a given name. - Get(name string) (*v1alpha1.VolumeSnapshotContent, error) + Get(name string) (*v1beta1.VolumeSnapshotContent, error) VolumeSnapshotContentListerExpansion } @@ -45,21 +45,21 @@ func NewVolumeSnapshotContentLister(indexer cache.Indexer) VolumeSnapshotContent } // List lists all VolumeSnapshotContents in the indexer. -func (s *volumeSnapshotContentLister) List(selector labels.Selector) (ret []*v1alpha1.VolumeSnapshotContent, err error) { +func (s *volumeSnapshotContentLister) List(selector labels.Selector) (ret []*v1beta1.VolumeSnapshotContent, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1alpha1.VolumeSnapshotContent)) + ret = append(ret, m.(*v1beta1.VolumeSnapshotContent)) }) return ret, err } // Get retrieves the VolumeSnapshotContent from the index for a given name. -func (s *volumeSnapshotContentLister) Get(name string) (*v1alpha1.VolumeSnapshotContent, error) { +func (s *volumeSnapshotContentLister) Get(name string) (*v1beta1.VolumeSnapshotContent, error) { obj, exists, err := s.indexer.GetByKey(name) if err != nil { return nil, err } if !exists { - return nil, errors.NewNotFound(v1alpha1.Resource("volumesnapshotcontent"), name) + return nil, errors.NewNotFound(v1beta1.Resource("volumesnapshotcontent"), name) } - return obj.(*v1alpha1.VolumeSnapshotContent), nil + return obj.(*v1beta1.VolumeSnapshotContent), nil } diff --git a/pkg/controller/csi_handler.go b/pkg/controller/csi_handler.go index 3b3a9000a..881f8a7b1 100644 --- a/pkg/controller/csi_handler.go +++ b/pkg/controller/csi_handler.go @@ -22,7 +22,7 @@ import ( "strings" "time" - crdv1 "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1alpha1" + crdv1 "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1beta1" "github.com/kubernetes-csi/external-snapshotter/pkg/snapshotter" "k8s.io/api/core/v1" diff --git a/pkg/controller/framework_test.go b/pkg/controller/framework_test.go index a197d82c2..cf5c4e859 100644 --- a/pkg/controller/framework_test.go +++ b/pkg/controller/framework_test.go @@ -29,12 +29,12 @@ import ( "testing" "time" - crdv1 "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1alpha1" + crdv1 "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1beta1" clientset "github.com/kubernetes-csi/external-snapshotter/pkg/client/clientset/versioned" "github.com/kubernetes-csi/external-snapshotter/pkg/client/clientset/versioned/fake" snapshotscheme "github.com/kubernetes-csi/external-snapshotter/pkg/client/clientset/versioned/scheme" informers "github.com/kubernetes-csi/external-snapshotter/pkg/client/informers/externalversions" - storagelisters "github.com/kubernetes-csi/external-snapshotter/pkg/client/listers/volumesnapshot/v1alpha1" + storagelisters "github.com/kubernetes-csi/external-snapshotter/pkg/client/listers/volumesnapshot/v1beta1" "k8s.io/api/core/v1" storagev1 "k8s.io/api/storage/v1" storagev1beta1 "k8s.io/api/storage/v1beta1" @@ -766,9 +766,9 @@ func newTestController(kubeClient kubernetes.Interface, clientset clientset.Inte clientset, kubeClient, mockDriverName, - informerFactory.Snapshot().V1alpha1().VolumeSnapshots(), - informerFactory.Snapshot().V1alpha1().VolumeSnapshotContents(), - informerFactory.Snapshot().V1alpha1().VolumeSnapshotClasses(), + informerFactory.Snapshot().V1beta1().VolumeSnapshots(), + informerFactory.Snapshot().V1beta1().VolumeSnapshotContents(), + informerFactory.Snapshot().V1beta1().VolumeSnapshotClasses(), coreFactory.Core().V1().PersistentVolumeClaims(), 3, 5*time.Millisecond, @@ -820,7 +820,7 @@ func newContent(name, className, snapshotHandle, volumeUID, volumeName, boundToS if boundToSnapshotName != "" { content.Spec.VolumeSnapshotRef = &v1.ObjectReference{ Kind: "VolumeSnapshot", - APIVersion: "snapshot.storage.k8s.io/v1alpha1", + APIVersion: "snapshot.storage.k8s.io/v1beta1", UID: types.UID(boundToSnapshotUID), Namespace: testNamespace, Name: boundToSnapshotName, @@ -854,7 +854,7 @@ func newSnapshot(name, className, boundToContent, snapshotUID, claimName string, Namespace: testNamespace, UID: types.UID(snapshotUID), ResourceVersion: "1", - SelfLink: "/apis/snapshot.storage.k8s.io/v1alpha1/namespaces/" + testNamespace + "/volumesnapshots/" + name, + SelfLink: "/apis/snapshot.storage.k8s.io/v1beta1/namespaces/" + testNamespace + "/volumesnapshots/" + name, }, Spec: crdv1.VolumeSnapshotSpec{ VolumeSnapshotClassName: &className, diff --git a/pkg/controller/snapshot_controller.go b/pkg/controller/snapshot_controller.go index 5333c63f4..9f102d9cf 100644 --- a/pkg/controller/snapshot_controller.go +++ b/pkg/controller/snapshot_controller.go @@ -21,7 +21,7 @@ import ( "strings" "time" - crdv1 "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1alpha1" + crdv1 "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1beta1" "k8s.io/api/core/v1" storagev1 "k8s.io/api/storage/v1" storage "k8s.io/api/storage/v1beta1" @@ -423,7 +423,7 @@ func (ctrl *csiSnapshotController) updateSnapshotErrorStatusWithEvent(snapshot * } snapshotClone.Status.Error = statusError snapshotClone.Status.ReadyToUse = false - newSnapshot, err := ctrl.clientset.SnapshotV1alpha1().VolumeSnapshots(snapshotClone.Namespace).UpdateStatus(snapshotClone) + newSnapshot, err := ctrl.clientset.SnapshotV1beta1().VolumeSnapshots(snapshotClone.Namespace).UpdateStatus(snapshotClone) if err != nil { klog.V(4).Infof("updating VolumeSnapshot[%s] error status failed %v", snapshotKey(snapshot), err) @@ -458,7 +458,7 @@ func IsSnapshotBound(snapshot *crdv1.VolumeSnapshot, content *crdv1.VolumeSnapsh // isSnapshotConentBeingUsed checks if snapshot content is bound to snapshot. func (ctrl *csiSnapshotController) isSnapshotContentBeingUsed(content *crdv1.VolumeSnapshotContent) bool { if content.Spec.VolumeSnapshotRef != nil { - snapshotObj, err := ctrl.clientset.SnapshotV1alpha1().VolumeSnapshots(content.Spec.VolumeSnapshotRef.Namespace).Get(content.Spec.VolumeSnapshotRef.Name, metav1.GetOptions{}) + snapshotObj, err := ctrl.clientset.SnapshotV1beta1().VolumeSnapshots(content.Spec.VolumeSnapshotRef.Namespace).Get(content.Spec.VolumeSnapshotRef.Name, metav1.GetOptions{}) if err != nil { klog.Infof("isSnapshotContentBeingUsed: Cannot get snapshot %s from api server: [%v]. VolumeSnapshot object may be deleted already.", content.Spec.VolumeSnapshotRef.Name, err) return false @@ -510,7 +510,7 @@ func (ctrl *csiSnapshotController) checkandBindSnapshotContent(snapshot *crdv1.V contentClone.Spec.VolumeSnapshotRef.UID = snapshot.UID className := *(snapshot.Spec.VolumeSnapshotClassName) contentClone.Spec.VolumeSnapshotClassName = &className - newContent, err := ctrl.clientset.SnapshotV1alpha1().VolumeSnapshotContents().Update(contentClone) + newContent, err := ctrl.clientset.SnapshotV1beta1().VolumeSnapshotContents().Update(contentClone) if err != nil { klog.V(4).Infof("updating VolumeSnapshotContent[%s] error status failed %v", newContent.Name, err) return nil, err @@ -691,7 +691,7 @@ func (ctrl *csiSnapshotController) createSnapshotOperation(snapshot *crdv1.Volum // Try to create the VolumeSnapshotContent object several times for i := 0; i < ctrl.createSnapshotContentRetryCount; i++ { klog.V(5).Infof("createSnapshot [%s]: trying to save volume snapshot content %s", snapshotKey(snapshot), snapshotContent.Name) - if _, err = ctrl.clientset.SnapshotV1alpha1().VolumeSnapshotContents().Create(snapshotContent); err == nil || apierrs.IsAlreadyExists(err) { + if _, err = ctrl.clientset.SnapshotV1beta1().VolumeSnapshotContents().Create(snapshotContent); err == nil || apierrs.IsAlreadyExists(err) { // Save succeeded. if err != nil { klog.V(3).Infof("volume snapshot content %q for snapshot %q already exists, reusing", snapshotContent.Name, snapshotKey(snapshot)) @@ -758,7 +758,7 @@ func (ctrl *csiSnapshotController) deleteSnapshotContentOperation(content *crdv1 return fmt.Errorf("failed to delete snapshot %#v, err: %v", content.Name, err) } - err = ctrl.clientset.SnapshotV1alpha1().VolumeSnapshotContents().Delete(content.Name, &metav1.DeleteOptions{}) + err = ctrl.clientset.SnapshotV1beta1().VolumeSnapshotContents().Delete(content.Name, &metav1.DeleteOptions{}) if err != nil { ctrl.eventRecorder.Event(content, v1.EventTypeWarning, "SnapshotContentObjectDeleteError", "Failed to delete snapshot content API object") return fmt.Errorf("failed to delete VolumeSnapshotContent %s from API server: %q", content.Name, err) @@ -769,7 +769,7 @@ func (ctrl *csiSnapshotController) deleteSnapshotContentOperation(content *crdv1 func (ctrl *csiSnapshotController) bindandUpdateVolumeSnapshot(snapshotContent *crdv1.VolumeSnapshotContent, snapshot *crdv1.VolumeSnapshot) (*crdv1.VolumeSnapshot, error) { klog.V(5).Infof("bindandUpdateVolumeSnapshot for snapshot [%s]: snapshotContent [%s]", snapshot.Name, snapshotContent.Name) - snapshotObj, err := ctrl.clientset.SnapshotV1alpha1().VolumeSnapshots(snapshot.Namespace).Get(snapshot.Name, metav1.GetOptions{}) + snapshotObj, err := ctrl.clientset.SnapshotV1beta1().VolumeSnapshots(snapshot.Namespace).Get(snapshot.Name, metav1.GetOptions{}) if err != nil { return nil, fmt.Errorf("error get snapshot %s from api server: %v", snapshotKey(snapshot), err) } @@ -782,7 +782,7 @@ func (ctrl *csiSnapshotController) bindandUpdateVolumeSnapshot(snapshotContent * } else { klog.Infof("bindVolumeSnapshotContentToVolumeSnapshot: before bind VolumeSnapshot %s to volumeSnapshotContent [%s]", snapshot.Name, snapshotContent.Name) snapshotCopy.Spec.SnapshotContentName = snapshotContent.Name - updateSnapshot, err := ctrl.clientset.SnapshotV1alpha1().VolumeSnapshots(snapshot.Namespace).Update(snapshotCopy) + updateSnapshot, err := ctrl.clientset.SnapshotV1beta1().VolumeSnapshots(snapshot.Namespace).Update(snapshotCopy) if err != nil { klog.Infof("bindVolumeSnapshotContentToVolumeSnapshot: Error binding VolumeSnapshot %s to volumeSnapshotContent [%s]. Error [%#v]", snapshot.Name, snapshotContent.Name, err) return nil, newControllerUpdateError(snapshotKey(snapshot), err.Error()) @@ -808,7 +808,7 @@ func (ctrl *csiSnapshotController) updateSnapshotContentSize(content *crdv1.Volu } contentClone := content.DeepCopy() contentClone.Spec.VolumeSnapshotSource.CSI.RestoreSize = &size - _, err := ctrl.clientset.SnapshotV1alpha1().VolumeSnapshotContents().Update(contentClone) + _, err := ctrl.clientset.SnapshotV1beta1().VolumeSnapshotContents().Update(contentClone) if err != nil { return newControllerUpdateError(content.Name, err.Error()) } @@ -848,7 +848,7 @@ func (ctrl *csiSnapshotController) updateSnapshotStatus(snapshot *crdv1.VolumeSn status.RestoreSize = resource.NewQuantity(size, resource.BinarySI) } snapshotClone.Status = status - newSnapshotObj, err := ctrl.clientset.SnapshotV1alpha1().VolumeSnapshots(snapshotClone.Namespace).UpdateStatus(snapshotClone) + newSnapshotObj, err := ctrl.clientset.SnapshotV1beta1().VolumeSnapshots(snapshotClone.Namespace).UpdateStatus(snapshotClone) if err != nil { return nil, newControllerUpdateError(snapshotKey(snapshot), err.Error()) } @@ -949,7 +949,7 @@ func (ctrl *csiSnapshotController) SetDefaultSnapshotClass(snapshot *crdv1.Volum klog.V(5).Infof("setDefaultSnapshotClass [%s]: default VolumeSnapshotClassName [%s]", snapshot.Name, defaultClasses[0].Name) snapshotClone := snapshot.DeepCopy() snapshotClone.Spec.VolumeSnapshotClassName = &(defaultClasses[0].Name) - newSnapshot, err := ctrl.clientset.SnapshotV1alpha1().VolumeSnapshots(snapshotClone.Namespace).Update(snapshotClone) + newSnapshot, err := ctrl.clientset.SnapshotV1beta1().VolumeSnapshots(snapshotClone.Namespace).Update(snapshotClone) if err != nil { klog.V(4).Infof("updating VolumeSnapshot[%s] default class failed %v", snapshotKey(snapshot), err) } @@ -1016,7 +1016,7 @@ func (ctrl *csiSnapshotController) addContentFinalizer(content *crdv1.VolumeSnap contentClone := content.DeepCopy() contentClone.ObjectMeta.Finalizers = append(contentClone.ObjectMeta.Finalizers, VolumeSnapshotContentFinalizer) - _, err := ctrl.clientset.SnapshotV1alpha1().VolumeSnapshotContents().Update(contentClone) + _, err := ctrl.clientset.SnapshotV1beta1().VolumeSnapshotContents().Update(contentClone) if err != nil { return newControllerUpdateError(content.Name, err.Error()) } @@ -1035,7 +1035,7 @@ func (ctrl *csiSnapshotController) removeContentFinalizer(content *crdv1.VolumeS contentClone := content.DeepCopy() contentClone.ObjectMeta.Finalizers = slice.RemoveString(contentClone.ObjectMeta.Finalizers, VolumeSnapshotContentFinalizer, nil) - _, err := ctrl.clientset.SnapshotV1alpha1().VolumeSnapshotContents().Update(contentClone) + _, err := ctrl.clientset.SnapshotV1beta1().VolumeSnapshotContents().Update(contentClone) if err != nil { return newControllerUpdateError(content.Name, err.Error()) } @@ -1053,7 +1053,7 @@ func (ctrl *csiSnapshotController) removeContentFinalizer(content *crdv1.VolumeS func (ctrl *csiSnapshotController) addSnapshotFinalizer(snapshot *crdv1.VolumeSnapshot) error { snapshotClone := snapshot.DeepCopy() snapshotClone.ObjectMeta.Finalizers = append(snapshotClone.ObjectMeta.Finalizers, VolumeSnapshotFinalizer) - _, err := ctrl.clientset.SnapshotV1alpha1().VolumeSnapshots(snapshotClone.Namespace).Update(snapshotClone) + _, err := ctrl.clientset.SnapshotV1beta1().VolumeSnapshots(snapshotClone.Namespace).Update(snapshotClone) if err != nil { return newControllerUpdateError(snapshot.Name, err.Error()) } @@ -1072,7 +1072,7 @@ func (ctrl *csiSnapshotController) removeSnapshotFinalizer(snapshot *crdv1.Volum snapshotClone := snapshot.DeepCopy() snapshotClone.ObjectMeta.Finalizers = slice.RemoveString(snapshotClone.ObjectMeta.Finalizers, VolumeSnapshotFinalizer, nil) - _, err := ctrl.clientset.SnapshotV1alpha1().VolumeSnapshots(snapshotClone.Namespace).Update(snapshotClone) + _, err := ctrl.clientset.SnapshotV1beta1().VolumeSnapshots(snapshotClone.Namespace).Update(snapshotClone) if err != nil { return newControllerUpdateError(snapshot.Name, err.Error()) } diff --git a/pkg/controller/snapshot_controller_base.go b/pkg/controller/snapshot_controller_base.go index 5458b1bcf..286adc5a2 100644 --- a/pkg/controller/snapshot_controller_base.go +++ b/pkg/controller/snapshot_controller_base.go @@ -20,10 +20,10 @@ import ( "fmt" "time" - crdv1 "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1alpha1" + crdv1 "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1beta1" clientset "github.com/kubernetes-csi/external-snapshotter/pkg/client/clientset/versioned" - storageinformers "github.com/kubernetes-csi/external-snapshotter/pkg/client/informers/externalversions/volumesnapshot/v1alpha1" - storagelisters "github.com/kubernetes-csi/external-snapshotter/pkg/client/listers/volumesnapshot/v1alpha1" + storageinformers "github.com/kubernetes-csi/external-snapshotter/pkg/client/informers/externalversions/volumesnapshot/v1beta1" + storagelisters "github.com/kubernetes-csi/external-snapshotter/pkg/client/listers/volumesnapshot/v1beta1" "github.com/kubernetes-csi/external-snapshotter/pkg/snapshotter" "k8s.io/api/core/v1" diff --git a/pkg/controller/snapshot_controller_test.go b/pkg/controller/snapshot_controller_test.go index 625f9d700..c8c41a021 100644 --- a/pkg/controller/snapshot_controller_test.go +++ b/pkg/controller/snapshot_controller_test.go @@ -17,7 +17,7 @@ limitations under the License. package controller import ( - crdv1 "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1alpha1" + crdv1 "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1beta1" "k8s.io/client-go/tools/cache" "testing" ) diff --git a/pkg/controller/snapshot_create_test.go b/pkg/controller/snapshot_create_test.go index 53358b238..385cf79c7 100644 --- a/pkg/controller/snapshot_create_test.go +++ b/pkg/controller/snapshot_create_test.go @@ -21,7 +21,7 @@ import ( "testing" "time" - crdv1 "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1alpha1" + crdv1 "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1beta1" "k8s.io/api/core/v1" storage "k8s.io/api/storage/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -327,7 +327,7 @@ func TestCreateSnapshotSync(t *testing.T) { }, }, errors: []reactorError{ - // Inject error to the forth client.VolumesnapshotV1alpha1().VolumeSnapshots().Update call. + // Inject error to the forth client.VolumesnapshotV1beta1().VolumeSnapshots().Update call. // All other calls will succeed. {"update", "volumesnapshots", errors.New("mock update error")}, {"update", "volumesnapshots", errors.New("mock update error")}, diff --git a/pkg/controller/snapshot_delete_test.go b/pkg/controller/snapshot_delete_test.go index 6be2be119..1f5878ee0 100644 --- a/pkg/controller/snapshot_delete_test.go +++ b/pkg/controller/snapshot_delete_test.go @@ -20,7 +20,7 @@ import ( "errors" "testing" - crdv1 "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1alpha1" + crdv1 "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1beta1" "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -195,7 +195,7 @@ func TestDeleteSync(t *testing.T) { expectedDeleteCalls: []deleteCall{{"sid1-6", map[string]string{"foo": "bar"}, nil}}, expectedEvents: []string{"Warning SnapshotContentObjectDeleteError"}, errors: []reactorError{ - // Inject error to the first client.VolumesnapshotV1alpha1().VolumeSnapshotContents().Delete call. + // Inject error to the first client.VolumesnapshotV1beta1().VolumeSnapshotContents().Delete call. // All other calls will succeed. {"delete", "volumesnapshotcontents", errors.New("mock delete error")}, }, diff --git a/pkg/controller/snapshot_ready_test.go b/pkg/controller/snapshot_ready_test.go index 1ccb6bd90..01223e8e0 100644 --- a/pkg/controller/snapshot_ready_test.go +++ b/pkg/controller/snapshot_ready_test.go @@ -186,7 +186,7 @@ func TestSync(t *testing.T) { }, }, errors: []reactorError{ - // Inject error to the first client.VolumesnapshotV1alpha1().VolumeSnapshots().Update call. + // Inject error to the first client.VolumesnapshotV1beta1().VolumeSnapshots().Update call. // All other calls will succeed. {"update", "volumesnapshots", errors.New("mock update error")}, }, diff --git a/pkg/controller/util.go b/pkg/controller/util.go index b91f32591..22e491b25 100644 --- a/pkg/controller/util.go +++ b/pkg/controller/util.go @@ -20,7 +20,7 @@ import ( "fmt" "strings" - crdv1 "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1alpha1" + crdv1 "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1beta1" "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/pkg/controller/util_test.go b/pkg/controller/util_test.go index 4da945761..a73c3ab3f 100644 --- a/pkg/controller/util_test.go +++ b/pkg/controller/util_test.go @@ -17,7 +17,7 @@ limitations under the License. package controller import ( - crdv1 "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1alpha1" + crdv1 "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1beta1" "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "reflect"