Comments (7)
@eivantsov By default, OLM watches all namespaces in OpenShift 4.0. As of now, a Subscription must exist in a namespace with CatalogSources that contain its dependencies (or they are available in the "global catalog" namespace, openshift-operator-lifecycle-manager
). Additionally, a CSV requires a supported OperatorGroup
be present in its namespace to provide some minimal multi-tenancy configuration. By supported, I mean that the CSV's InstallModes
must match the OperatorGroup's configuration.
If you have a CatalogSource that contains your operator dependencies, I suggest:
- Creating it in the namespace you want to install your operator in.
- Create an OperatorGroup that will support your CSV's InstallModes in that namespace.
- Creating a Subscription that targets your CSV and CatalogSource in that namespace.
from operator-lifecycle-manager.
@njhale thanks, that's helpful. Perhaps you can suggest configuration for the following use case:
- The operator is available in OperatorHub.
- I need this operator to be only installed in a particular namespace (say, an admin creates a namespace and an
OperatorGroup
in it) - I do not want the installed Operator to be copied to other namespaces once installed.
If in InstallModes
I set:
installModes:
- supported: true
type: OwnNamespace
- supported: true
type: SingleNamespace
- supported: false
type: MultiNamespace
- supported: false
type: AllNamespaces
Will I be able to achieve the above goals? The idea is to make the Operator admin only, since once installed, it will provision resources that will be available cluster wide anyway, and user won't need to do anything but click a route link to start using the service.
from operator-lifecycle-manager.
@eivantsov Yes, your InstallModes look correct - you should only need to create an OperatorGroup set to select its own namespace and tell OperatorHub to generate a new CatalogSource containing your operator in your OperatorGroup namespace. I'm not sure if OperatorHub is configured to watch all namespaces, but it it is I'm pretty sure this is achieved by creating a CatalogSourceConfig in the operator-marketplace
namespace. From what I remember, this CatalogSourceConfig should select both your operator's package and dependent packages as well as the namespace you want the CatalogSource to be generated in (your OperatorGroup's namespace).
from operator-lifecycle-manager.
I'm not sure if OperatorHub is configured to watch all namespaces,
OperatorHub only watches the operator-marketplace
namespace.
From what I remember, this CatalogSourceConfig should select both your operator's package and dependent packages as well as the namespace you want the CatalogSource to be generated in (your OperatorGroup's namespace).
Confirming that this indeed the case. targetNamespace
in the CatalogSourceConfig
should be set to the namespace you want the CatalogSource
to be generated in. This is also the namespace where you need to create the Subscription
object for your operator.
from operator-lifecycle-manager.
@njhale @aravindhp I gave it a try with the above InstallModes
.
- oc create new-project eclipse-che
- oc apply -f operatorgroup.yaml -n=eclipse-che
apiVersion: operators.coreos.com/v1alpha2
kind: OperatorGroup
metadata:
name: global-operators
- Installed the operator from Operator Hub in eclipse-che namespace. The installation failed with:
- I can see that the installed operator showed up in all namespaces as failed:
from operator-lifecycle-manager.
It looks like the operator was not actually installed. There should be no deployment for your operator running in the eclipse-che
namespace. While the copied message is not all that helpful, the parent CSV is giving the correct failure message: "AllNamespaces InstallModeType not supported...". Which makes sense given that you created a global operatorgroup (omitting targetNamespaces or selector yields a global operatorgroup):
apiVersion: operators.coreos.com/v1alpha2
kind: OperatorGroup
metadata:
name: global-operators
And your CSV does not support all namespaces:
installModes:
.
.
.
- supported: false
type: AllNamespaces
I suggest updating your operatorgroup:
apiVersion: operators.coreos.com/v1alpha2
kind: OperatorGroup
metadata:
name: che-group
namespace: eclipse-che
spec:
targetNamespaces:
- eclipse-che
from operator-lifecycle-manager.
@njhale thanks - that was it. I almost got to the stage of looking for OperatorGroup spec somewhere :)
from operator-lifecycle-manager.
Related Issues (20)
- I want to use my privet registry for all images
- The catalog source pod can not migrate when the node becomes NotReady HOT 2
- Subscription is stuck when installing same operator multiple times into different namespaces at different dates
- Improve Makefile to avoid unnecessarily shelling out multiple times for the same variables
- support cacheless catalogsources
- Deployment "olm/packageserver" never appears on install HOT 1
- Startup Probe kills "/bin/opm serve" process and prevents operatorhubio pod to start HOT 4
- Unpin prometheus library versions from go.mod
- Unpin google.golang.org/grpc from go.mod
- Move away from actions/create-release@v1 HOT 1
- Remove downstream e2e test
- error: the server doesn't have a resource type "packagemanifest"; operator-lifecycle-manager apiServices not installed [GKE] HOT 3
- Automate test image (re)generation
- Drop quay.io/olmtest
- OLM - running in a restricted environment.
- OLM v0.28.0 - Subscription with toleration NOT WORKING (Bug)
- Critical and High CVEs in latest OLM version ("operatorhubio/catalog")
- Trying to add an updated version of a CRD and encountering problems
- I can't delete OLM and all namespaces created by OLM - Namespaces stuck terminating. HOT 1
- OLM Bundle unpacker fails when default service account automounting token is disabled
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from operator-lifecycle-manager.