Update VolumeSnapshot CRD version to v1beta

preserveUnknownField set to false, comments updates, adding pull request annotation
more comment updates
VolumeSnapshot comments
rename to VolumeSnapshotClassName
adding license
This commit is contained in:
Xing Yang
2019-07-11 12:32:07 -07:00
committed by xiangqian
parent 6fa4d49620
commit 0c1faac468
78 changed files with 1778 additions and 14457 deletions

View File

@@ -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
}

View File

@@ -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)
}

View File

@@ -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"

View File

@@ -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())
}

View File

@@ -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())
}

View File

@@ -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())
}