Skip to content

Commit

Permalink
Add olm-managed label to configmap-based catalogsource for e2e test (#…
Browse files Browse the repository at this point in the history
…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 <vudinh@outlook.com>
  • Loading branch information
dinhxuanvu committed Sep 22, 2021
1 parent e48737c commit 8b0ac13
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/e2e/util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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{},
}
Expand Down Expand Up @@ -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{},
}
Expand Down

0 comments on commit 8b0ac13

Please sign in to comment.