|
| 1 | +--- |
| 2 | +hide: |
| 3 | + - toc |
| 4 | +--- |
| 5 | + |
| 6 | +# Explore Available Content |
| 7 | + |
| 8 | +After you [add a catalog of extensions](add-catalog.md) to your cluster, you must port forward your catalog as a service. |
| 9 | +Then you can query the catalog by using `curl` commands and the `jq` CLI tool to find extensions to install. |
| 10 | + |
| 11 | +## Prerequisites |
| 12 | + |
| 13 | +* You have added a ClusterCatalog of extensions, such as [OperatorHub.io](https://operatorhub.io), to your cluster. |
| 14 | +* You have installed the `jq` CLI tool. |
| 15 | + |
| 16 | +!!! note |
| 17 | + By default, Catalogd is installed with TLS enabled for the catalog webserver. |
| 18 | + The following examples will show this default behavior, but for simplicity's sake will ignore TLS verification in the curl commands using the `-k` flag. |
| 19 | + |
| 20 | +## Procedure |
| 21 | + |
| 22 | +1. Port forward the catalog server service: |
| 23 | + |
| 24 | + ``` terminal |
| 25 | + kubectl -n olmv1-system port-forward svc/catalogd-service 8443:443 |
| 26 | + ``` |
| 27 | +
|
| 28 | +2. Return a list of all the extensions in a catalog via the v1 API endpoint: |
| 29 | + ``` terminal |
| 30 | + curl -k https://localhost:8443/catalogs/operatorhubio/api/v1/metas?schema=olm.package' | jq -s '.[] | .name' |
| 31 | + ``` |
| 32 | +
|
| 33 | + ??? success |
| 34 | + ``` text title="Example output" |
| 35 | + "ack-acm-controller" |
| 36 | + "ack-acmpca-controller" |
| 37 | + "ack-apigatewayv2-controller" |
| 38 | + "ack-applicationautoscaling-controller" |
| 39 | + "ack-cloudfront-controller" |
| 40 | + "ack-cloudtrail-controller" |
| 41 | + "ack-cloudwatch-controller" |
| 42 | + "ack-cloudwatchlogs-controller" |
| 43 | + "ack-dynamodb-controller" |
| 44 | + "ack-ec2-controller" |
| 45 | + "ack-ecr-controller" |
| 46 | + "ack-ecs-controller" |
| 47 | + "ack-efs-controller" |
| 48 | + "ack-eks-controller" |
| 49 | + "ack-elasticache-controller" |
| 50 | + "ack-emrcontainers-controller" |
| 51 | + "ack-eventbridge-controller" |
| 52 | + "ack-iam-controller" |
| 53 | + "ack-kafka-controller" |
| 54 | + "ack-keyspaces-controller" |
| 55 | + "ack-kinesis-controller" |
| 56 | + "ack-kms-controller" |
| 57 | + "ack-lambda-controller" |
| 58 | + "ack-memorydb-controller" |
| 59 | + "ack-mq-controller" |
| 60 | + "ack-networkfirewall-controller" |
| 61 | + "ack-opensearchservice-controller" |
| 62 | + "ack-pipes-controller" |
| 63 | + "ack-prometheusservice-controller" |
| 64 | + "ack-rds-controller" |
| 65 | + "ack-route53-controller" |
| 66 | + "ack-route53resolver-controller" |
| 67 | + "ack-s3-controller" |
| 68 | + "ack-sagemaker-controller" |
| 69 | + "ack-secretsmanager-controller" |
| 70 | + "ack-sfn-controller" |
| 71 | + "ack-sns-controller" |
| 72 | + "ack-sqs-controller" |
| 73 | + "aerospike-kubernetes-operator" |
| 74 | + "airflow-helm-operator" |
| 75 | + "aiven-operator" |
| 76 | + "akka-cluster-operator" |
| 77 | + "alvearie-imaging-ingestion" |
| 78 | + "anchore-engine" |
| 79 | + "apch-operator" |
| 80 | + "api-operator" |
| 81 | + "api-testing-operator" |
| 82 | + "apicast-community-operator" |
| 83 | + "apicurio-registry" |
| 84 | + "apimatic-kubernetes-operator" |
| 85 | + "app-director-operator" |
| 86 | + "appdynamics-operator" |
| 87 | + "application-services-metering-operator" |
| 88 | + "appranix" |
| 89 | + "aqua" |
| 90 | + "argocd-operator" |
| 91 | + ... |
| 92 | + ``` |
| 93 | +
|
| 94 | + !!! important |
| 95 | + Currently, OLM 1.0 does not support the installation of extensions that use webhooks or that target a single or specified set of namespaces. |
| 96 | +
|
| 97 | +3. Return list of packages where the channel head version use `olm.csv.metadata` format, support `AllNamespaces` install mode and do not use webhooks: |
| 98 | +
|
| 99 | + ``` terminal |
| 100 | + curl -k https://localhost:8443/catalogs/operatorhubio/api/v1/metas?schema=olm.bundle | jq -cs '[.[] | select(.properties[] | select(.type == "olm.csv.metadata").value.installModes[] | select(.type == "AllNamespaces" and .supported == true) and .spec.webhookdefinitions == null) | .package] | unique[]' |
| 101 | + ``` |
| 102 | +
|
| 103 | + ??? success |
| 104 | + ``` text title="Example output" |
| 105 | + "ack-acm-controller" |
| 106 | + "ack-acmpca-controller" |
| 107 | + "ack-apigateway-controller" |
| 108 | + "ack-apigatewayv2-controller" |
| 109 | + "ack-applicationautoscaling-controller" |
| 110 | + "ack-athena-controller" |
| 111 | + "ack-cloudfront-controller" |
| 112 | + "ack-cloudtrail-controller" |
| 113 | + "ack-cloudwatch-controller" |
| 114 | + "ack-cloudwatchlogs-controller" |
| 115 | + "ack-documentdb-controller" |
| 116 | + "ack-dynamodb-controller" |
| 117 | + "ack-ec2-controller" |
| 118 | + "ack-ecr-controller" |
| 119 | + "ack-ecs-controller" |
| 120 | + ... |
| 121 | + ``` |
| 122 | +
|
| 123 | +4. Inspect the contents of an extension's metadata: |
| 124 | +
|
| 125 | + ``` terminal |
| 126 | + curl -k https://localhost:8443/catalogs/operatorhubio/api/v1/metas?schema=olm.package&name=<package_name> |
| 127 | + ``` |
| 128 | +
|
| 129 | + `package_name` |
| 130 | + : Specifies the name of the package you want to inspect. |
| 131 | +
|
| 132 | + ??? success |
| 133 | + ``` text title="Example output" |
| 134 | + { |
| 135 | + "defaultChannel": "stable-v6.x", |
| 136 | + "icon": { |
| 137 | + "base64data": "PHN2ZyB4bWxucz0ia... |
| 138 | + "mediatype": "image/svg+xml" |
| 139 | + }, |
| 140 | + "name": "cockroachdb", |
| 141 | + "schema": "olm.package" |
| 142 | + } |
| 143 | + ``` |
| 144 | +
|
| 145 | +### Additional resources |
| 146 | +
|
| 147 | +* [Catalog queries](../howto/catalog-queries.md) |
0 commit comments