Skip to content

Commit 58adbea

Browse files
operators/catalog: don't watch copied CSVs
As far as I can tell, we never do anything with them. Signed-off-by: Steve Kuznetsov <[email protected]>
1 parent a10b7bd commit 58adbea

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pkg/controller/operators/catalog/operator.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,9 @@ func NewOperator(ctx context.Context, kubeconfigPath string, clock utilclock.Clo
204204
// Fields are pruned from local copies of the objects managed
205205
// by this informer in order to reduce cached size.
206206
prunedCSVInformer := cache.NewSharedIndexInformer(
207-
pruning.NewListerWatcher(op.client, metav1.NamespaceAll, func(*metav1.ListOptions) {}, pruning.PrunerFunc(func(csv *v1alpha1.ClusterServiceVersion) {
207+
pruning.NewListerWatcher(op.client, metav1.NamespaceAll, func(options *metav1.ListOptions) {
208+
options.LabelSelector = fmt.Sprintf("!%s", v1alpha1.CopiedLabelKey)
209+
}, pruning.PrunerFunc(func(csv *v1alpha1.ClusterServiceVersion) {
208210
*csv = v1alpha1.ClusterServiceVersion{
209211
TypeMeta: csv.TypeMeta,
210212
ObjectMeta: metav1.ObjectMeta{

0 commit comments

Comments
 (0)