Skip to content
This repository has been archived by the owner on Apr 25, 2023. It is now read-only.

Commit

Permalink
chore: Remove redundant SetNamespace call and fix up comment
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmidyson committed Feb 27, 2020
1 parent 282bfb2 commit 638f523
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pkg/controller/util/resourceinformer.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ func newResourceInformer(client ResourceClient, namespace string, apiResource *m
if apiResource != nil {
gvk := schema.GroupVersionKind{Group: apiResource.Group, Version: apiResource.Version, Kind: apiResource.Kind}
obj.SetGroupVersionKind(gvk)
obj.SetNamespace(namespace)
}
return cache.NewInformer(
&cache.ListWatch{
Expand All @@ -60,7 +59,7 @@ func newResourceInformer(client ResourceClient, namespace string, apiResource *m
return client.Resources(namespace).Watch(options)
},
},
obj, // use a unstructured type with apiVersion / Kind populated for informer logging purposes
obj, // use an unstructured type with apiVersion / kind populated for informer logging purposes
NoResyncPeriod,
NewTriggerOnAllChanges(triggerFunc),
)
Expand Down

0 comments on commit 638f523

Please sign in to comment.