On OpenShift clusters, the marketplace-operator makes off-cluster Quay Appregistry type catalogs available to OLM. It is installed by default with OpenShift.
The marketplace-operator can be told to pull a catalog from Appregistry by creating an
apiVersion: operators.coreos.com/v1 kind: OperatorSource metadata: name: my-operators namespace: openshift-marketplace spec: type: appregistry endpoint: https://quay.io/cnr registryNamespace: my-operators displayName: "My Operators" publisher: "Me, Myself, and I"
typeis the registry type (
appregistrybeing the only supported type)
endpointis the Appregistry endpoint
registryNamespaceis the name of your Appregistry namespace
publisherare optional and only needed for UI purposes
The creation of an
OperatorSource results in the creation of an OLM
CatalogSource in the same namespace the marketplace-operator is running in. This
CatalogSource will be populated with operators from the
OperatorSource ready to be managed by OLM.
In versions of OpenShift > 4.2, all
CatalogSources generated by the marketplace-operator in the
openshift-marketplace namespace are available for use in all namespaces.
The marketplace-operator is installed by default into the
openshift-marketplace namespace along with three Red Hat provided
community-operators, which represent operators published by redhat, ISVs (Independent Software Vendors), and upstream community members respectively.
In versions of OpenShift > 4.2, The default behavior of the marketplace-operator ensures these
OperatorSources always exist on a cluster, even if they are manually deleted.
You can manually configure which
marketplace-operator recreates by creating an
apiVersion: config.openshift.io/v1 kind: OperatorHub metadata: name: cluster spec: sources: - name: "community-operators" disabled: true
Alternatively, to disable all default
OperatorSources, you can use the
apiVersion: config.openshift.io/v1 kind: OperatorHub metadata: name: cluster spec: disableAllDefaultSources: true
sources takes precedent over
disableAllDefaultSources if it has entries defined.
OperatorSource is disabled, the
marketplace-operator will automatically delete it if present.
$ cat <<EOF >version-patch.yaml - op: add path: /spec/overrides/- value: kind: OperatorSource name: community-operators namespace: openshift-marketplace unmanaged: true EOF $ kubectl patch clusterversion version --type json -p "$(cat version-patch.yaml)" ...
_Note: In OpenShift 4.1, default
OperatorSources won’t be deleted automatically when disabled.