Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions docs/howto/catalog-queries.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,12 @@ curl -k https://localhost:8443/catalogs/operatorhubio/api/v1/all | <query>
jq -s '.[] | select( .schema == "olm.package")'
```

* Packages that support `AllNamespaces` install mode and do not use webhooks:
``` terminal
jq -c 'select(.schema == "olm.bundle") | {"package":.package, "version":.properties[] | select(.type == "olm.bundle.object").value.data | @base64d | fromjson | select(.kind == "ClusterServiceVersion" and (.spec.installModes[] | select(.type == "AllNamespaces" and .supported == true) != null) and .spec.webhookdefinitions == null).spec.version}'
```
Packages that support `AllNamespaces` install mode and do not use webhooks

:
``` terminal
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[]'
```

* Package metadata:
``` terminal
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/explore-available-content.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ Then you can query the catalog by using `curl` commands and the `jq` CLI tool to
3. Return list of packages that support `AllNamespaces` install mode and do not use webhooks:

``` terminal
curl -k https://localhost:8443/catalogs/operatorhubio/api/v1/all | jq -c 'select(.schema == "olm.bundle") | {"package":.package, "version":.properties[] | select(.type == "olm.bundle.object").value.data | @base64d | fromjson | select(.kind == "ClusterServiceVersion" and (.spec.installModes[] | select(.type == "AllNamespaces" and .supported == true) != null) and .spec.webhookdefinitions == null).spec.version}'
curl -k https://localhost:8443/catalogs/operatorhubio/api/v1/all | 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[]'
```

??? success
Expand Down