mirror of
https://github.com/fluxcd/flagger.git
synced 2026-04-15 06:57:34 +00:00
fix: fix codegen script and update generated code
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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}
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
)
|
||||
|
||||
@@ -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"
|
||||
|
||||
+1
-1
@@ -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"
|
||||
)
|
||||
+1
-1
@@ -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"
|
||||
+1
-1
@@ -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"
|
||||
)
|
||||
+1
-1
@@ -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"
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
+2
-2
@@ -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"
|
||||
)
|
||||
|
||||
+4
-4
@@ -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 {
|
||||
@@ -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"
|
||||
|
||||
+1
-1
@@ -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"
|
||||
Reference in New Issue
Block a user