diff --git a/docs/howto/catalog-queries.md b/docs/howto/catalog-queries.md index 91314acdd..690e91041 100644 --- a/docs/howto/catalog-queries.md +++ b/docs/howto/catalog-queries.md @@ -35,7 +35,7 @@ curl -k https://localhost:8443/catalogs/operatorhubio/api/v1/all | * 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}' + 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: diff --git a/docs/tutorials/explore-available-content.md b/docs/tutorials/explore-available-content.md index ada0855ef..0a1f46809 100644 --- a/docs/tutorials/explore-available-content.md +++ b/docs/tutorials/explore-available-content.md @@ -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