diff --git a/pkg/klb-crds/loxiurl/v1/doc.go b/pkg/crds/loxiurl/v1/doc.go similarity index 100% rename from pkg/klb-crds/loxiurl/v1/doc.go rename to pkg/crds/loxiurl/v1/doc.go diff --git a/pkg/crds/loxiurl/v1/register.go b/pkg/crds/loxiurl/v1/register.go new file mode 100644 index 0000000..b5e191f --- /dev/null +++ b/pkg/crds/loxiurl/v1/register.go @@ -0,0 +1,31 @@ +package v1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +const GroupName = "loxiurl.loxilb.io" + +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"} + +var ( + SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) + AddToScheme = SchemeBuilder.AddToScheme +) + +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} + +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes( + SchemeGroupVersion, + &LoxiURL{}, + &LoxiURLList{}, + ) + + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) + return nil +} diff --git a/pkg/klb-crds/loxiurl/v1/types.go b/pkg/crds/loxiurl/v1/types.go similarity index 97% rename from pkg/klb-crds/loxiurl/v1/types.go rename to pkg/crds/loxiurl/v1/types.go index 15a47ff..5bfd4d8 100644 --- a/pkg/klb-crds/loxiurl/v1/types.go +++ b/pkg/crds/loxiurl/v1/types.go @@ -34,7 +34,7 @@ type LoxiURL struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - Spec LoxiURLSpec `json:"spec"` + Spec LoxiURLSpec `json:"spec"` Status LoxiURLSpecStatus `json:"status,omitempty"` } diff --git a/pkg/klb-crds/loxiurl/v1/zz_generated.deepcopy.go b/pkg/crds/loxiurl/v1/zz_generated.deepcopy.go similarity index 100% rename from pkg/klb-crds/loxiurl/v1/zz_generated.deepcopy.go rename to pkg/crds/loxiurl/v1/zz_generated.deepcopy.go diff --git a/pkg/klb-client/clientset/versioned/clientset.go b/pkg/klb-client/clientset/versioned/clientset.go index 9502fc1..bfd6abe 100644 --- a/pkg/klb-client/clientset/versioned/clientset.go +++ b/pkg/klb-client/clientset/versioned/clientset.go @@ -22,10 +22,10 @@ import ( fmt "fmt" http "net/http" + loxiurlv1 "github.com/loxilb-io/kube-loxilb/pkg/klb-client/clientset/versioned/typed/loxiurl/v1" discovery "k8s.io/client-go/discovery" rest "k8s.io/client-go/rest" flowcontrol "k8s.io/client-go/util/flowcontrol" - loxiurlv1 "github.com/loxilb-io/kube-loxilb/pkg/klb-client/clientset/versioned/typed/loxiurl/v1" ) type Interface interface { diff --git a/pkg/klb-client/clientset/versioned/fake/clientset_generated.go b/pkg/klb-client/clientset/versioned/fake/clientset_generated.go index 2ac0f17..52f4eba 100644 --- a/pkg/klb-client/clientset/versioned/fake/clientset_generated.go +++ b/pkg/klb-client/clientset/versioned/fake/clientset_generated.go @@ -19,14 +19,14 @@ limitations under the License. package fake import ( + clientset "github.com/loxilb-io/kube-loxilb/pkg/klb-client/clientset/versioned" + loxiurlv1 "github.com/loxilb-io/kube-loxilb/pkg/klb-client/clientset/versioned/typed/loxiurl/v1" + fakeloxiurlv1 "github.com/loxilb-io/kube-loxilb/pkg/klb-client/clientset/versioned/typed/loxiurl/v1/fake" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/watch" "k8s.io/client-go/discovery" fakediscovery "k8s.io/client-go/discovery/fake" "k8s.io/client-go/testing" - clientset "github.com/loxilb-io/kube-loxilb/pkg/klb-client/clientset/versioned" - loxiurlv1 "github.com/loxilb-io/kube-loxilb/pkg/klb-client/clientset/versioned/typed/loxiurl/v1" - fakeloxiurlv1 "github.com/loxilb-io/kube-loxilb/pkg/klb-client/clientset/versioned/typed/loxiurl/v1/fake" ) // NewSimpleClientset returns a clientset that will respond with the provided objects. diff --git a/pkg/klb-client/clientset/versioned/fake/register.go b/pkg/klb-client/clientset/versioned/fake/register.go index 527953b..6d6dce6 100644 --- a/pkg/klb-client/clientset/versioned/fake/register.go +++ b/pkg/klb-client/clientset/versioned/fake/register.go @@ -19,12 +19,12 @@ limitations under the License. package fake import ( + loxiurlv1 "github.com/loxilb-io/kube-loxilb/pkg/crds/loxiurl/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" serializer "k8s.io/apimachinery/pkg/runtime/serializer" utilruntime "k8s.io/apimachinery/pkg/util/runtime" - loxiurlv1 "github.com/loxilb-io/kube-loxilb/pkg/klb-crds/loxiurl/v1" ) var scheme = runtime.NewScheme() diff --git a/pkg/klb-client/clientset/versioned/scheme/register.go b/pkg/klb-client/clientset/versioned/scheme/register.go index c89620a..825e3f2 100644 --- a/pkg/klb-client/clientset/versioned/scheme/register.go +++ b/pkg/klb-client/clientset/versioned/scheme/register.go @@ -19,12 +19,12 @@ limitations under the License. package scheme import ( + loxiurlv1 "github.com/loxilb-io/kube-loxilb/pkg/crds/loxiurl/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" serializer "k8s.io/apimachinery/pkg/runtime/serializer" utilruntime "k8s.io/apimachinery/pkg/util/runtime" - loxiurlv1 "github.com/loxilb-io/kube-loxilb/pkg/klb-crds/loxiurl/v1" ) var Scheme = runtime.NewScheme() diff --git a/pkg/klb-client/clientset/versioned/typed/loxiurl/v1/fake/fake_loxiurl.go b/pkg/klb-client/clientset/versioned/typed/loxiurl/v1/fake/fake_loxiurl.go index 1912e42..9d813c2 100644 --- a/pkg/klb-client/clientset/versioned/typed/loxiurl/v1/fake/fake_loxiurl.go +++ b/pkg/klb-client/clientset/versioned/typed/loxiurl/v1/fake/fake_loxiurl.go @@ -21,12 +21,12 @@ package fake import ( context "context" + v1 "github.com/loxilb-io/kube-loxilb/pkg/crds/loxiurl/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" - v1 "github.com/loxilb-io/kube-loxilb/pkg/klb-crds/loxiurl/v1" ) // FakeLoxiURLs implements LoxiURLInterface diff --git a/pkg/klb-client/clientset/versioned/typed/loxiurl/v1/fake/fake_loxiurl_client.go b/pkg/klb-client/clientset/versioned/typed/loxiurl/v1/fake/fake_loxiurl_client.go index 10ecf20..8171dda 100644 --- a/pkg/klb-client/clientset/versioned/typed/loxiurl/v1/fake/fake_loxiurl_client.go +++ b/pkg/klb-client/clientset/versioned/typed/loxiurl/v1/fake/fake_loxiurl_client.go @@ -19,9 +19,9 @@ limitations under the License. package fake import ( + v1 "github.com/loxilb-io/kube-loxilb/pkg/klb-client/clientset/versioned/typed/loxiurl/v1" rest "k8s.io/client-go/rest" testing "k8s.io/client-go/testing" - v1 "github.com/loxilb-io/kube-loxilb/pkg/klb-client/clientset/versioned/typed/loxiurl/v1" ) type FakeLoxiurlV1 struct { diff --git a/pkg/klb-client/clientset/versioned/typed/loxiurl/v1/loxiurl.go b/pkg/klb-client/clientset/versioned/typed/loxiurl/v1/loxiurl.go index 9b3c689..ebf3d30 100644 --- a/pkg/klb-client/clientset/versioned/typed/loxiurl/v1/loxiurl.go +++ b/pkg/klb-client/clientset/versioned/typed/loxiurl/v1/loxiurl.go @@ -21,12 +21,12 @@ package v1 import ( context "context" + loxiurlv1 "github.com/loxilb-io/kube-loxilb/pkg/crds/loxiurl/v1" + scheme "github.com/loxilb-io/kube-loxilb/pkg/klb-client/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" gentype "k8s.io/client-go/gentype" - scheme "github.com/loxilb-io/kube-loxilb/pkg/klb-client/clientset/versioned/scheme" - loxiurlv1 "github.com/loxilb-io/kube-loxilb/pkg/klb-crds/loxiurl/v1" ) // LoxiURLsGetter has a method to return a LoxiURLInterface. diff --git a/pkg/klb-client/clientset/versioned/typed/loxiurl/v1/loxiurl_client.go b/pkg/klb-client/clientset/versioned/typed/loxiurl/v1/loxiurl_client.go index 8fd0c78..b3403c1 100644 --- a/pkg/klb-client/clientset/versioned/typed/loxiurl/v1/loxiurl_client.go +++ b/pkg/klb-client/clientset/versioned/typed/loxiurl/v1/loxiurl_client.go @@ -21,9 +21,9 @@ package v1 import ( http "net/http" - rest "k8s.io/client-go/rest" + loxiurlv1 "github.com/loxilb-io/kube-loxilb/pkg/crds/loxiurl/v1" scheme "github.com/loxilb-io/kube-loxilb/pkg/klb-client/clientset/versioned/scheme" - loxiurlv1 "github.com/loxilb-io/kube-loxilb/pkg/klb-crds/loxiurl/v1" + rest "k8s.io/client-go/rest" ) type LoxiurlV1Interface interface { diff --git a/pkg/klb-client/informers/externalversions/factory.go b/pkg/klb-client/informers/externalversions/factory.go index 78796f3..052a714 100644 --- a/pkg/klb-client/informers/externalversions/factory.go +++ b/pkg/klb-client/informers/externalversions/factory.go @@ -23,13 +23,13 @@ import ( sync "sync" time "time" + versioned "github.com/loxilb-io/kube-loxilb/pkg/klb-client/clientset/versioned" + internalinterfaces "github.com/loxilb-io/kube-loxilb/pkg/klb-client/informers/externalversions/internalinterfaces" + loxiurl "github.com/loxilb-io/kube-loxilb/pkg/klb-client/informers/externalversions/loxiurl" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" cache "k8s.io/client-go/tools/cache" - versioned "github.com/loxilb-io/kube-loxilb/pkg/klb-client/clientset/versioned" - internalinterfaces "github.com/loxilb-io/kube-loxilb/pkg/klb-client/informers/externalversions/internalinterfaces" - loxiurl "github.com/loxilb-io/kube-loxilb/pkg/klb-client/informers/externalversions/loxiurl" ) // SharedInformerOption defines the functional option type for SharedInformerFactory. diff --git a/pkg/klb-client/informers/externalversions/generic.go b/pkg/klb-client/informers/externalversions/generic.go index 538d502..d228ee3 100644 --- a/pkg/klb-client/informers/externalversions/generic.go +++ b/pkg/klb-client/informers/externalversions/generic.go @@ -21,9 +21,9 @@ package externalversions import ( fmt "fmt" + v1 "github.com/loxilb-io/kube-loxilb/pkg/crds/loxiurl/v1" schema "k8s.io/apimachinery/pkg/runtime/schema" cache "k8s.io/client-go/tools/cache" - v1 "github.com/loxilb-io/kube-loxilb/pkg/klb-crds/loxiurl/v1" ) // GenericInformer is type of SharedIndexInformer which will locate and delegate to other diff --git a/pkg/klb-client/informers/externalversions/internalinterfaces/factory_interfaces.go b/pkg/klb-client/informers/externalversions/internalinterfaces/factory_interfaces.go index acf3673..3c9b1ba 100644 --- a/pkg/klb-client/informers/externalversions/internalinterfaces/factory_interfaces.go +++ b/pkg/klb-client/informers/externalversions/internalinterfaces/factory_interfaces.go @@ -21,10 +21,10 @@ package internalinterfaces import ( time "time" + versioned "github.com/loxilb-io/kube-loxilb/pkg/klb-client/clientset/versioned" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" cache "k8s.io/client-go/tools/cache" - versioned "github.com/loxilb-io/kube-loxilb/pkg/klb-client/clientset/versioned" ) // NewInformerFunc takes versioned.Interface and time.Duration to return a SharedIndexInformer. diff --git a/pkg/klb-client/informers/externalversions/loxiurl/v1/loxiurl.go b/pkg/klb-client/informers/externalversions/loxiurl/v1/loxiurl.go index 116d5f7..5306f8a 100644 --- a/pkg/klb-client/informers/externalversions/loxiurl/v1/loxiurl.go +++ b/pkg/klb-client/informers/externalversions/loxiurl/v1/loxiurl.go @@ -22,14 +22,14 @@ import ( context "context" time "time" + klbcrdsloxiurlv1 "github.com/loxilb-io/kube-loxilb/pkg/crds/loxiurl/v1" + versioned "github.com/loxilb-io/kube-loxilb/pkg/klb-client/clientset/versioned" + internalinterfaces "github.com/loxilb-io/kube-loxilb/pkg/klb-client/informers/externalversions/internalinterfaces" + loxiurlv1 "github.com/loxilb-io/kube-loxilb/pkg/klb-client/listers/loxiurl/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" cache "k8s.io/client-go/tools/cache" - versioned "github.com/loxilb-io/kube-loxilb/pkg/klb-client/clientset/versioned" - internalinterfaces "github.com/loxilb-io/kube-loxilb/pkg/klb-client/informers/externalversions/internalinterfaces" - loxiurlv1 "github.com/loxilb-io/kube-loxilb/pkg/klb-client/listers/loxiurl/v1" - klbcrdsloxiurlv1 "github.com/loxilb-io/kube-loxilb/pkg/klb-crds/loxiurl/v1" ) // LoxiURLInformer provides access to a shared informer and lister for diff --git a/pkg/klb-client/listers/loxiurl/v1/loxiurl.go b/pkg/klb-client/listers/loxiurl/v1/loxiurl.go index ab21481..9040914 100644 --- a/pkg/klb-client/listers/loxiurl/v1/loxiurl.go +++ b/pkg/klb-client/listers/loxiurl/v1/loxiurl.go @@ -19,10 +19,10 @@ limitations under the License. package v1 import ( + loxiurlv1 "github.com/loxilb-io/kube-loxilb/pkg/crds/loxiurl/v1" labels "k8s.io/apimachinery/pkg/labels" listers "k8s.io/client-go/listers" cache "k8s.io/client-go/tools/cache" - loxiurlv1 "github.com/loxilb-io/kube-loxilb/pkg/klb-crds/loxiurl/v1" ) // LoxiURLLister helps list LoxiURLs. diff --git a/pkg/klb-crds/loxiurl/v1/register.go b/pkg/klb-crds/loxiurl/v1/register.go deleted file mode 100644 index 4ef3ebf..0000000 --- a/pkg/klb-crds/loxiurl/v1/register.go +++ /dev/null @@ -1,31 +0,0 @@ -package v1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -const GroupName = "loxiurl.loxilb.io" - -var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"} - -var ( - SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) - AddToScheme = SchemeBuilder.AddToScheme -) - -func Resource(resource string) schema.GroupResource { - return SchemeGroupVersion.WithResource(resource).GroupResource() -} - -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes( - SchemeGroupVersion, - &LoxiURL{}, - &LoxiURLList{}, - ) - - metav1.AddToGroupVersion(scheme, SchemeGroupVersion) - return nil -}