Open lagivan opened 2 years ago
As a workaround, I've packaged an OLM release myself with custom values.yaml
as described in https://github.com/operator-framework/operator-lifecycle-manager/blob/master/doc/install/install.md#customizing-olm-installation This helped me to set custom namespaces. However, it's not handy, I'd prefer to use the official release with environmental variable working as expected.
Hello @lagivan, it seems as though there has been some drift in the documentation and the code, as shown in this search, the environment variable you've set is never used.
The supported approach to changing the global catalog namespace is by editing this line in the catalog-operator deployment. In your case, you would change olm
to openshift-marketplace
.
We'll use this issue to track the need to update the doc you referenced.
@awgreene would not it be better to use the environmental variable instead? It would add flexibility. Hardcoding such values is usually a bad practice.
Bug Report
My main goal is to use a non-default global catalog namespace instead of
olm
but I've got an issue with it using the documented approach.What did you do? I've installed OLM from yaml files:
Then I've patched the catalog operator deployment with environment variable
GLOBAL_CATALOG_NAMESPACE
set to aopenshift-marketplace
value:Where the
olm-deployment-patch.yaml
is the following:Now it's possible to install an operator from the chosen global catalog namespace:
Till this point it works as expected. Without
GLOBAL_CATALOG_NAMESPACE
env variable the operator would not install at all so the global catalog namespace setting is partially working.What did you expect to see? I expect that retrieving the list of available operators via namespaced
packagemanifest
should list operators from the new global catalog namespace as well (as documented here - https://operator-framework.github.io/olm-book/docs/list-available-operators.html). So the commandkubectl get packagemanifest -n custom
should list the operators fromibm-operator-catalog
inopenshift-marketplace
namespace which is global catalog namespace.What did you see instead? Under which circumstances? However, when retrieving the list of available operators via namespaced
packagemanifest
, it shows only the Community Operators from "olm" namespace (operatorhubio-catalog):will show
At the same time non-namespaces packagemanifest will list all operators, both from
operatorhubio-catalog
andibm-operator-catalog
which proves there is no issue with catalogs themselves:will show:
An addition the HTTP call to Kubernetes apiserver shows the same issue: https://:443/apis/packages.operators.coreos.com/v1/namespaces/custom/packagemanifests
will show only community operators.
Unfortunately, I have a hard dependency on this HTTP call so I need packagemanifests to work with custom global catalog namespace.
Environment
operator-lifecycle-manager version: 0.22.0
Kubernetes version information:
Kubernetes cluster kind: GKE cloud cluster