mirror of
https://github.com/TECHNOFAB11/zfs-localpv.git
synced 2025-12-12 06:20:11 +01:00
feat(beta): autogen code for v1 CRDs
Signed-off-by: Pawan <pawan@mayadata.io>
This commit is contained in:
parent
472fd603ac
commit
1e23607d8a
22 changed files with 433 additions and 212 deletions
|
|
@ -21,7 +21,7 @@ package externalversions
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
v1alpha1 "github.com/openebs/zfs-localpv/pkg/apis/openebs.io/zfs/v1alpha1"
|
||||
v1 "github.com/openebs/zfs-localpv/pkg/apis/openebs.io/zfs/v1"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
|
@ -52,11 +52,11 @@ 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=zfs.openebs.io, Version=v1alpha1
|
||||
case v1alpha1.SchemeGroupVersion.WithResource("zfssnapshots"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Zfs().V1alpha1().ZFSSnapshots().Informer()}, nil
|
||||
case v1alpha1.SchemeGroupVersion.WithResource("zfsvolumes"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Zfs().V1alpha1().ZFSVolumes().Informer()}, nil
|
||||
// Group=zfs.openebs.io, Version=v1
|
||||
case v1.SchemeGroupVersion.WithResource("zfssnapshots"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Zfs().V1().ZFSSnapshots().Informer()}, nil
|
||||
case v1.SchemeGroupVersion.WithResource("zfsvolumes"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Zfs().V1().ZFSVolumes().Informer()}, nil
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue