Skip to content

Commit 15a30ab

Browse files
dinhxuanvunjhale
authored andcommitted
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]> Upstream-repository: operator-lifecycle-manager Upstream-commit: 8b0ac13809b5155e4b7f1415e2fb37a060c3fe07
1 parent 018a01f commit 15a30ab

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

staging/operator-lifecycle-manager/test/e2e/util_test.go

Lines changed: 3 additions & 0 deletions
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)