From 2c594459d151e487e8eebc284e858200778ccffd Mon Sep 17 00:00:00 2001 From: Vince Prignano Date: Thu, 11 May 2023 08:20:29 -0700 Subject: [PATCH] :seedling: Fix comment on MultiNamespaceCache Signed-off-by: Vince Prignano --- pkg/cache/cache.go | 3 +++ pkg/cache/multi_namespace_cache.go | 5 +---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/cache/cache.go b/pkg/cache/cache.go index f81bdcda44..f01de43810 100644 --- a/pkg/cache/cache.go +++ b/pkg/cache/cache.go @@ -191,6 +191,9 @@ type ByObject struct { UnsafeDisableDeepCopy *bool } +// NewCacheFunc - Function for creating a new cache from the options and a rest config. +type NewCacheFunc func(config *rest.Config, opts Options) (Cache, error) + // New initializes and returns a new Cache. func New(config *rest.Config, opts Options) (Cache, error) { if len(opts.Namespaces) == 0 { diff --git a/pkg/cache/multi_namespace_cache.go b/pkg/cache/multi_namespace_cache.go index f2ef6aa2f3..ac97beae94 100644 --- a/pkg/cache/multi_namespace_cache.go +++ b/pkg/cache/multi_namespace_cache.go @@ -31,9 +31,6 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client/apiutil" ) -// NewCacheFunc - Function for creating a new cache from the options and a rest config. -type NewCacheFunc func(config *rest.Config, opts Options) (Cache, error) - // a new global namespaced cache to handle cluster scoped resources. const globalCache = "_cluster-scope" @@ -44,7 +41,7 @@ const globalCache = "_cluster-scope" // to be used for excluding namespaces, this is better done via a Predicate. Also note that // you may face performance issues when using this with a high number of namespaces. // -// Deprecated: Use cache.Options.View.Namespaces instead. +// Deprecated: Use cache.Options.Namespaces instead. func MultiNamespacedCacheBuilder(namespaces []string) NewCacheFunc { return func(config *rest.Config, opts Options) (Cache, error) { opts.Namespaces = namespaces