Skip to content

Commit

Permalink
Fix the internal cache object selector
Browse files Browse the repository at this point in the history
Signed-off-by: FillZpp <[email protected]>
  • Loading branch information
FillZpp committed Oct 21, 2021
1 parent 1462c6e commit fc9db3a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pkg/cache/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,11 @@ type Informer interface {
HasSynced() bool
}

// ObjectSelector is an alias name of internal.Selector.
type ObjectSelector internal.Selector

// SelectorsByObject associate a client.Object's GVK to a field/label selector.
type SelectorsByObject map[client.Object]internal.Selector
type SelectorsByObject map[client.Object]ObjectSelector

// Options are the optional arguments for creating a new InformersMap object.
type Options struct {
Expand Down Expand Up @@ -198,7 +201,7 @@ func convertToSelectorsByGVK(selectorsByObject SelectorsByObject, scheme *runtim
if err != nil {
return nil, err
}
selectorsByGVK[gvk] = selector
selectorsByGVK[gvk] = internal.Selector(selector)
}
return selectorsByGVK, nil
}
Expand Down

0 comments on commit fc9db3a

Please sign in to comment.