@@ -16,7 +16,7 @@ After you add a catalog to your cluster, you can query the catalog to find Opera
16
16
17
17
.Procedure
18
18
19
- . Port foward the catalog server service in the `openshift-catalogd` namespace by running the following command:
19
+ . Port forward the catalog server service in the `openshift-catalogd` namespace by running the following command:
20
20
+
21
21
[source,terminal]
22
22
----
@@ -37,11 +37,18 @@ $ curl -L http://localhost:8080/catalogs/<catalog_name>/all.json \
37
37
[source,terminal]
38
38
----
39
39
$ curl -L http://localhost:8080/catalogs/redhat-operators/all.json \
40
- -C - -o /home/< username> /catalogs/rhoc.json
40
+ -C - -o /home/username/catalogs/rhoc.json
41
41
----
42
42
====
43
43
44
- . Get a list of the Operators and extensions from the local catalog file by running the following command:
44
+ . Run one of the following commands to return a list of Operators and extensions in a catalog.
45
+ +
46
+ [IMPORTANT]
47
+ ====
48
+ Currently, {olmv1-first} supports extensions that do not use webhooks and are configured to use the `AllNamespaces` install mode. Extensions that use webhooks or that target a single or specified set of namespaces cannot be installed.
49
+ ====
50
+ +
51
+ * Get a list of all the Operators and extensions from the local catalog file by running the following command:
45
52
+
46
53
[source,terminal]
47
54
----
@@ -55,7 +62,7 @@ $ jq -s '.[] | select(.schema == "olm.package") | .name' \
55
62
[source,terminal]
56
63
----
57
64
$ jq -s '.[] | select(.schema == "olm.package") | .name' \
58
- /home/< username> /catalogs/rhoc.json
65
+ /home/username/catalogs/rhoc.json
59
66
----
60
67
====
61
68
+
@@ -83,13 +90,53 @@ NAME AGE
83
90
...
84
91
----
85
92
====
93
+ +
94
+ * Get list of packages that support `AllNamespaces` install mode and do not use webhooks from the local catalog file by running the following command:
95
+ +
96
+ [source,terminal]
97
+ ----
98
+ $ jq -c 'select(.schema == "olm.bundle") | \
99
+ {"package":.package, "version":.properties[] | \
100
+ select(.type == "olm.bundle.object").value.data | @base64d | fromjson | \
101
+ select(.kind == "ClusterServiceVersion" and (.spec.installModes[] | \
102
+ select(.type == "AllNamespaces" and .supported == true) != null) \
103
+ and .spec.webhookdefinitions == null).spec.version}' \
104
+ /<path>/<catalog_name>.json
105
+ ----
106
+ +
107
+ .Example output
108
+ [%collapsible]
109
+ ====
110
+ [source,text]
111
+ ----
112
+ {"package":"3scale-operator","version":"0.10.0-mas"}
113
+ {"package":"3scale-operator","version":"0.10.5"}
114
+ {"package":"3scale-operator","version":"0.11.0-mas"}
115
+ {"package":"3scale-operator","version":"0.11.1-mas"}
116
+ {"package":"3scale-operator","version":"0.11.2-mas"}
117
+ {"package":"3scale-operator","version":"0.11.3-mas"}
118
+ {"package":"3scale-operator","version":"0.11.5-mas"}
119
+ {"package":"3scale-operator","version":"0.11.6-mas"}
120
+ {"package":"3scale-operator","version":"0.11.7-mas"}
121
+ {"package":"3scale-operator","version":"0.11.8-mas"}
122
+ {"package":"amq-broker-rhel8","version":"7.10.0-opr-1"}
123
+ {"package":"amq-broker-rhel8","version":"7.10.0-opr-2"}
124
+ {"package":"amq-broker-rhel8","version":"7.10.0-opr-3"}
125
+ {"package":"amq-broker-rhel8","version":"7.10.0-opr-4"}
126
+ {"package":"amq-broker-rhel8","version":"7.10.1-opr-1"}
127
+ {"package":"amq-broker-rhel8","version":"7.10.1-opr-2"}
128
+ {"package":"amq-broker-rhel8","version":"7.10.2-opr-1"}
129
+ {"package":"amq-broker-rhel8","version":"7.10.2-opr-2"}
130
+ ...
131
+ ----
132
+ ====
86
133
87
134
. Inspect the contents of an Operator or extension's metadata by running the following command:
88
135
+
89
136
[source,terminal]
90
137
----
91
138
$ jq -s '.[] | select( .schema == "olm.package") | \
92
- select( .name == "<package_name>")' <catalog_name>.json
139
+ select( .name == "<package_name>")' /<path>/ <catalog_name>.json
93
140
----
94
141
+
95
142
.Example command
@@ -98,7 +145,8 @@ $ jq -s '.[] | select( .schema == "olm.package") | \
98
145
[source,terminal]
99
146
----
100
147
$ jq -s '.[] | select( .schema == "olm.package") | \
101
- select( .name == "serverless-operator")' rhoc.json
148
+ select( .name == "openshift-pipelines-operator-rh")' \
149
+ /home/username/rhoc.json
102
150
----
103
151
====
104
152
+
@@ -111,9 +159,9 @@ $ jq -s '.[] | select( .schema == "olm.package") | \
111
159
"defaultChannel": "stable",
112
160
"icon": {
113
161
"base64data": "PHN2ZyB4bWxu..."
114
- "mediatype": "image/svg+xml "
162
+ "mediatype": "image/png "
115
163
},
116
- "name": "serverless- operator",
164
+ "name": "openshift-pipelines- operator-rh ",
117
165
"schema": "olm.package"
118
166
}
119
167
----
0 commit comments