We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a26de2d + 2251039 commit c3c1f05Copy full SHA for c3c1f05
pkg/cache/cache.go
@@ -194,16 +194,18 @@ type ByObject struct {
194
195
// New initializes and returns a new Cache.
196
func New(config *rest.Config, opts Options) (Cache, error) {
197
- opts, err := defaultOpts(config, opts)
198
- if err != nil {
199
- return nil, err
200
- }
201
if len(opts.Namespaces) == 0 {
202
opts.Namespaces = []string{metav1.NamespaceAll}
203
}
204
if len(opts.Namespaces) > 1 {
205
return newMultiNamespaceCache(config, opts)
206
+
+ opts, err := defaultOpts(config, opts)
+ if err != nil {
+ return nil, err
207
+ }
208
209
byGVK, err := convertToInformerOptsByGVK(opts.ByObject, opts.Scheme)
210
if err != nil {
211
return nil, err
0 commit comments