Skip to content

Commit d749e56

Browse files
OSDOCS#9413: OLM 1.0 supports AllNamspace install and no webhooks
Updating the "Finding an Operator to install docs" to clarify that OLM 1.0 only supports the `AllNamespaces` install mode and does not support webhooks.
1 parent 1d549ed commit d749e56

File tree

2 files changed

+80
-8
lines changed

2 files changed

+80
-8
lines changed

modules/olmv1-catalog-queries.adoc

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,20 @@ $ jq -s '.[] \| select( .schema == "olm.package") \| \
2424
.name' <catalog_name>.json
2525
----
2626

27+
|Packages that support `AllNamespaces` install mode and do not use webhooks
28+
a|
29+
[source,terminal]
30+
----
31+
$ jq -c 'select(.schema == "olm.bundle") \| \
32+
{"package":.package, "version":.properties[] \| \
33+
select(.type == "olm.bundle.object").value.data \| \
34+
@base64d \| fromjson \| \
35+
select(.kind == "ClusterServiceVersion" and (.spec.installModes[] \| \
36+
select(.type == "AllNamespaces" and .supported == true) != null) \
37+
and .spec.webhookdefinitions == null).spec.version}' \
38+
<catalog_name>.json
39+
----
40+
2741
|Package metadata
2842
a|
2943
[source,terminal]
@@ -56,6 +70,16 @@ $ jq -s '.[] \| select( .schema == "olm.channel" ) \| \
5670
<catalog_name>.json
5771
----
5872

73+
|Versions in a channel
74+
a|
75+
[source,terminal]
76+
----
77+
$ jq -s '.[] \| select( .package == "<package_name" ) \| \
78+
select( .schema == "olm.channel" ) \| \
79+
select( .name == "<channel_name>" ) \| \
80+
.entries \| .[] \| .name' <catalog_name>.json
81+
----
82+
5983
a|
6084
* Latest version in a channel
6185
* Upgrade path

modules/olmv1-finding-operators-to-install.adoc

Lines changed: 56 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ After you add a catalog to your cluster, you can query the catalog to find Opera
1616

1717
.Procedure
1818

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:
2020
+
2121
[source,terminal]
2222
----
@@ -37,11 +37,18 @@ $ curl -L http://localhost:8080/catalogs/<catalog_name>/all.json \
3737
[source,terminal]
3838
----
3939
$ 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
4141
----
4242
====
4343

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:
4552
+
4653
[source,terminal]
4754
----
@@ -55,7 +62,7 @@ $ jq -s '.[] | select(.schema == "olm.package") | .name' \
5562
[source,terminal]
5663
----
5764
$ jq -s '.[] | select(.schema == "olm.package") | .name' \
58-
/home/<username>/catalogs/rhoc.json
65+
/home/username/catalogs/rhoc.json
5966
----
6067
====
6168
+
@@ -83,13 +90,53 @@ NAME AGE
8390
...
8491
----
8592
====
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+
====
86133

87134
. Inspect the contents of an Operator or extension's metadata by running the following command:
88135
+
89136
[source,terminal]
90137
----
91138
$ jq -s '.[] | select( .schema == "olm.package") | \
92-
select( .name == "<package_name>")' <catalog_name>.json
139+
select( .name == "<package_name>")' /<path>/<catalog_name>.json
93140
----
94141
+
95142
.Example command
@@ -98,7 +145,8 @@ $ jq -s '.[] | select( .schema == "olm.package") | \
98145
[source,terminal]
99146
----
100147
$ 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
102150
----
103151
====
104152
+
@@ -111,9 +159,9 @@ $ jq -s '.[] | select( .schema == "olm.package") | \
111159
"defaultChannel": "stable",
112160
"icon": {
113161
"base64data": "PHN2ZyB4bWxu..."
114-
"mediatype": "image/svg+xml"
162+
"mediatype": "image/png"
115163
},
116-
"name": "serverless-operator",
164+
"name": "openshift-pipelines-operator-rh",
117165
"schema": "olm.package"
118166
}
119167
----

0 commit comments

Comments
 (0)