Skip to content

Commit

Permalink
Merge pull request #1703 from FillZpp/fix-internal-cache-object-selector
Browse files Browse the repository at this point in the history
🐛 Fix the internal cache object selector
  • Loading branch information
k8s-ci-robot authored Oct 25, 2021
2 parents 1462c6e + fc9db3a commit c73b143
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 c73b143

Please sign in to comment.