1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-06 06:46:26 +01:00
Files
openshift-docs/modules/olm-catalogsource.adoc

54 lines
1.7 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/operatorhubio/catalog:latest <1>
priority: -400
displayName: Community Operators
publisher: OperatorHub.io
updateStrategy:
registryPoll: <2>
interval: 30m
----
<1> Specify catalog image.
<2> Automatically check for new versions at a given interval to keep up to date.
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
----