Skip to content

Commit f124014

Browse files
Merge pull request #71400 from michaelryanpeter/4.15-clean-up-tasks
OLM 1.0 OCP 4.15 clean up tasks
2 parents 82e86a3 + 6f601d7 commit f124014

8 files changed

+74
-13
lines changed

modules/olmv1-adding-a-catalog.adoc

+2
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,11 @@ spec:
3535
image:
3636
ref: registry.redhat.io/redhat/redhat-operator-index:v{product-version} <1>
3737
pullSecret: <pull_secret_name> <2>
38+
pollInterval: <poll_interval_duration> <3>
3839
----
3940
<1> Specify the catalog's image in the `spec.source.image` field.
4041
<2> If your catalog is hosted on a secure registry, such as `registry.redhat.io`, you must create a pull secret scoped to the `openshift-catalog` namespace.
42+
<3> Specify the interval for polling the remote registry for newer image digests. The default value is `24h`. Valid units include seconds (`s`), minutes (`m`), and and hours (`h`). To disable polling, set a zero value, such as `0s`.
4143

4244
. Add the catalog to your cluster by running the following command:
4345
+

modules/olmv1-catalog-queries.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ $ jq -s '.[] \| select( .schema == "olm.channel" ) \| \
7474
a|
7575
[source,terminal]
7676
----
77-
$ jq -s '.[] \| select( .package == "<package_name" ) \| \
77+
$ jq -s '.[] \| select( .package == "<package_name>" ) \| \
7878
select( .schema == "olm.channel" ) \| \
7979
select( .name == "<channel_name>" ) \| \
8080
.entries \| .[] \| .name' <catalog_name>.json

modules/olmv1-deleting-an-operator.adoc

+4-4
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ You can delete an Operator and its custom resource definitions (CRDs) by deletin
2020
+
2121
[source,terminal]
2222
----
23-
$ oc delete operator.operators.operatorframework.io quay-example
23+
$ oc delete operator.operators.operatorframework.io <operator_name>
2424
----
2525
+
2626
.Example output
2727
[source,text]
2828
----
29-
operator.operators.operatorframework.io "quay-example" deleted
29+
operator.operators.operatorframework.io "<operator_name>" deleted
3030
----
3131

3232
.Verification
@@ -50,11 +50,11 @@ No resources found
5050
+
5151
[source,terminal]
5252
----
53-
$ oc get ns quay-operator-system
53+
$ oc get ns <operator_name>-system
5454
----
5555
+
5656
.Example output
5757
[source,text]
5858
----
59-
Error from server (NotFound): namespaces "quay-operator-system" not found
59+
Error from server (NotFound): namespaces "<operator_name>-system" not found
6060
----

modules/olmv1-installing-an-operator.adoc

+3-3
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@ $ jq -s '.[] | select( .schema == "olm.channel" ) | \
6565
+
6666
[source,terminal]
6767
----
68-
$ jq -s '.[] | select( .package == "<package_name" ) | \
68+
$ jq -s '.[] | select( .package == "<package_name>" ) | \
6969
select( .schema == "olm.channel" ) | \
70-
select( .name == "<channel_name" ) | .entries | \
70+
select( .name == "<channel_name>" ) | .entries | \
7171
.[] | .name' /<path>/<catalog_name>.json
7272
----
7373
+
@@ -108,7 +108,7 @@ metadata:
108108
spec:
109109
packageName: openshift-pipelines-operator-rh
110110
channel: <channel>
111-
version: <version>
111+
version: "<version>"
112112
----
113113
+
114114
where:

modules/olmv1-red-hat-catalogs.adoc

+4
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ spec:
2828
image:
2929
ref: registry.redhat.io/redhat/redhat-operator-index:v{product-version}
3030
pullSecret: <pull_secret_name>
31+
pollInterval: <poll_interval_duration> <1>
3132
----
33+
<1> Specify the interval for polling the remote registry for newer image digests. The default value is `24h`. Valid units include seconds (`s`), minutes (`m`), and hours (`h`). To disable polling, set a zero value, such as `0s`.
3234

3335
.Example Certified Operators catalog
3436
[source,yaml,subs="attributes+"]
@@ -43,6 +45,7 @@ spec:
4345
image:
4446
ref: registry.redhat.io/redhat/certified-operator-index:v{product-version}
4547
pullSecret: <pull_secret_name>
48+
pollInterval: 24h
4649
----
4750

4851
.Example Community Operators catalog
@@ -58,6 +61,7 @@ spec:
5861
image:
5962
ref: registry.redhat.io/redhat/community-operator-index:v{product-version}
6063
pullSecret: <pull_secret_name>
64+
pollInterval: 24h
6165
----
6266

6367
The following command adds a catalog to your cluster:

modules/olmv1-updating-an-operator.adoc

+52-3
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ $ jq -s '.[] | select( .schema == "olm.channel" ) | \
5656
+
5757
[source,terminal]
5858
----
59-
$ jq -s '.[] | select( .package == "<package_name" ) | \
59+
$ jq -s '.[] | select( .package == "<package_name>" ) | \
6060
select( .schema == "olm.channel" ) | \
61-
select( .name == "<channel_name" ) | .entries | \
61+
select( .name == "<channel_name>" ) | .entries | \
6262
.[] | .name' /<path>/<catalog_name>.json
6363
----
6464
+
@@ -144,7 +144,9 @@ status:
144144
include::snippets/olmv1-version-range-cr-adomn.adoc[]
145145
--
146146

147-
. Edit your CR to update the version to `1.12.1`, as shown in the following example:
147+
. Edit your CR by using one of the following methods:
148+
149+
** If you want to pin your Operator or extension to specific version, such as `1.12.1`, edit your CR similar to the following example:
148150
+
149151
.Example `pipelines-operator.yaml` CR
150152
[source,yaml]
@@ -159,6 +161,53 @@ spec:
159161
----
160162
<1> Update the version from `1.11.1` to `1.12.1`
161163

164+
** If you want to define a range of acceptable update versions, edit your CR similar to the following example:
165+
+
166+
.Example CR with a version range specified
167+
[source,yaml]
168+
----
169+
apiVersion: operators.operatorframework.io/v1alpha1
170+
kind: Operator
171+
metadata:
172+
name: pipelines-operator
173+
spec:
174+
packageName: openshift-pipelines-operator-rh
175+
version: ">1.11.1, <1.13" <1>
176+
----
177+
<1> Specifies that the desired version range is greater than version `1.11.1` and less than `1.13`. For more information, see "Support for version ranges" and "Version comparison strings".
178+
179+
** If you want to update to the latest version that can be resolved from a channel, edit your CR similar to the following example:
180+
+
181+
.Example CR with a specified channel
182+
[source,yaml]
183+
----
184+
apiVersion: operators.operatorframework.io/v1alpha1
185+
kind: Operator
186+
metadata:
187+
name: pipelines-operator
188+
spec:
189+
packageName: openshift-pipelines-operator-rh
190+
channel: pipelines-1.13 <1>
191+
----
192+
<1> Installs the latest release that can be resolved from the specified channel. Updates to the channel are automatically installed.
193+
194+
** If you want to specify a channel and version or version range, edit your CR similar to the following example:
195+
+
196+
.Example CR with a specified channel and version range
197+
[source,yaml]
198+
----
199+
apiVersion: operators.operatorframework.io/v1alpha1
200+
kind: Operator
201+
metadata:
202+
name: pipelines-operator
203+
spec:
204+
packageName: openshift-pipelines-operator-rh
205+
channel: latest
206+
version: "<1.13"
207+
----
208+
+
209+
For more information, see "Example custom resources (CRs) that specify a target version".
210+
162211
. Apply the update to the cluster by running the following command:
163212
+
164213
[source,terminal]

modules/olmv1-version-range-comparisons.adoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
[id="olmv1-version-range-comparisons_{context}"]
88
= Version comparison strings
99

10-
You can define a version range by adding a comparison string to the `spec.version` field in an Operator or extension's custom resource (CR). A comparison string is a list of space- or comma-separated values and one or more comparison operators. You can add another comparison string by including an `OR`, or double vertical bar (`||`), comparison operator between the strings.
10+
You can define a version range by adding a comparison string to the `spec.version` field in an Operator or extension's custom resource (CR). A comparison string is a list of space- or comma-separated values and one or more comparison operators enclosed in double quotation marks (`"`). You can add another comparison string by including an `OR`, or double vertical bar (`||`), comparison operator between the strings.
1111

1212
.Basic comparisons
1313
[options="header"]
@@ -46,7 +46,7 @@ metadata:
4646
name: pipelines-operator
4747
spec:
4848
packageName: openshift-pipelines-operator-rh
49-
version: >=1.11, <1.13
49+
version: ">=1.11, <1.13"
5050
----
5151

5252
You can use wildcard characters in all types of comparison strings. {olmv1} accepts `x`, `X`, and asterisks (`*`) as wildcard characters. When you use a wildcard character with the equal sign (`=`) comparison operator, you define a comparison at the patch or minor version level.

operators/olm_v1/olmv1-installing-an-operator-from-a-catalog.adoc

+6
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,12 @@ include::modules/olmv1-installing-an-operator.adoc[leveloffset=+1]
6363
* xref:../../operators/olm_v1/olmv1-installing-an-operator-from-a-catalog.adoc#olmv1-version-range-support_olmv1-installing-operator[Support for version ranges]
6464

6565
include::modules/olmv1-updating-an-operator.adoc[leveloffset=+1]
66+
67+
[role="_additional-resources"]
68+
.Additional resources
69+
* xref:../../operators/olm_v1/olmv1-installing-an-operator-from-a-catalog.adoc#olmv1-about-target-versions_olmv1-installing-operator[Example custom resources (CRs) that specify a target version]
70+
* xref:../../operators/olm_v1/olmv1-installing-an-operator-from-a-catalog.adoc#olmv1-version-range-comparisons_olmv1-installing-operator[Version comparison strings]
71+
6672
include::modules/olmv1-semver-support.adoc[leveloffset=+2]
6773

6874
[role="_additional-resources"]

0 commit comments

Comments
 (0)