From 398fc90cc0e933e197c8b7096b256f79a134ae80 Mon Sep 17 00:00:00 2001 From: Sanskar Jaiswal Date: Sat, 23 Nov 2024 18:12:21 +0530 Subject: [PATCH] fix: fix codegen script and update generated code Signed-off-by: Sanskar Jaiswal --- hack/update-codegen.sh | 10 ++-- pkg/apis/gloo/register.go | 3 +- pkg/apis/gloo/{gloo => }/v1/doc.go | 0 pkg/apis/gloo/{gloo => }/v1/register.go | 0 pkg/apis/gloo/{gloo => }/v1/types.go | 9 ++- .../{gloo => }/v1/zz_generated.deepcopy.go | 35 ++++++------ pkg/apis/gloogateway/register.go | 5 ++ .../{gloo/gateway => gloogateway}/v1/doc.go | 0 .../gateway => gloogateway}/v1/register.go | 4 +- .../{gloo/gateway => gloogateway}/v1/types.go | 0 .../v1/zz_generated.deepcopy.go | 0 pkg/client/clientset/versioned/clientset.go | 56 +++++++++---------- .../versioned/fake/clientset_generated.go | 30 +++++----- .../clientset/versioned/fake/register.go | 10 ++-- .../clientset/versioned/scheme/register.go | 10 ++-- .../typed/gloo/v1/fake/fake_upstream.go | 2 +- .../versioned/typed/gloo/v1/gloo_client.go | 2 +- .../versioned/typed/gloo/v1/upstream.go | 2 +- .../typed/{gateway => gloogateway}/v1/doc.go | 0 .../{gateway => gloogateway}/v1/fake/doc.go | 0 .../v1/fake/fake_gloogateway_client.go} | 2 +- .../v1/fake/fake_routetable.go | 2 +- .../v1/generated_expansion.go | 0 .../v1/gloogateway_client.go} | 2 +- .../{gateway => gloogateway}/v1/routetable.go | 2 +- .../externalversions/appmesh/interface.go | 14 ++--- .../informers/externalversions/factory.go | 26 ++++++--- .../externalversions/gatewayapi/interface.go | 14 ++--- .../informers/externalversions/generic.go | 4 +- .../externalversions/gloo/v1/upstream.go | 2 +- .../{gateway => gloogateway}/interface.go | 4 +- .../{gateway => gloogateway}/v1/interface.go | 0 .../{gateway => gloogateway}/v1/routetable.go | 8 +-- pkg/client/listers/gloo/v1/upstream.go | 2 +- .../v1/expansion_generated.go | 0 .../{gateway => gloogateway}/v1/routetable.go | 2 +- pkg/router/gloo.go | 4 +- pkg/router/gloo_test.go | 2 +- 38 files changed, 144 insertions(+), 124 deletions(-) rename pkg/apis/gloo/{gloo => }/v1/doc.go (100%) rename pkg/apis/gloo/{gloo => }/v1/register.go (100%) rename pkg/apis/gloo/{gloo => }/v1/types.go (95%) rename pkg/apis/gloo/{gloo => }/v1/zz_generated.deepcopy.go (95%) create mode 100644 pkg/apis/gloogateway/register.go rename pkg/apis/{gloo/gateway => gloogateway}/v1/doc.go (100%) rename pkg/apis/{gloo/gateway => gloogateway}/v1/register.go (86%) rename pkg/apis/{gloo/gateway => gloogateway}/v1/types.go (100%) rename pkg/apis/{gloo/gateway => gloogateway}/v1/zz_generated.deepcopy.go (100%) rename pkg/client/clientset/versioned/typed/{gateway => gloogateway}/v1/doc.go (100%) rename pkg/client/clientset/versioned/typed/{gateway => gloogateway}/v1/fake/doc.go (100%) rename pkg/client/clientset/versioned/typed/{gateway/v1/fake/fake_gateway_client.go => gloogateway/v1/fake/fake_gloogateway_client.go} (98%) rename pkg/client/clientset/versioned/typed/{gateway => gloogateway}/v1/fake/fake_routetable.go (98%) rename pkg/client/clientset/versioned/typed/{gateway => gloogateway}/v1/generated_expansion.go (100%) rename pkg/client/clientset/versioned/typed/{gateway/v1/gateway_client.go => gloogateway/v1/gloogateway_client.go} (98%) rename pkg/client/clientset/versioned/typed/{gateway => gloogateway}/v1/routetable.go (99%) rename pkg/client/informers/externalversions/{gateway => gloogateway}/interface.go (97%) rename pkg/client/informers/externalversions/{gateway => gloogateway}/v1/interface.go (100%) rename pkg/client/informers/externalversions/{gateway => gloogateway}/v1/routetable.go (93%) rename pkg/client/listers/{gateway => gloogateway}/v1/expansion_generated.go (100%) rename pkg/client/listers/{gateway => gloogateway}/v1/routetable.go (98%) diff --git a/hack/update-codegen.sh b/hack/update-codegen.sh index 9002d0e12..74211e31b 100755 --- a/hack/update-codegen.sh +++ b/hack/update-codegen.sh @@ -34,14 +34,16 @@ mkdir -p "${TEMP_DIR}/${PACKAGE_PATH_BASE}/pkg/client/informers" \ # Ensure we can execute. chmod +x ${CODEGEN_PKG}/kube_codegen.sh -source ${CODEGEN_PKG}/kube_codegen.sh kube::codegen::gen_client \ - --output-dir "${TEMP_DIR}" \ +source ${CODEGEN_PKG}/kube_codegen.sh + +kube::codegen::gen_client \ + --output-dir "${TEMP_DIR}/${PACKAGE_PATH_BASE}/pkg/client" \ --output-pkg "${PACKAGE_PATH_BASE}/pkg/client" \ --with-watch \ --boilerplate "${SCRIPT_ROOT}/hack/boilerplate.go.txt" \ - ./pkgs/apis + ./pkg/apis -ls -lha $TEMP_DIR +tree $TEMP_DIR/${PACKAGE_PATH_BASE/pkg/client}/ # Copy everything back. cp -r "${TEMP_DIR}/${PACKAGE_PATH_BASE}/." "${SCRIPT_ROOT}/" diff --git a/pkg/apis/gloo/register.go b/pkg/apis/gloo/register.go index 723e95226..d4d694f33 100644 --- a/pkg/apis/gloo/register.go +++ b/pkg/apis/gloo/register.go @@ -1,6 +1,5 @@ package gloo const ( - GlooGroupName = "gloo.solo.io" - GatewayGroupName = "gateway.solo.io" + GlooGroupName = "gloo.solo.io" ) diff --git a/pkg/apis/gloo/gloo/v1/doc.go b/pkg/apis/gloo/v1/doc.go similarity index 100% rename from pkg/apis/gloo/gloo/v1/doc.go rename to pkg/apis/gloo/v1/doc.go diff --git a/pkg/apis/gloo/gloo/v1/register.go b/pkg/apis/gloo/v1/register.go similarity index 100% rename from pkg/apis/gloo/gloo/v1/register.go rename to pkg/apis/gloo/v1/register.go diff --git a/pkg/apis/gloo/gloo/v1/types.go b/pkg/apis/gloo/v1/types.go similarity index 95% rename from pkg/apis/gloo/gloo/v1/types.go rename to pkg/apis/gloo/v1/types.go index d181972d0..02065ca36 100644 --- a/pkg/apis/gloo/gloo/v1/types.go +++ b/pkg/apis/gloo/v1/types.go @@ -1,7 +1,6 @@ package v1 import ( - v1 "github.com/fluxcd/flagger/pkg/apis/gloo/gateway/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -44,7 +43,7 @@ type UpstreamSslConfig struct { /** SSLSecrets -- only one of these should be set */ *UpstreamSslConfig_Sds `json:"sds,omitempty"` - SecretRef *v1.ResourceRef `json:"secretRef,omitempty"` + SecretRef *ResourceRef `json:"secretRef,omitempty"` *UpstreamSslConfig_SslFiles `json:"sslFiles,omitempty"` } @@ -139,3 +138,9 @@ type UpstreamList struct { Items []Upstream `json:"items"` } + +// ResourceRef references resources across namespaces +type ResourceRef struct { + Name string `json:"name,omitempty"` + Namespace string `json:"namespace,omitempty"` +} diff --git a/pkg/apis/gloo/gloo/v1/zz_generated.deepcopy.go b/pkg/apis/gloo/v1/zz_generated.deepcopy.go similarity index 95% rename from pkg/apis/gloo/gloo/v1/zz_generated.deepcopy.go rename to pkg/apis/gloo/v1/zz_generated.deepcopy.go index 9a5d75865..6f2313c32 100644 --- a/pkg/apis/gloo/gloo/v1/zz_generated.deepcopy.go +++ b/pkg/apis/gloo/v1/zz_generated.deepcopy.go @@ -1,28 +1,11 @@ //go:build !ignore_autogenerated // +build !ignore_autogenerated -/* -Copyright 2020 The Flux authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - // Code generated by deepcopy-gen. DO NOT EDIT. package v1 import ( - gatewayv1 "github.com/fluxcd/flagger/pkg/apis/gloo/gateway/v1" runtime "k8s.io/apimachinery/pkg/runtime" ) @@ -228,6 +211,22 @@ func (in *LoadBalancerConfigRoundRobin) DeepCopy() *LoadBalancerConfigRoundRobin return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ResourceRef) DeepCopyInto(out *ResourceRef) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceRef. +func (in *ResourceRef) DeepCopy() *ResourceRef { + if in == nil { + return nil + } + out := new(ResourceRef) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *SlowStartConfig) DeepCopyInto(out *SlowStartConfig) { *out = *in @@ -403,7 +402,7 @@ func (in *UpstreamSslConfig) DeepCopyInto(out *UpstreamSslConfig) { } if in.SecretRef != nil { in, out := &in.SecretRef, &out.SecretRef - *out = new(gatewayv1.ResourceRef) + *out = new(ResourceRef) **out = **in } if in.UpstreamSslConfig_SslFiles != nil { diff --git a/pkg/apis/gloogateway/register.go b/pkg/apis/gloogateway/register.go new file mode 100644 index 000000000..27908df0c --- /dev/null +++ b/pkg/apis/gloogateway/register.go @@ -0,0 +1,5 @@ +package gloogateway + +const ( + GatewayGroupName = "gateway.solo.io" +) diff --git a/pkg/apis/gloo/gateway/v1/doc.go b/pkg/apis/gloogateway/v1/doc.go similarity index 100% rename from pkg/apis/gloo/gateway/v1/doc.go rename to pkg/apis/gloogateway/v1/doc.go diff --git a/pkg/apis/gloo/gateway/v1/register.go b/pkg/apis/gloogateway/v1/register.go similarity index 86% rename from pkg/apis/gloo/gateway/v1/register.go rename to pkg/apis/gloogateway/v1/register.go index 9b541ed40..a61695b8c 100755 --- a/pkg/apis/gloo/gateway/v1/register.go +++ b/pkg/apis/gloogateway/v1/register.go @@ -1,14 +1,14 @@ package v1 import ( - "github.com/fluxcd/flagger/pkg/apis/gloo" + "github.com/fluxcd/flagger/pkg/apis/gloogateway" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" ) // SchemeGroupVersion is group version used to register these objects -var SchemeGroupVersion = schema.GroupVersion{Group: gloo.GatewayGroupName, Version: "v1"} +var SchemeGroupVersion = schema.GroupVersion{Group: gloogateway.GatewayGroupName, Version: "v1"} // Kind takes an unqualified kind and returns back a Group qualified GroupKind func Kind(kind string) schema.GroupKind { diff --git a/pkg/apis/gloo/gateway/v1/types.go b/pkg/apis/gloogateway/v1/types.go similarity index 100% rename from pkg/apis/gloo/gateway/v1/types.go rename to pkg/apis/gloogateway/v1/types.go diff --git a/pkg/apis/gloo/gateway/v1/zz_generated.deepcopy.go b/pkg/apis/gloogateway/v1/zz_generated.deepcopy.go similarity index 100% rename from pkg/apis/gloo/gateway/v1/zz_generated.deepcopy.go rename to pkg/apis/gloogateway/v1/zz_generated.deepcopy.go diff --git a/pkg/client/clientset/versioned/clientset.go b/pkg/client/clientset/versioned/clientset.go index bde8b926e..c7e159c2e 100644 --- a/pkg/client/clientset/versioned/clientset.go +++ b/pkg/client/clientset/versioned/clientset.go @@ -26,10 +26,10 @@ import ( appmeshv1beta1 "github.com/fluxcd/flagger/pkg/client/clientset/versioned/typed/appmesh/v1beta1" appmeshv1beta2 "github.com/fluxcd/flagger/pkg/client/clientset/versioned/typed/appmesh/v1beta2" flaggerv1beta1 "github.com/fluxcd/flagger/pkg/client/clientset/versioned/typed/flagger/v1beta1" - gatewayv1 "github.com/fluxcd/flagger/pkg/client/clientset/versioned/typed/gateway/v1" gatewayapiv1 "github.com/fluxcd/flagger/pkg/client/clientset/versioned/typed/gatewayapi/v1" gatewayapiv1beta1 "github.com/fluxcd/flagger/pkg/client/clientset/versioned/typed/gatewayapi/v1beta1" gloov1 "github.com/fluxcd/flagger/pkg/client/clientset/versioned/typed/gloo/v1" + gatewayv1 "github.com/fluxcd/flagger/pkg/client/clientset/versioned/typed/gloogateway/v1" networkingv1beta1 "github.com/fluxcd/flagger/pkg/client/clientset/versioned/typed/istio/v1beta1" kedav1alpha1 "github.com/fluxcd/flagger/pkg/client/clientset/versioned/typed/keda/v1alpha1" kumav1alpha1 "github.com/fluxcd/flagger/pkg/client/clientset/versioned/typed/kuma/v1alpha1" @@ -46,13 +46,13 @@ import ( type Interface interface { Discovery() discovery.DiscoveryInterface ApisixV2() apisixv2.ApisixV2Interface - AppmeshV1beta2() appmeshv1beta2.AppmeshV1beta2Interface AppmeshV1beta1() appmeshv1beta1.AppmeshV1beta1Interface + AppmeshV1beta2() appmeshv1beta2.AppmeshV1beta2Interface FlaggerV1beta1() flaggerv1beta1.FlaggerV1beta1Interface - GatewayV1() gatewayv1.GatewayV1Interface - GatewayapiV1beta1() gatewayapiv1beta1.GatewayapiV1beta1Interface GatewayapiV1() gatewayapiv1.GatewayapiV1Interface + GatewayapiV1beta1() gatewayapiv1beta1.GatewayapiV1beta1Interface GlooV1() gloov1.GlooV1Interface + GatewayV1() gatewayv1.GatewayV1Interface NetworkingV1beta1() networkingv1beta1.NetworkingV1beta1Interface KedaV1alpha1() kedav1alpha1.KedaV1alpha1Interface KumaV1alpha1() kumav1alpha1.KumaV1alpha1Interface @@ -67,13 +67,13 @@ type Interface interface { type Clientset struct { *discovery.DiscoveryClient apisixV2 *apisixv2.ApisixV2Client - appmeshV1beta2 *appmeshv1beta2.AppmeshV1beta2Client appmeshV1beta1 *appmeshv1beta1.AppmeshV1beta1Client + appmeshV1beta2 *appmeshv1beta2.AppmeshV1beta2Client flaggerV1beta1 *flaggerv1beta1.FlaggerV1beta1Client - gatewayV1 *gatewayv1.GatewayV1Client - gatewayapiV1beta1 *gatewayapiv1beta1.GatewayapiV1beta1Client gatewayapiV1 *gatewayapiv1.GatewayapiV1Client + gatewayapiV1beta1 *gatewayapiv1beta1.GatewayapiV1beta1Client glooV1 *gloov1.GlooV1Client + gatewayV1 *gatewayv1.GatewayV1Client networkingV1beta1 *networkingv1beta1.NetworkingV1beta1Client kedaV1alpha1 *kedav1alpha1.KedaV1alpha1Client kumaV1alpha1 *kumav1alpha1.KumaV1alpha1Client @@ -89,24 +89,24 @@ func (c *Clientset) ApisixV2() apisixv2.ApisixV2Interface { return c.apisixV2 } -// AppmeshV1beta2 retrieves the AppmeshV1beta2Client -func (c *Clientset) AppmeshV1beta2() appmeshv1beta2.AppmeshV1beta2Interface { - return c.appmeshV1beta2 -} - // AppmeshV1beta1 retrieves the AppmeshV1beta1Client func (c *Clientset) AppmeshV1beta1() appmeshv1beta1.AppmeshV1beta1Interface { return c.appmeshV1beta1 } +// AppmeshV1beta2 retrieves the AppmeshV1beta2Client +func (c *Clientset) AppmeshV1beta2() appmeshv1beta2.AppmeshV1beta2Interface { + return c.appmeshV1beta2 +} + // FlaggerV1beta1 retrieves the FlaggerV1beta1Client func (c *Clientset) FlaggerV1beta1() flaggerv1beta1.FlaggerV1beta1Interface { return c.flaggerV1beta1 } -// GatewayV1 retrieves the GatewayV1Client -func (c *Clientset) GatewayV1() gatewayv1.GatewayV1Interface { - return c.gatewayV1 +// GatewayapiV1 retrieves the GatewayapiV1Client +func (c *Clientset) GatewayapiV1() gatewayapiv1.GatewayapiV1Interface { + return c.gatewayapiV1 } // GatewayapiV1beta1 retrieves the GatewayapiV1beta1Client @@ -114,16 +114,16 @@ func (c *Clientset) GatewayapiV1beta1() gatewayapiv1beta1.GatewayapiV1beta1Inter return c.gatewayapiV1beta1 } -// GatewayapiV1 retrieves the GatewayapiV1Client -func (c *Clientset) GatewayapiV1() gatewayapiv1.GatewayapiV1Interface { - return c.gatewayapiV1 -} - // GlooV1 retrieves the GlooV1Client func (c *Clientset) GlooV1() gloov1.GlooV1Interface { return c.glooV1 } +// GatewayV1 retrieves the GatewayV1Client +func (c *Clientset) GatewayV1() gatewayv1.GatewayV1Interface { + return c.gatewayV1 +} + // NetworkingV1beta1 retrieves the NetworkingV1beta1Client func (c *Clientset) NetworkingV1beta1() networkingv1beta1.NetworkingV1beta1Interface { return c.networkingV1beta1 @@ -212,11 +212,11 @@ func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset, if err != nil { return nil, err } - cs.appmeshV1beta2, err = appmeshv1beta2.NewForConfigAndClient(&configShallowCopy, httpClient) + cs.appmeshV1beta1, err = appmeshv1beta1.NewForConfigAndClient(&configShallowCopy, httpClient) if err != nil { return nil, err } - cs.appmeshV1beta1, err = appmeshv1beta1.NewForConfigAndClient(&configShallowCopy, httpClient) + cs.appmeshV1beta2, err = appmeshv1beta2.NewForConfigAndClient(&configShallowCopy, httpClient) if err != nil { return nil, err } @@ -224,7 +224,7 @@ func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset, if err != nil { return nil, err } - cs.gatewayV1, err = gatewayv1.NewForConfigAndClient(&configShallowCopy, httpClient) + cs.gatewayapiV1, err = gatewayapiv1.NewForConfigAndClient(&configShallowCopy, httpClient) if err != nil { return nil, err } @@ -232,11 +232,11 @@ func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset, if err != nil { return nil, err } - cs.gatewayapiV1, err = gatewayapiv1.NewForConfigAndClient(&configShallowCopy, httpClient) + cs.glooV1, err = gloov1.NewForConfigAndClient(&configShallowCopy, httpClient) if err != nil { return nil, err } - cs.glooV1, err = gloov1.NewForConfigAndClient(&configShallowCopy, httpClient) + cs.gatewayV1, err = gatewayv1.NewForConfigAndClient(&configShallowCopy, httpClient) if err != nil { return nil, err } @@ -294,13 +294,13 @@ func NewForConfigOrDie(c *rest.Config) *Clientset { func New(c rest.Interface) *Clientset { var cs Clientset cs.apisixV2 = apisixv2.New(c) - cs.appmeshV1beta2 = appmeshv1beta2.New(c) cs.appmeshV1beta1 = appmeshv1beta1.New(c) + cs.appmeshV1beta2 = appmeshv1beta2.New(c) cs.flaggerV1beta1 = flaggerv1beta1.New(c) - cs.gatewayV1 = gatewayv1.New(c) - cs.gatewayapiV1beta1 = gatewayapiv1beta1.New(c) cs.gatewayapiV1 = gatewayapiv1.New(c) + cs.gatewayapiV1beta1 = gatewayapiv1beta1.New(c) cs.glooV1 = gloov1.New(c) + cs.gatewayV1 = gatewayv1.New(c) cs.networkingV1beta1 = networkingv1beta1.New(c) cs.kedaV1alpha1 = kedav1alpha1.New(c) cs.kumaV1alpha1 = kumav1alpha1.New(c) diff --git a/pkg/client/clientset/versioned/fake/clientset_generated.go b/pkg/client/clientset/versioned/fake/clientset_generated.go index c0fe650b6..518bdf0c1 100644 --- a/pkg/client/clientset/versioned/fake/clientset_generated.go +++ b/pkg/client/clientset/versioned/fake/clientset_generated.go @@ -28,14 +28,14 @@ import ( fakeappmeshv1beta2 "github.com/fluxcd/flagger/pkg/client/clientset/versioned/typed/appmesh/v1beta2/fake" flaggerv1beta1 "github.com/fluxcd/flagger/pkg/client/clientset/versioned/typed/flagger/v1beta1" fakeflaggerv1beta1 "github.com/fluxcd/flagger/pkg/client/clientset/versioned/typed/flagger/v1beta1/fake" - gatewayv1 "github.com/fluxcd/flagger/pkg/client/clientset/versioned/typed/gateway/v1" - fakegatewayv1 "github.com/fluxcd/flagger/pkg/client/clientset/versioned/typed/gateway/v1/fake" gatewayapiv1 "github.com/fluxcd/flagger/pkg/client/clientset/versioned/typed/gatewayapi/v1" fakegatewayapiv1 "github.com/fluxcd/flagger/pkg/client/clientset/versioned/typed/gatewayapi/v1/fake" gatewayapiv1beta1 "github.com/fluxcd/flagger/pkg/client/clientset/versioned/typed/gatewayapi/v1beta1" fakegatewayapiv1beta1 "github.com/fluxcd/flagger/pkg/client/clientset/versioned/typed/gatewayapi/v1beta1/fake" gloov1 "github.com/fluxcd/flagger/pkg/client/clientset/versioned/typed/gloo/v1" fakegloov1 "github.com/fluxcd/flagger/pkg/client/clientset/versioned/typed/gloo/v1/fake" + gatewayv1 "github.com/fluxcd/flagger/pkg/client/clientset/versioned/typed/gloogateway/v1" + fakegatewayv1 "github.com/fluxcd/flagger/pkg/client/clientset/versioned/typed/gloogateway/v1/fake" networkingv1beta1 "github.com/fluxcd/flagger/pkg/client/clientset/versioned/typed/istio/v1beta1" fakenetworkingv1beta1 "github.com/fluxcd/flagger/pkg/client/clientset/versioned/typed/istio/v1beta1/fake" kedav1alpha1 "github.com/fluxcd/flagger/pkg/client/clientset/versioned/typed/keda/v1alpha1" @@ -114,24 +114,24 @@ func (c *Clientset) ApisixV2() apisixv2.ApisixV2Interface { return &fakeapisixv2.FakeApisixV2{Fake: &c.Fake} } -// AppmeshV1beta2 retrieves the AppmeshV1beta2Client -func (c *Clientset) AppmeshV1beta2() appmeshv1beta2.AppmeshV1beta2Interface { - return &fakeappmeshv1beta2.FakeAppmeshV1beta2{Fake: &c.Fake} -} - // AppmeshV1beta1 retrieves the AppmeshV1beta1Client func (c *Clientset) AppmeshV1beta1() appmeshv1beta1.AppmeshV1beta1Interface { return &fakeappmeshv1beta1.FakeAppmeshV1beta1{Fake: &c.Fake} } +// AppmeshV1beta2 retrieves the AppmeshV1beta2Client +func (c *Clientset) AppmeshV1beta2() appmeshv1beta2.AppmeshV1beta2Interface { + return &fakeappmeshv1beta2.FakeAppmeshV1beta2{Fake: &c.Fake} +} + // FlaggerV1beta1 retrieves the FlaggerV1beta1Client func (c *Clientset) FlaggerV1beta1() flaggerv1beta1.FlaggerV1beta1Interface { return &fakeflaggerv1beta1.FakeFlaggerV1beta1{Fake: &c.Fake} } -// GatewayV1 retrieves the GatewayV1Client -func (c *Clientset) GatewayV1() gatewayv1.GatewayV1Interface { - return &fakegatewayv1.FakeGatewayV1{Fake: &c.Fake} +// GatewayapiV1 retrieves the GatewayapiV1Client +func (c *Clientset) GatewayapiV1() gatewayapiv1.GatewayapiV1Interface { + return &fakegatewayapiv1.FakeGatewayapiV1{Fake: &c.Fake} } // GatewayapiV1beta1 retrieves the GatewayapiV1beta1Client @@ -139,16 +139,16 @@ func (c *Clientset) GatewayapiV1beta1() gatewayapiv1beta1.GatewayapiV1beta1Inter return &fakegatewayapiv1beta1.FakeGatewayapiV1beta1{Fake: &c.Fake} } -// GatewayapiV1 retrieves the GatewayapiV1Client -func (c *Clientset) GatewayapiV1() gatewayapiv1.GatewayapiV1Interface { - return &fakegatewayapiv1.FakeGatewayapiV1{Fake: &c.Fake} -} - // GlooV1 retrieves the GlooV1Client func (c *Clientset) GlooV1() gloov1.GlooV1Interface { return &fakegloov1.FakeGlooV1{Fake: &c.Fake} } +// GatewayV1 retrieves the GatewayV1Client +func (c *Clientset) GatewayV1() gatewayv1.GatewayV1Interface { + return &fakegatewayv1.FakeGatewayV1{Fake: &c.Fake} +} + // NetworkingV1beta1 retrieves the NetworkingV1beta1Client func (c *Clientset) NetworkingV1beta1() networkingv1beta1.NetworkingV1beta1Interface { return &fakenetworkingv1beta1.FakeNetworkingV1beta1{Fake: &c.Fake} diff --git a/pkg/client/clientset/versioned/fake/register.go b/pkg/client/clientset/versioned/fake/register.go index 020e785bf..51ef71e0e 100644 --- a/pkg/client/clientset/versioned/fake/register.go +++ b/pkg/client/clientset/versioned/fake/register.go @@ -25,8 +25,8 @@ import ( flaggerv1beta1 "github.com/fluxcd/flagger/pkg/apis/flagger/v1beta1" gatewayapiv1 "github.com/fluxcd/flagger/pkg/apis/gatewayapi/v1" gatewayapiv1beta1 "github.com/fluxcd/flagger/pkg/apis/gatewayapi/v1beta1" - gatewayv1 "github.com/fluxcd/flagger/pkg/apis/gloo/gateway/v1" - gloov1 "github.com/fluxcd/flagger/pkg/apis/gloo/gloo/v1" + gloov1 "github.com/fluxcd/flagger/pkg/apis/gloo/v1" + gatewayv1 "github.com/fluxcd/flagger/pkg/apis/gloogateway/v1" networkingv1beta1 "github.com/fluxcd/flagger/pkg/apis/istio/v1beta1" kedav1alpha1 "github.com/fluxcd/flagger/pkg/apis/keda/v1alpha1" kumav1alpha1 "github.com/fluxcd/flagger/pkg/apis/kuma/v1alpha1" @@ -47,13 +47,13 @@ var codecs = serializer.NewCodecFactory(scheme) var localSchemeBuilder = runtime.SchemeBuilder{ apisixv2.AddToScheme, - appmeshv1beta2.AddToScheme, appmeshv1beta1.AddToScheme, + appmeshv1beta2.AddToScheme, flaggerv1beta1.AddToScheme, - gatewayv1.AddToScheme, - gatewayapiv1beta1.AddToScheme, gatewayapiv1.AddToScheme, + gatewayapiv1beta1.AddToScheme, gloov1.AddToScheme, + gatewayv1.AddToScheme, networkingv1beta1.AddToScheme, kedav1alpha1.AddToScheme, kumav1alpha1.AddToScheme, diff --git a/pkg/client/clientset/versioned/scheme/register.go b/pkg/client/clientset/versioned/scheme/register.go index 7f446ef79..2c7688f47 100644 --- a/pkg/client/clientset/versioned/scheme/register.go +++ b/pkg/client/clientset/versioned/scheme/register.go @@ -25,8 +25,8 @@ import ( flaggerv1beta1 "github.com/fluxcd/flagger/pkg/apis/flagger/v1beta1" gatewayapiv1 "github.com/fluxcd/flagger/pkg/apis/gatewayapi/v1" gatewayapiv1beta1 "github.com/fluxcd/flagger/pkg/apis/gatewayapi/v1beta1" - gatewayv1 "github.com/fluxcd/flagger/pkg/apis/gloo/gateway/v1" - gloov1 "github.com/fluxcd/flagger/pkg/apis/gloo/gloo/v1" + gloov1 "github.com/fluxcd/flagger/pkg/apis/gloo/v1" + gatewayv1 "github.com/fluxcd/flagger/pkg/apis/gloogateway/v1" networkingv1beta1 "github.com/fluxcd/flagger/pkg/apis/istio/v1beta1" kedav1alpha1 "github.com/fluxcd/flagger/pkg/apis/keda/v1alpha1" kumav1alpha1 "github.com/fluxcd/flagger/pkg/apis/kuma/v1alpha1" @@ -47,13 +47,13 @@ var Codecs = serializer.NewCodecFactory(Scheme) var ParameterCodec = runtime.NewParameterCodec(Scheme) var localSchemeBuilder = runtime.SchemeBuilder{ apisixv2.AddToScheme, - appmeshv1beta2.AddToScheme, appmeshv1beta1.AddToScheme, + appmeshv1beta2.AddToScheme, flaggerv1beta1.AddToScheme, - gatewayv1.AddToScheme, - gatewayapiv1beta1.AddToScheme, gatewayapiv1.AddToScheme, + gatewayapiv1beta1.AddToScheme, gloov1.AddToScheme, + gatewayv1.AddToScheme, networkingv1beta1.AddToScheme, kedav1alpha1.AddToScheme, kumav1alpha1.AddToScheme, diff --git a/pkg/client/clientset/versioned/typed/gloo/v1/fake/fake_upstream.go b/pkg/client/clientset/versioned/typed/gloo/v1/fake/fake_upstream.go index 296740816..4d2d1cc84 100644 --- a/pkg/client/clientset/versioned/typed/gloo/v1/fake/fake_upstream.go +++ b/pkg/client/clientset/versioned/typed/gloo/v1/fake/fake_upstream.go @@ -21,7 +21,7 @@ package fake import ( "context" - v1 "github.com/fluxcd/flagger/pkg/apis/gloo/gloo/v1" + v1 "github.com/fluxcd/flagger/pkg/apis/gloo/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" types "k8s.io/apimachinery/pkg/types" diff --git a/pkg/client/clientset/versioned/typed/gloo/v1/gloo_client.go b/pkg/client/clientset/versioned/typed/gloo/v1/gloo_client.go index 5432ae164..fb2723127 100644 --- a/pkg/client/clientset/versioned/typed/gloo/v1/gloo_client.go +++ b/pkg/client/clientset/versioned/typed/gloo/v1/gloo_client.go @@ -21,7 +21,7 @@ package v1 import ( "net/http" - v1 "github.com/fluxcd/flagger/pkg/apis/gloo/gloo/v1" + v1 "github.com/fluxcd/flagger/pkg/apis/gloo/v1" "github.com/fluxcd/flagger/pkg/client/clientset/versioned/scheme" rest "k8s.io/client-go/rest" ) diff --git a/pkg/client/clientset/versioned/typed/gloo/v1/upstream.go b/pkg/client/clientset/versioned/typed/gloo/v1/upstream.go index 8d4f2a503..9e465830f 100644 --- a/pkg/client/clientset/versioned/typed/gloo/v1/upstream.go +++ b/pkg/client/clientset/versioned/typed/gloo/v1/upstream.go @@ -22,7 +22,7 @@ import ( "context" "time" - v1 "github.com/fluxcd/flagger/pkg/apis/gloo/gloo/v1" + v1 "github.com/fluxcd/flagger/pkg/apis/gloo/v1" scheme "github.com/fluxcd/flagger/pkg/client/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" diff --git a/pkg/client/clientset/versioned/typed/gateway/v1/doc.go b/pkg/client/clientset/versioned/typed/gloogateway/v1/doc.go similarity index 100% rename from pkg/client/clientset/versioned/typed/gateway/v1/doc.go rename to pkg/client/clientset/versioned/typed/gloogateway/v1/doc.go diff --git a/pkg/client/clientset/versioned/typed/gateway/v1/fake/doc.go b/pkg/client/clientset/versioned/typed/gloogateway/v1/fake/doc.go similarity index 100% rename from pkg/client/clientset/versioned/typed/gateway/v1/fake/doc.go rename to pkg/client/clientset/versioned/typed/gloogateway/v1/fake/doc.go diff --git a/pkg/client/clientset/versioned/typed/gateway/v1/fake/fake_gateway_client.go b/pkg/client/clientset/versioned/typed/gloogateway/v1/fake/fake_gloogateway_client.go similarity index 98% rename from pkg/client/clientset/versioned/typed/gateway/v1/fake/fake_gateway_client.go rename to pkg/client/clientset/versioned/typed/gloogateway/v1/fake/fake_gloogateway_client.go index 833ebf3b7..a26ac9479 100644 --- a/pkg/client/clientset/versioned/typed/gateway/v1/fake/fake_gateway_client.go +++ b/pkg/client/clientset/versioned/typed/gloogateway/v1/fake/fake_gloogateway_client.go @@ -19,7 +19,7 @@ limitations under the License. package fake import ( - v1 "github.com/fluxcd/flagger/pkg/client/clientset/versioned/typed/gateway/v1" + v1 "github.com/fluxcd/flagger/pkg/client/clientset/versioned/typed/gloogateway/v1" rest "k8s.io/client-go/rest" testing "k8s.io/client-go/testing" ) diff --git a/pkg/client/clientset/versioned/typed/gateway/v1/fake/fake_routetable.go b/pkg/client/clientset/versioned/typed/gloogateway/v1/fake/fake_routetable.go similarity index 98% rename from pkg/client/clientset/versioned/typed/gateway/v1/fake/fake_routetable.go rename to pkg/client/clientset/versioned/typed/gloogateway/v1/fake/fake_routetable.go index 3b9090ac3..68eedfa47 100644 --- a/pkg/client/clientset/versioned/typed/gateway/v1/fake/fake_routetable.go +++ b/pkg/client/clientset/versioned/typed/gloogateway/v1/fake/fake_routetable.go @@ -21,7 +21,7 @@ package fake import ( "context" - v1 "github.com/fluxcd/flagger/pkg/apis/gloo/gateway/v1" + v1 "github.com/fluxcd/flagger/pkg/apis/gloogateway/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" types "k8s.io/apimachinery/pkg/types" diff --git a/pkg/client/clientset/versioned/typed/gateway/v1/generated_expansion.go b/pkg/client/clientset/versioned/typed/gloogateway/v1/generated_expansion.go similarity index 100% rename from pkg/client/clientset/versioned/typed/gateway/v1/generated_expansion.go rename to pkg/client/clientset/versioned/typed/gloogateway/v1/generated_expansion.go diff --git a/pkg/client/clientset/versioned/typed/gateway/v1/gateway_client.go b/pkg/client/clientset/versioned/typed/gloogateway/v1/gloogateway_client.go similarity index 98% rename from pkg/client/clientset/versioned/typed/gateway/v1/gateway_client.go rename to pkg/client/clientset/versioned/typed/gloogateway/v1/gloogateway_client.go index c3088829b..ac633e6c7 100644 --- a/pkg/client/clientset/versioned/typed/gateway/v1/gateway_client.go +++ b/pkg/client/clientset/versioned/typed/gloogateway/v1/gloogateway_client.go @@ -21,7 +21,7 @@ package v1 import ( "net/http" - v1 "github.com/fluxcd/flagger/pkg/apis/gloo/gateway/v1" + v1 "github.com/fluxcd/flagger/pkg/apis/gloogateway/v1" "github.com/fluxcd/flagger/pkg/client/clientset/versioned/scheme" rest "k8s.io/client-go/rest" ) diff --git a/pkg/client/clientset/versioned/typed/gateway/v1/routetable.go b/pkg/client/clientset/versioned/typed/gloogateway/v1/routetable.go similarity index 99% rename from pkg/client/clientset/versioned/typed/gateway/v1/routetable.go rename to pkg/client/clientset/versioned/typed/gloogateway/v1/routetable.go index 695022a8b..cc7f2c9b5 100644 --- a/pkg/client/clientset/versioned/typed/gateway/v1/routetable.go +++ b/pkg/client/clientset/versioned/typed/gloogateway/v1/routetable.go @@ -22,7 +22,7 @@ import ( "context" "time" - v1 "github.com/fluxcd/flagger/pkg/apis/gloo/gateway/v1" + v1 "github.com/fluxcd/flagger/pkg/apis/gloogateway/v1" scheme "github.com/fluxcd/flagger/pkg/client/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" diff --git a/pkg/client/informers/externalversions/appmesh/interface.go b/pkg/client/informers/externalversions/appmesh/interface.go index a1d7fb745..9e24e0d17 100644 --- a/pkg/client/informers/externalversions/appmesh/interface.go +++ b/pkg/client/informers/externalversions/appmesh/interface.go @@ -26,10 +26,10 @@ import ( // Interface provides access to each of this group's versions. type Interface interface { - // V1beta2 provides access to shared informers for resources in V1beta2. - V1beta2() v1beta2.Interface // V1beta1 provides access to shared informers for resources in V1beta1. V1beta1() v1beta1.Interface + // V1beta2 provides access to shared informers for resources in V1beta2. + V1beta2() v1beta2.Interface } type group struct { @@ -43,12 +43,12 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} } -// V1beta2 returns a new v1beta2.Interface. -func (g *group) V1beta2() v1beta2.Interface { - return v1beta2.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) } + +// V1beta2 returns a new v1beta2.Interface. +func (g *group) V1beta2() v1beta2.Interface { + return v1beta2.New(g.factory, g.namespace, g.tweakListOptions) +} diff --git a/pkg/client/informers/externalversions/factory.go b/pkg/client/informers/externalversions/factory.go index 66f1e2369..014bac86e 100644 --- a/pkg/client/informers/externalversions/factory.go +++ b/pkg/client/informers/externalversions/factory.go @@ -27,9 +27,9 @@ import ( apisix "github.com/fluxcd/flagger/pkg/client/informers/externalversions/apisix" appmesh "github.com/fluxcd/flagger/pkg/client/informers/externalversions/appmesh" flagger "github.com/fluxcd/flagger/pkg/client/informers/externalversions/flagger" - gateway "github.com/fluxcd/flagger/pkg/client/informers/externalversions/gateway" gatewayapi "github.com/fluxcd/flagger/pkg/client/informers/externalversions/gatewayapi" gloo "github.com/fluxcd/flagger/pkg/client/informers/externalversions/gloo" + gloogateway "github.com/fluxcd/flagger/pkg/client/informers/externalversions/gloogateway" internalinterfaces "github.com/fluxcd/flagger/pkg/client/informers/externalversions/internalinterfaces" istio "github.com/fluxcd/flagger/pkg/client/informers/externalversions/istio" keda "github.com/fluxcd/flagger/pkg/client/informers/externalversions/keda" @@ -53,6 +53,7 @@ type sharedInformerFactory struct { lock sync.Mutex defaultResync time.Duration customResync map[reflect.Type]time.Duration + transform cache.TransformFunc informers map[reflect.Type]cache.SharedIndexInformer // startedInformers is used for tracking which informers have been started. @@ -91,6 +92,14 @@ func WithNamespace(namespace string) SharedInformerOption { } } +// WithTransform sets a transform on all informers. +func WithTransform(transform cache.TransformFunc) SharedInformerOption { + return func(factory *sharedInformerFactory) *sharedInformerFactory { + factory.transform = transform + return factory + } +} + // NewSharedInformerFactory constructs a new instance of sharedInformerFactory for all namespaces. func NewSharedInformerFactory(client versioned.Interface, defaultResync time.Duration) SharedInformerFactory { return NewSharedInformerFactoryWithOptions(client, defaultResync) @@ -177,7 +186,7 @@ func (f *sharedInformerFactory) WaitForCacheSync(stopCh <-chan struct{}) map[ref return res } -// InternalInformerFor returns the SharedIndexInformer for obj using an internal +// InformerFor returns the SharedIndexInformer for obj using an internal // client. func (f *sharedInformerFactory) InformerFor(obj runtime.Object, newFunc internalinterfaces.NewInformerFunc) cache.SharedIndexInformer { f.lock.Lock() @@ -195,6 +204,7 @@ func (f *sharedInformerFactory) InformerFor(obj runtime.Object, newFunc internal } informer = newFunc(f.client, resyncPeriod) + informer.SetTransform(f.transform) f.informers[informerType] = informer return informer @@ -250,16 +260,16 @@ type SharedInformerFactory interface { // ForResource gives generic access to a shared informer of the matching type. ForResource(resource schema.GroupVersionResource) (GenericInformer, error) - // InternalInformerFor returns the SharedIndexInformer for obj using an internal + // InformerFor returns the SharedIndexInformer for obj using an internal // client. InformerFor(obj runtime.Object, newFunc internalinterfaces.NewInformerFunc) cache.SharedIndexInformer Apisix() apisix.Interface Appmesh() appmesh.Interface Flagger() flagger.Interface - Gateway() gateway.Interface Gatewayapi() gatewayapi.Interface Gloo() gloo.Interface + Gateway() gloogateway.Interface Networking() istio.Interface Keda() keda.Interface Kuma() kuma.Interface @@ -280,10 +290,6 @@ func (f *sharedInformerFactory) Flagger() flagger.Interface { return flagger.New(f, f.namespace, f.tweakListOptions) } -func (f *sharedInformerFactory) Gateway() gateway.Interface { - return gateway.New(f, f.namespace, f.tweakListOptions) -} - func (f *sharedInformerFactory) Gatewayapi() gatewayapi.Interface { return gatewayapi.New(f, f.namespace, f.tweakListOptions) } @@ -292,6 +298,10 @@ func (f *sharedInformerFactory) Gloo() gloo.Interface { return gloo.New(f, f.namespace, f.tweakListOptions) } +func (f *sharedInformerFactory) Gateway() gloogateway.Interface { + return gloogateway.New(f, f.namespace, f.tweakListOptions) +} + func (f *sharedInformerFactory) Networking() istio.Interface { return istio.New(f, f.namespace, f.tweakListOptions) } diff --git a/pkg/client/informers/externalversions/gatewayapi/interface.go b/pkg/client/informers/externalversions/gatewayapi/interface.go index 3e1cb1652..81b645c5d 100644 --- a/pkg/client/informers/externalversions/gatewayapi/interface.go +++ b/pkg/client/informers/externalversions/gatewayapi/interface.go @@ -26,10 +26,10 @@ import ( // Interface provides access to each of this group's versions. type Interface interface { - // V1beta1 provides access to shared informers for resources in V1beta1. - V1beta1() v1beta1.Interface // V1 provides access to shared informers for resources in V1. V1() v1.Interface + // V1beta1 provides access to shared informers for resources in V1beta1. + V1beta1() v1beta1.Interface } type group struct { @@ -43,12 +43,12 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} } -// V1beta1 returns a new v1beta1.Interface. -func (g *group) V1beta1() v1beta1.Interface { - return v1beta1.New(g.factory, g.namespace, g.tweakListOptions) -} - // V1 returns a new v1.Interface. func (g *group) V1() v1.Interface { return v1.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/generic.go b/pkg/client/informers/externalversions/generic.go index 0158715f3..78431793a 100644 --- a/pkg/client/informers/externalversions/generic.go +++ b/pkg/client/informers/externalversions/generic.go @@ -27,8 +27,8 @@ import ( flaggerv1beta1 "github.com/fluxcd/flagger/pkg/apis/flagger/v1beta1" gatewayapiv1 "github.com/fluxcd/flagger/pkg/apis/gatewayapi/v1" gatewayapiv1beta1 "github.com/fluxcd/flagger/pkg/apis/gatewayapi/v1beta1" - v1 "github.com/fluxcd/flagger/pkg/apis/gloo/gateway/v1" - gloov1 "github.com/fluxcd/flagger/pkg/apis/gloo/gloo/v1" + gloov1 "github.com/fluxcd/flagger/pkg/apis/gloo/v1" + v1 "github.com/fluxcd/flagger/pkg/apis/gloogateway/v1" istiov1beta1 "github.com/fluxcd/flagger/pkg/apis/istio/v1beta1" v1alpha1 "github.com/fluxcd/flagger/pkg/apis/keda/v1alpha1" kumav1alpha1 "github.com/fluxcd/flagger/pkg/apis/kuma/v1alpha1" diff --git a/pkg/client/informers/externalversions/gloo/v1/upstream.go b/pkg/client/informers/externalversions/gloo/v1/upstream.go index 819b893b8..b8424978b 100644 --- a/pkg/client/informers/externalversions/gloo/v1/upstream.go +++ b/pkg/client/informers/externalversions/gloo/v1/upstream.go @@ -22,7 +22,7 @@ import ( "context" time "time" - gloov1 "github.com/fluxcd/flagger/pkg/apis/gloo/gloo/v1" + gloov1 "github.com/fluxcd/flagger/pkg/apis/gloo/v1" versioned "github.com/fluxcd/flagger/pkg/client/clientset/versioned" internalinterfaces "github.com/fluxcd/flagger/pkg/client/informers/externalversions/internalinterfaces" v1 "github.com/fluxcd/flagger/pkg/client/listers/gloo/v1" diff --git a/pkg/client/informers/externalversions/gateway/interface.go b/pkg/client/informers/externalversions/gloogateway/interface.go similarity index 97% rename from pkg/client/informers/externalversions/gateway/interface.go rename to pkg/client/informers/externalversions/gloogateway/interface.go index ba529a0e6..1728e9d02 100644 --- a/pkg/client/informers/externalversions/gateway/interface.go +++ b/pkg/client/informers/externalversions/gloogateway/interface.go @@ -16,10 +16,10 @@ limitations under the License. // Code generated by informer-gen. DO NOT EDIT. -package gateway +package gloogateway import ( - v1 "github.com/fluxcd/flagger/pkg/client/informers/externalversions/gateway/v1" + v1 "github.com/fluxcd/flagger/pkg/client/informers/externalversions/gloogateway/v1" internalinterfaces "github.com/fluxcd/flagger/pkg/client/informers/externalversions/internalinterfaces" ) diff --git a/pkg/client/informers/externalversions/gateway/v1/interface.go b/pkg/client/informers/externalversions/gloogateway/v1/interface.go similarity index 100% rename from pkg/client/informers/externalversions/gateway/v1/interface.go rename to pkg/client/informers/externalversions/gloogateway/v1/interface.go diff --git a/pkg/client/informers/externalversions/gateway/v1/routetable.go b/pkg/client/informers/externalversions/gloogateway/v1/routetable.go similarity index 93% rename from pkg/client/informers/externalversions/gateway/v1/routetable.go rename to pkg/client/informers/externalversions/gloogateway/v1/routetable.go index c86d190a3..c7b2fe8d9 100644 --- a/pkg/client/informers/externalversions/gateway/v1/routetable.go +++ b/pkg/client/informers/externalversions/gloogateway/v1/routetable.go @@ -22,10 +22,10 @@ import ( "context" time "time" - gatewayv1 "github.com/fluxcd/flagger/pkg/apis/gloo/gateway/v1" + gloogatewayv1 "github.com/fluxcd/flagger/pkg/apis/gloogateway/v1" versioned "github.com/fluxcd/flagger/pkg/client/clientset/versioned" internalinterfaces "github.com/fluxcd/flagger/pkg/client/informers/externalversions/internalinterfaces" - v1 "github.com/fluxcd/flagger/pkg/client/listers/gateway/v1" + v1 "github.com/fluxcd/flagger/pkg/client/listers/gloogateway/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -71,7 +71,7 @@ func NewFilteredRouteTableInformer(client versioned.Interface, namespace string, return client.GatewayV1().RouteTables(namespace).Watch(context.TODO(), options) }, }, - &gatewayv1.RouteTable{}, + &gloogatewayv1.RouteTable{}, resyncPeriod, indexers, ) @@ -82,7 +82,7 @@ func (f *routeTableInformer) defaultInformer(client versioned.Interface, resyncP } func (f *routeTableInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&gatewayv1.RouteTable{}, f.defaultInformer) + return f.factory.InformerFor(&gloogatewayv1.RouteTable{}, f.defaultInformer) } func (f *routeTableInformer) Lister() v1.RouteTableLister { diff --git a/pkg/client/listers/gloo/v1/upstream.go b/pkg/client/listers/gloo/v1/upstream.go index c4f50968a..0f7af0c20 100644 --- a/pkg/client/listers/gloo/v1/upstream.go +++ b/pkg/client/listers/gloo/v1/upstream.go @@ -19,7 +19,7 @@ limitations under the License. package v1 import ( - v1 "github.com/fluxcd/flagger/pkg/apis/gloo/gloo/v1" + v1 "github.com/fluxcd/flagger/pkg/apis/gloo/v1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache" diff --git a/pkg/client/listers/gateway/v1/expansion_generated.go b/pkg/client/listers/gloogateway/v1/expansion_generated.go similarity index 100% rename from pkg/client/listers/gateway/v1/expansion_generated.go rename to pkg/client/listers/gloogateway/v1/expansion_generated.go diff --git a/pkg/client/listers/gateway/v1/routetable.go b/pkg/client/listers/gloogateway/v1/routetable.go similarity index 98% rename from pkg/client/listers/gateway/v1/routetable.go rename to pkg/client/listers/gloogateway/v1/routetable.go index 9db84cca8..3298a6b13 100644 --- a/pkg/client/listers/gateway/v1/routetable.go +++ b/pkg/client/listers/gloogateway/v1/routetable.go @@ -19,7 +19,7 @@ limitations under the License. package v1 import ( - v1 "github.com/fluxcd/flagger/pkg/apis/gloo/gateway/v1" + v1 "github.com/fluxcd/flagger/pkg/apis/gloogateway/v1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache" diff --git a/pkg/router/gloo.go b/pkg/router/gloo.go index 4b3c1b3bd..267eb6c19 100644 --- a/pkg/router/gloo.go +++ b/pkg/router/gloo.go @@ -23,8 +23,8 @@ import ( corev1 "k8s.io/api/core/v1" - gatewayv1 "github.com/fluxcd/flagger/pkg/apis/gloo/gateway/v1" - gloov1 "github.com/fluxcd/flagger/pkg/apis/gloo/gloo/v1" + gloov1 "github.com/fluxcd/flagger/pkg/apis/gloo/v1" + gatewayv1 "github.com/fluxcd/flagger/pkg/apis/gloogateway/v1" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" "go.uber.org/zap" diff --git a/pkg/router/gloo_test.go b/pkg/router/gloo_test.go index a6c321d5b..0032254ce 100644 --- a/pkg/router/gloo_test.go +++ b/pkg/router/gloo_test.go @@ -21,7 +21,7 @@ import ( "fmt" "testing" - gatewayv1 "github.com/fluxcd/flagger/pkg/apis/gloo/gateway/v1" + gatewayv1 "github.com/fluxcd/flagger/pkg/apis/gloogateway/v1" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require"