chore: update tools
This commit is contained in:
parent
d854a2abf0
commit
0e6daf4e9c
4
Makefile
4
Makefile
|
@ -28,8 +28,8 @@ HELM_CHART_URL ?= https://raw.githubusercontent.com/dapr/helm-charts/master/dapr
|
|||
OPENSHIFT_VERSIONS ?= v4.12-v4.15
|
||||
|
||||
## Tool Versions
|
||||
CODEGEN_VERSION ?= v0.28.8
|
||||
KUSTOMIZE_VERSION ?= v5.3.0
|
||||
CODEGEN_VERSION ?= v0.29.4
|
||||
KUSTOMIZE_VERSION ?= v5.4.1
|
||||
CONTROLLER_TOOLS_VERSION ?= v0.14.0
|
||||
KIND_VERSION ?= v0.22.0
|
||||
LINTER_VERSION ?= v1.57.2
|
||||
|
|
|
@ -21,7 +21,7 @@ limitations under the License.
|
|||
package v1alpha1
|
||||
|
||||
import (
|
||||
"k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
)
|
||||
|
||||
|
|
|
@ -41,6 +41,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.
|
||||
|
@ -79,6 +80,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)
|
||||
|
@ -183,6 +192,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
|
||||
|
|
Loading…
Reference in New Issue