Skip to content

Commit

Permalink
operators/catalog: don't watch copied CSVs
Browse files Browse the repository at this point in the history
As far as I can tell, we never do anything with them.

Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
  • Loading branch information
stevekuznetsov committed Aug 3, 2023
1 parent a10b7bd commit 58adbea
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/controller/operators/catalog/operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,9 @@ func NewOperator(ctx context.Context, kubeconfigPath string, clock utilclock.Clo
// Fields are pruned from local copies of the objects managed
// by this informer in order to reduce cached size.
prunedCSVInformer := cache.NewSharedIndexInformer(
pruning.NewListerWatcher(op.client, metav1.NamespaceAll, func(*metav1.ListOptions) {}, pruning.PrunerFunc(func(csv *v1alpha1.ClusterServiceVersion) {
pruning.NewListerWatcher(op.client, metav1.NamespaceAll, func(options *metav1.ListOptions) {
options.LabelSelector = fmt.Sprintf("!%s", v1alpha1.CopiedLabelKey)
}, pruning.PrunerFunc(func(csv *v1alpha1.ClusterServiceVersion) {
*csv = v1alpha1.ClusterServiceVersion{
TypeMeta: csv.TypeMeta,
ObjectMeta: metav1.ObjectMeta{
Expand Down

0 comments on commit 58adbea

Please sign in to comment.