Skip to content

Commit f3d7cc5

Browse files
Merge pull request #88992 from michaelryanpeter/OCPBUGS-51125-late-breaking-4.18-doc-bug
OCPBUGS#51125: late breaking OLMv1 4.18 doc bugs
2 parents de4f3bb + 31cf017 commit f3d7cc5

6 files changed

+122
-56
lines changed

extensions/catalogs/managing-catalogs.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,4 @@ include::modules/olmv1-about-catalogs.adoc[leveloffset=+1]
2828
include::modules/olmv1-red-hat-catalogs.adoc[leveloffset=+1]
2929
include::modules/olmv1-adding-a-catalog.adoc[leveloffset=+1]
3030
include::modules/olmv1-deleting-catalog.adoc[leveloffset=+1]
31+
include::modules/olmv1-disabling-a-default-catalog.adoc[leveloffset=+1]

modules/olmv1-about-target-versions.adoc

Lines changed: 43 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,22 @@ If you specify a channel in the CR, {olmv1} installs the latest version of the O
2222
.Example CR with a specified channel
2323
[source,yaml]
2424
----
25-
apiVersion: olm.operatorframework.io/v1alpha1
26-
kind: ClusterExtension
27-
metadata:
28-
name: pipelines-operator
29-
spec:
30-
packageName: openshift-pipelines-operator-rh
31-
installNamespace: <namespace_name>
32-
serviceAccount:
33-
name: <service_account>
34-
channel: latest <1>
25+
apiVersion: olm.operatorframework.io/v1
26+
kind: ClusterExtension
27+
metadata:
28+
name: <clusterextension_name>
29+
spec:
30+
namespace: <installed_namespace>
31+
serviceAccount:
32+
name: <service_account_installer_name>
33+
source:
34+
sourceType: Catalog
35+
catalog:
36+
packageName: <package_name>
37+
channels:
38+
- latest <1>
3539
----
36-
<1> Installs the latest release that can be resolved from the specified channel. Updates to the channel are automatically installed.
40+
<1> Optional: Installs the latest release that can be resolved from the specified channel. Updates to the channel are automatically installed. Specify the value of the `channels` parameter as an array.
3741

3842
If you specify the Operator or extension's target version in the CR, {olmv1} installs the specified version. When the target version is specified in the CR, {olmv1} does not change the target version when updates are published to the catalog.
3943

@@ -42,36 +46,42 @@ If you want to update the version of the Operator that is installed on the clust
4246
.Example CR with the target version specified
4347
[source,yaml]
4448
----
45-
apiVersion: olm.operatorframework.io/v1alpha1
46-
kind: ClusterExtension
47-
metadata:
48-
name: pipelines-operator
49-
spec:
50-
packageName: openshift-pipelines-operator-rh
51-
installNamespace: <namespace_name>
52-
serviceAccount:
53-
name: <service_account>
54-
version: "1.11.1" <1>
49+
apiVersion: olm.operatorframework.io/v1
50+
kind: ClusterExtension
51+
metadata:
52+
name: <clusterextension_name>
53+
spec:
54+
namespace: <installed_namespace>
55+
serviceAccount:
56+
name: <service_account_installer_name>
57+
source:
58+
sourceType: Catalog
59+
catalog:
60+
packageName: <package_name>
61+
version: "1.11.1" <1>
5562
----
56-
<1> Specifies the target version. If you want to update the version of the Operator or extension that is installed, you must manually update this field the CR to the desired target version.
63+
<1> Optional: Specifies the target version. If you want to update the version of the Operator or extension that is installed, you must manually update this field the CR to the desired target version.
5764

5865
If you want to define a range of acceptable versions for an Operator or extension, you can specify a version range by using a comparison string. When you specify a version range, {olmv1} installs the latest version of an Operator or extension that can be resolved by the Operator Controller.
5966

6067
.Example CR with a version range specified
6168
[source,yaml]
6269
----
63-
apiVersion: olm.operatorframework.io/v1alpha1
64-
kind: ClusterExtension
65-
metadata:
66-
name: pipelines-operator
67-
spec:
68-
packageName: openshift-pipelines-operator-rh
69-
installNamespace: <namespace_name>
70-
serviceAccount:
71-
name: <service_account>
72-
version: ">1.11.1" <1>
70+
apiVersion: olm.operatorframework.io/v1
71+
kind: ClusterExtension
72+
metadata:
73+
name: <clusterextension_name>
74+
spec:
75+
namespace: <installed_namespace>
76+
serviceAccount:
77+
name: <service_account_installer_name>
78+
source:
79+
sourceType: Catalog
80+
catalog:
81+
packageName: <package_name>
82+
version: ">1.11.1" <1>
7383
----
74-
<1> Specifies that the desired version range is greater than version `1.11.1`. For more information, see "Support for version ranges".
84+
<1> Optional: Specifies that the desired version range is greater than version `1.11.1`. For more information, see "Support for version ranges".
7585

7686
After you create or update a CR, apply the configuration file by running the following command:
7787

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * operators/olm_v1/olmv1-installing-an-operator-from-a-catalog.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
7+
[id="olmv1-disabling-a-default-catalog_{context}"]
8+
= Disabling a default catalog
9+
10+
You can disable the Red{nbsp}Hat-provided catalogs that are included with {product-title} by default.
11+
12+
.Procedure
13+
14+
* Disable a default catalog by running the following command:
15+
+
16+
[source,terminal]
17+
----
18+
$ oc patch clustercatalog openshift-certified-operators -p \
19+
'{"spec": {"availabilityMode": "Unavailable"}}' --type=merge
20+
----
21+
+
22+
.Example output
23+
[source,text]
24+
----
25+
clustercatalog.olm.operatorframework.io/openshift-certified-operators patched
26+
----
27+
28+
.Verification
29+
30+
* Verify the catalog is disabled by running the following command:
31+
+
32+
[source,terminal]
33+
----
34+
$ oc get clustercatalog openshift-certified-operators
35+
----
36+
+
37+
.Example output
38+
[source,text]
39+
----
40+
NAME LASTUNPACKED SERVING AGE
41+
openshift-certified-operators False 6h54m
42+
----

modules/olmv1-forcing-an-update-or-rollback.adoc

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -27,22 +27,28 @@ You must verify the consequences of forcing a manual update or rollback. Failure
2727
.Example CR
2828
[source,yaml]
2929
----
30-
apiVersion: olm.operatorframework.io/v1alpha1
31-
kind: Operator
32-
metadata:
33-
name: <operator_name> <1>
34-
spec:
35-
packageName: <package_name> <2>
36-
installNamespace: <namespace_name>
37-
serviceAccount:
38-
name: <service_account>
39-
version: <version> <3>
40-
upgradeConstraintPolicy: Ignore <4>
30+
apiVersion: olm.operatorframework.io/v1
31+
kind: ClusterExtension
32+
metadata:
33+
name: <clusterextension_name>
34+
spec:
35+
namespace: <installed_namespace> <1>
36+
serviceAccount:
37+
name: <service_account_installer_name> <2>
38+
source:
39+
sourceType: Catalog
40+
catalog:
41+
packageName: <package_name>
42+
channels:
43+
- <channel_name> <3>
44+
version: <version_or_version_range> <4>
45+
upgradeConstraintPolicy: SelfCertified <5>
4146
----
42-
<1> Specifies the name of the Operator or extension, such as `pipelines-operator`
43-
<2> Specifies the package name, such as `openshift-pipelines-operator-rh`.
44-
<3> Specifies the blocked update or rollback version.
45-
<4> Optional: Specifies the upgrade constraint policy. To force an update or rollback, set the field to `Ignore`. If unspecified, the default setting is `Enforce`.
47+
<1> Specifies the namespace where you want the bundle installed, such as `pipelines` or `my-extension`. Extensions are still cluster-scoped and might contain resources that are installed in different namespaces.
48+
<2> Specifies the name of the service account you created to install, update, and manage your extension.
49+
<3> Optional: Specifies channel names as an array, such as `pipelines-1.14` or `latest`.
50+
<4> Optional: Specifies the version or version range, such as `1.14.0`, `1.14.x`, or `>=1.16`, of the package you want to install or update. For more information, see "Example custom resources (CRs) that specify a target version" and "Support for version ranges".
51+
<5> Optional: Specifies the upgrade constraint policy. To force an update or rollback, set the field to `SelfCertified`. If unspecified, the default setting is `CatalogProvided`. The `CatalogProvided` setting only updates if the new version satisfies the upgrade constraints set by the package author.
4652

4753
. Apply the changes to your Operator or extensions CR by running the following command:
4854
+

modules/olmv1-installing-an-operator.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,13 @@ apiVersion: olm.operatorframework.io/v1
3434
channels:
3535
- <channel_name> <3>
3636
version: <version_or_version_range> <4>
37+
upgradeConstraintPolicy: CatalogProvided <5>
3738
----
3839
<1> Specifies the namespace where you want the bundle installed, such as `pipelines` or `my-extension`. Extensions are still cluster-scoped and might contain resources that are installed in different namespaces.
3940
<2> Specifies the name of the service account you created to install, update, and manage your extension.
4041
<3> Optional: Specifies channel names as an array, such as `pipelines-1.14` or `latest`.
4142
<4> Optional: Specifies the version or version range, such as `1.14.0`, `1.14.x`, or `>=1.16`, of the package you want to install or update. For more information, see "Example custom resources (CRs) that specify a target version" and "Support for version ranges".
43+
<5> Optional: Specifies the upgrade constraint policy. If unspecified, the default setting is `CatalogProvided`. The `CatalogProvided` setting only updates if the new version satisfies the upgrade constraints set by the package author. To force an update or rollback, set the field to `SelfCertified`. For more information, see "Forcing an update or rollback".
4244

4345
.Example `pipelines-operator.yaml` CR
4446
[source,yaml]

modules/olmv1-version-range-comparisons.adoc

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,19 @@ You can specify a version range in an Operator or extension's CR by using a rang
4040
.Example version range comparison
4141
[source,yaml]
4242
----
43-
apiVersion: olm.operatorframework.io/v1alpha1
44-
kind: ClusterExtension
45-
metadata:
46-
name: pipelines-operator
47-
spec:
48-
packageName: openshift-pipelines-operator-rh
49-
installNamespace: <namespace_name>
50-
version: ">=1.11, <1.13"
43+
apiVersion: olm.operatorframework.io/v1
44+
kind: ClusterExtension
45+
metadata:
46+
name: <clusterextension_name>
47+
spec:
48+
namespace: <installed_namespace>
49+
serviceAccount:
50+
name: <service_account_installer_name>
51+
source:
52+
sourceType: Catalog
53+
catalog:
54+
packageName: <package_name>
55+
version: ">=1.11, <1.13"
5156
----
5257

5358
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.

0 commit comments

Comments
 (0)