Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🌱 Use ClientUncachedObjects name consistently #4758

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions controllers/remote/cluster_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,19 +68,19 @@ type ClusterCacheTrackerOptions struct {
// Defaults to a no-op logger if it's not set.
Log logr.Logger

// ClientDisableCacheFor instructs the Client to never cache the following objects,
// ClientUncachedObjects instructs the Client to never cache the following objects,
// it'll instead query the API server directly.
// Defaults to never caching ConfigMap and Secret if not set.
ClientDisableCacheFor []client.Object
ClientUncachedObjects []client.Object
}

func setDefaultOptions(opts *ClusterCacheTrackerOptions) {
if opts.Log == nil {
opts.Log = log.NullLogger{}
}

if len(opts.ClientDisableCacheFor) == 0 {
opts.ClientDisableCacheFor = []client.Object{
if len(opts.ClientUncachedObjects) == 0 {
opts.ClientUncachedObjects = []client.Object{
&corev1.ConfigMap{},
&corev1.Secret{},
}
Expand All @@ -93,7 +93,7 @@ func NewClusterCacheTracker(manager ctrl.Manager, options ClusterCacheTrackerOpt

return &ClusterCacheTracker{
log: options.Log,
clientUncachedObjects: options.ClientDisableCacheFor,
clientUncachedObjects: options.ClientUncachedObjects,
client: manager.GetClient(),
scheme: manager.GetScheme(),
clusterAccessors: make(map[client.ObjectKey]*clusterAccessor),
Expand Down