Skip to content

Commit 8b0ac13

Browse files
authored
Add olm-managed label to configmap-based catalogsource for e2e test (#2370)
Currently, OLM only caches configmap with olm-managed label to reduce memory usage footprint. There is an automatic mechanism to inject this label to all configmaps that belong to catalogsource. However, for e2e test, this label should be added by default to avoid extra logic to be executed. Signed-off-by: Vu Dinh <[email protected]>
1 parent e48737c commit 8b0ac13

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/e2e/util_test.go

+3
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ import (
3939
"github.com/operator-framework/api/pkg/operators/v1alpha1"
4040
operatorsv1alpha1 "github.com/operator-framework/api/pkg/operators/v1alpha1"
4141
"github.com/operator-framework/operator-lifecycle-manager/pkg/api/client/clientset/versioned"
42+
"github.com/operator-framework/operator-lifecycle-manager/pkg/controller/install"
4243
"github.com/operator-framework/operator-lifecycle-manager/pkg/controller/registry"
4344
controllerclient "github.com/operator-framework/operator-lifecycle-manager/pkg/lib/controller-runtime/client"
4445
"github.com/operator-framework/operator-lifecycle-manager/pkg/lib/operatorclient"
@@ -657,6 +658,7 @@ func createConfigMapForCatalogData(c operatorclient.ClientInterface, name, names
657658
ObjectMeta: metav1.ObjectMeta{
658659
Name: configMapName,
659660
Namespace: namespace,
661+
Labels: map[string]string{install.OLMManagedLabelKey: install.OLMManagedLabelValue},
660662
},
661663
Data: map[string]string{},
662664
}
@@ -703,6 +705,7 @@ func createV1CRDConfigMapForCatalogData(t GinkgoTInterface, c operatorclient.Cli
703705
ObjectMeta: metav1.ObjectMeta{
704706
Name: configMapName,
705707
Namespace: namespace,
708+
Labels: map[string]string{install.OLMManagedLabelKey: install.OLMManagedLabelValue},
706709
},
707710
Data: map[string]string{},
708711
}

0 commit comments

Comments
 (0)