1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00
Files
openshift-docs/modules/olmv1-finding-operators-to-install.adoc
2024-12-13 20:46:51 +00:00

117 lines
3.0 KiB
Plaintext

// Module included in the following assemblies:
//
// * operators/olm_v1/olmv1-installing-an-operator-from-a-catalog.adoc
:_mod-docs-content-type: PROCEDURE
[id="olmv1-finding-operators-to-install_{context}"]
= Finding Operators to install from a catalog
After you add a catalog to your cluster, you can query the catalog to find Operators and extensions to install.
include::snippets/olmv1-on-cluster-catalog-queries.adoc[]
.Prerequisites
* You have added a catalog to your cluster.
* You have installed the `jq` CLI tool.
* You have installed the `opm` CLI tool.
.Procedure
. To return a list of extensions that support the `AllNamespaces` install mode and do not use webhooks, enter the following command:
+
[source,terminal]
----
$ opm render <catalog_registry_url>:<tag> \
| jq -cs '[.[] | select(.schema == "olm.bundle" \
and (.properties[] | select(.type == "olm.csv.metadata").value.installModes[] \
| select(.type == "AllNamespaces" and .supported == true)) \
and .spec.webhookdefinitions == null) | .package] | unique[]'
----
where:
`catalog_registry_url`:: Specifies the URL of the catalog registry, such as `registry.redhat.io/redhat/redhat-operator-index`.
`tag`:: Specifies the tag or version of the catalog, such as `v{product-version}` or `latest`.
+
.Example command
[%collapsible]
====
[source,terminal,subs=attributes+]
----
$ opm render \
registry.redhat.io/redhat/redhat-operator-index:v{product-version} \
| jq -cs '[.[] | select(.schema == "olm.bundle" \
and (.properties[] | select(.type == "olm.csv.metadata").value.installModes[] \
| select(.type == "AllNamespaces" and .supported == true)) \
and .spec.webhookdefinitions == null) | .package] | unique[]'
----
====
+
.Example output
[%collapsible]
====
[source,text]
----
"3scale-operator"
"amq-broker-rhel8"
"amq-online"
"amq-streams"
"amq-streams-console"
"ansible-automation-platform-operator"
"ansible-cloud-addons-operator"
"apicast-operator"
"authorino-operator"
"aws-load-balancer-operator"
"bamoe-kogito-operator"
"cephcsi-operator"
"cincinnati-operator"
"cluster-logging"
"cluster-observability-operator"
"compliance-operator"
"container-security-operator"
"cryostat-operator"
"datagrid"
"devspaces"
...
----
====
. Inspect the contents of an extension's metadata by running the following command:
+
[source,terminal]
----
$ opm render <catalog_registry_url>:<tag> \
| jq -s '.[] | select( .schema == "olm.package") \
| select( .name == "<package_name>")'
----
+
.Example command
[%collapsible]
====
[source,terminal,subs=attributes+]
----
$ opm render \
registry.redhat.io/redhat/redhat-operator-index:v{product-version} \
| jq -s '.[] | select( .schema == "olm.package") \
| select( .name == "openshift-pipelines-operator-rh")'
----
====
+
.Example output
[%collapsible]
====
[source,text]
----
{
"schema": "olm.package",
"name": "openshift-pipelines-operator-rh",
"defaultChannel": "latest",
"icon": {
"base64data": "iVBORw0KGgoAAAANSUhE...",
"mediatype": "image/png"
}
}
----
====