From 55eef849d8499d0cfb98662bf67c945aa28be0e4 Mon Sep 17 00:00:00 2001 From: Vu Dinh Date: Tue, 21 Sep 2021 17:19:19 -0400 Subject: [PATCH] Add olm-managed label to configmap-based catalogsource for e2e test 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 --- test/e2e/util_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/e2e/util_test.go b/test/e2e/util_test.go index 18be4dddf3..1b3e768609 100644 --- a/test/e2e/util_test.go +++ b/test/e2e/util_test.go @@ -39,6 +39,7 @@ import ( "github.com/operator-framework/api/pkg/operators/v1alpha1" operatorsv1alpha1 "github.com/operator-framework/api/pkg/operators/v1alpha1" "github.com/operator-framework/operator-lifecycle-manager/pkg/api/client/clientset/versioned" + "github.com/operator-framework/operator-lifecycle-manager/pkg/controller/install" "github.com/operator-framework/operator-lifecycle-manager/pkg/controller/registry" controllerclient "github.com/operator-framework/operator-lifecycle-manager/pkg/lib/controller-runtime/client" "github.com/operator-framework/operator-lifecycle-manager/pkg/lib/operatorclient" @@ -657,6 +658,7 @@ func createConfigMapForCatalogData(c operatorclient.ClientInterface, name, names ObjectMeta: metav1.ObjectMeta{ Name: configMapName, Namespace: namespace, + Labels: map[string]string{install.OLMManagedLabelKey: install.OLMManagedLabelValue}, }, Data: map[string]string{}, } @@ -703,6 +705,7 @@ func createV1CRDConfigMapForCatalogData(t GinkgoTInterface, c operatorclient.Cli ObjectMeta: metav1.ObjectMeta{ Name: configMapName, Namespace: namespace, + Labels: map[string]string{install.OLMManagedLabelKey: install.OLMManagedLabelValue}, }, Data: map[string]string{}, }