Skip to content

Commit

Permalink
use apimachinery.sets instead of maps (#933)
Browse files Browse the repository at this point in the history
Signed-off-by: Igor Troyanovsky <itroyano@redhat.com>
  • Loading branch information
itroyano committed Jun 13, 2024
1 parent 8041cc4 commit 5798a4a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/controllers/clusterextension_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ type ClusterExtensionReconciler struct {
Storage storage.Storage
Handler registryv1handler.Handler
dynamicWatchMutex sync.RWMutex
dynamicWatchGVKs map[schema.GroupVersionKind]struct{}
dynamicWatchGVKs sets.Set[schema.GroupVersionKind]
controller crcontroller.Controller
cache cache.Cache
InstalledBundleGetter InstalledBundleGetter
Expand Down Expand Up @@ -346,7 +346,7 @@ func (r *ClusterExtensionReconciler) reconcile(ctx context.Context, ext *ocv1alp
); err != nil {
return err
}
r.dynamicWatchGVKs[obj.GetObjectKind().GroupVersionKind()] = struct{}{}
r.dynamicWatchGVKs[obj.GetObjectKind().GroupVersionKind()] = sets.Empty{}
}
return nil
}(); err != nil {
Expand Down Expand Up @@ -582,7 +582,7 @@ func (r *ClusterExtensionReconciler) SetupWithManager(mgr ctrl.Manager) error {
}
r.controller = controller
r.cache = mgr.GetCache()
r.dynamicWatchGVKs = map[schema.GroupVersionKind]struct{}{}
r.dynamicWatchGVKs = sets.New[schema.GroupVersionKind]()

return nil
}
Expand Down

0 comments on commit 5798a4a

Please sign in to comment.