Skip to content

Commit

Permalink
Client: use passed in Cache.DisableFor option
Browse files Browse the repository at this point in the history
  • Loading branch information
sbueringer committed May 5, 2023
1 parent 07a8152 commit bb69785
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,13 +191,13 @@ func newClient(config *rest.Config, options Options) (*client, error) {

// Load uncached GVKs.
c.cacheUnstructured = options.Cache.Unstructured
uncachedGVKs := map[schema.GroupVersionKind]struct{}{}
c.uncachedGVKs = map[schema.GroupVersionKind]struct{}{}
for _, obj := range options.Cache.DisableFor {
gvk, err := c.GroupVersionKindFor(obj)
if err != nil {
return nil, err
}
uncachedGVKs[gvk] = struct{}{}
c.uncachedGVKs[gvk] = struct{}{}
}
return c, nil
}
Expand Down

0 comments on commit bb69785

Please sign in to comment.