mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-07 00:48:01 +01:00
51 lines
1.6 KiB
Plaintext
51 lines
1.6 KiB
Plaintext
// Module included in the following assemblies:
|
|
//
|
|
// * operators/understanding/olm/olm-understanding-olm.adoc
|
|
|
|
[id="olm-catalogsource_{context}"]
|
|
= CatalogSource
|
|
|
|
A CatalogSource represents a store of metadata that OLM can query to discover
|
|
and install Operators and their dependencies. The spec of a CatalogSource
|
|
indicates how to construct a Pod or how to communicate with a service that
|
|
serves the Operator Registry gRPC API.
|
|
|
|
There are three primary `sourceTypes` for a CatalogSource:
|
|
|
|
* `grpc` with an `image` reference: OLM pulls the image and runs the Pod, which is expected to serve a compliant API.
|
|
* `grpc` with an `address` field: OLM attempts to contact the gRPC API at the given address. This should not be used in most cases.
|
|
* `internal` or `configmap`: OLM parses the ConfigMap data and runs a Pod that can serve the gRPC API over it.
|
|
|
|
.Example CatalogSource
|
|
[source,yaml]
|
|
----
|
|
apiVersion: operators.coreos.com/v1alpha1
|
|
kind: CatalogSource
|
|
metadata:
|
|
name: operatorhubio-catalog
|
|
namespace: olm
|
|
spec:
|
|
sourceType: grpc
|
|
image: quay.io/operator-framework/upstream-community-operators:latest
|
|
displayName: Community Operators
|
|
publisher: OperatorHub.io
|
|
----
|
|
|
|
This example defines a CatalogSource for OperatorHub.io content. The name of
|
|
the CatalogSource is used as input to a Subscription, which instructs OLM where
|
|
to look to find a requested Operator:
|
|
|
|
.Example Subscription referencing CatalogSource
|
|
[source,yaml]
|
|
----
|
|
apiVersion: operators.coreos.com/v1alpha1
|
|
kind: Subscription
|
|
metadata:
|
|
name: my-operator
|
|
namespace: olm
|
|
spec:
|
|
channel: stable
|
|
name: my-operator
|
|
source: operatorhubio-catalog
|
|
----
|