From 02fb96040881a29b1631c1018ca1ed173d5e6b89 Mon Sep 17 00:00:00 2001 From: Haywood Shannon <5781935+haywoodsh@users.noreply.github.com> Date: Mon, 29 Apr 2024 12:02:04 +0100 Subject: [PATCH] update codegen Signed-off-by: Haywood Shannon <5781935+haywoodsh@users.noreply.github.com> Signed-off-by: Haywood Shannon <5781935+haywoodsh@users.noreply.github.com> --- pkg/apis/configuration/v1/zz_generated.deepcopy.go | 10 ++++++++++ .../configuration/v1alpha1/zz_generated.deepcopy.go | 10 ++++++++++ pkg/client/informers/externalversions/factory.go | 10 ++++++++++ 3 files changed, 30 insertions(+) diff --git a/pkg/apis/configuration/v1/zz_generated.deepcopy.go b/pkg/apis/configuration/v1/zz_generated.deepcopy.go index eff7270ab8..6e3c172a0f 100644 --- a/pkg/apis/configuration/v1/zz_generated.deepcopy.go +++ b/pkg/apis/configuration/v1/zz_generated.deepcopy.go @@ -1244,6 +1244,11 @@ func (in *TransportServerUpstream) DeepCopyInto(out *TransportServerUpstream) { *out = new(TransportServerHealthCheck) (*in).DeepCopyInto(*out) } + if in.BackupPort != nil { + in, out := &in.BackupPort, &out.BackupPort + *out = new(uint16) + **out = **in + } return } @@ -1308,6 +1313,11 @@ func (in *Upstream) DeepCopyInto(out *Upstream) { *out = new(SessionCookie) **out = **in } + if in.BackupPort != nil { + in, out := &in.BackupPort, &out.BackupPort + *out = new(uint16) + **out = **in + } return } diff --git a/pkg/apis/configuration/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/configuration/v1alpha1/zz_generated.deepcopy.go index 9564cefb0e..bc1cedef38 100644 --- a/pkg/apis/configuration/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/configuration/v1alpha1/zz_generated.deepcopy.go @@ -577,6 +577,16 @@ func (in *TransportServerUpstream) DeepCopyInto(out *TransportServerUpstream) { *out = new(TransportServerHealthCheck) (*in).DeepCopyInto(*out) } + if in.Backup != nil { + in, out := &in.Backup, &out.Backup + *out = new(string) + **out = **in + } + if in.BackupPort != nil { + in, out := &in.BackupPort, &out.BackupPort + *out = new(int) + **out = **in + } return } diff --git a/pkg/client/informers/externalversions/factory.go b/pkg/client/informers/externalversions/factory.go index 1176548bcc..5520b43717 100644 --- a/pkg/client/informers/externalversions/factory.go +++ b/pkg/client/informers/externalversions/factory.go @@ -28,6 +28,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. @@ -66,6 +67,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) @@ -170,6 +179,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