diff --git a/extensions/catalogs/managing-catalogs.adoc b/extensions/catalogs/managing-catalogs.adoc index ed31693f80..530a8a5703 100644 --- a/extensions/catalogs/managing-catalogs.adoc +++ b/extensions/catalogs/managing-catalogs.adoc @@ -28,3 +28,4 @@ include::modules/olmv1-about-catalogs.adoc[leveloffset=+1] include::modules/olmv1-red-hat-catalogs.adoc[leveloffset=+1] include::modules/olmv1-adding-a-catalog.adoc[leveloffset=+1] include::modules/olmv1-deleting-catalog.adoc[leveloffset=+1] +include::modules/olmv1-disabling-a-default-catalog.adoc[leveloffset=+1] diff --git a/modules/olmv1-about-target-versions.adoc b/modules/olmv1-about-target-versions.adoc index 83d51b14e1..aaf4bf5b5c 100644 --- a/modules/olmv1-about-target-versions.adoc +++ b/modules/olmv1-about-target-versions.adoc @@ -22,18 +22,22 @@ If you specify a channel in the CR, {olmv1} installs the latest version of the O .Example CR with a specified channel [source,yaml] ---- -apiVersion: olm.operatorframework.io/v1alpha1 -kind: ClusterExtension -metadata: - name: pipelines-operator -spec: - packageName: openshift-pipelines-operator-rh - installNamespace: - serviceAccount: - name: - channel: latest <1> +apiVersion: olm.operatorframework.io/v1 + kind: ClusterExtension + metadata: + name: + spec: + namespace: + serviceAccount: + name: + source: + sourceType: Catalog + catalog: + packageName: + channels: + - latest <1> ---- -<1> Installs the latest release that can be resolved from the specified channel. Updates to the channel are automatically installed. +<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. 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. @@ -42,36 +46,42 @@ If you want to update the version of the Operator that is installed on the clust .Example CR with the target version specified [source,yaml] ---- -apiVersion: olm.operatorframework.io/v1alpha1 -kind: ClusterExtension -metadata: - name: pipelines-operator -spec: - packageName: openshift-pipelines-operator-rh - installNamespace: - serviceAccount: - name: - version: "1.11.1" <1> +apiVersion: olm.operatorframework.io/v1 + kind: ClusterExtension + metadata: + name: + spec: + namespace: + serviceAccount: + name: + source: + sourceType: Catalog + catalog: + packageName: + version: "1.11.1" <1> ---- -<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. +<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. 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. .Example CR with a version range specified [source,yaml] ---- -apiVersion: olm.operatorframework.io/v1alpha1 -kind: ClusterExtension -metadata: - name: pipelines-operator -spec: - packageName: openshift-pipelines-operator-rh - installNamespace: - serviceAccount: - name: - version: ">1.11.1" <1> +apiVersion: olm.operatorframework.io/v1 + kind: ClusterExtension + metadata: + name: + spec: + namespace: + serviceAccount: + name: + source: + sourceType: Catalog + catalog: + packageName: + version: ">1.11.1" <1> ---- -<1> Specifies that the desired version range is greater than version `1.11.1`. For more information, see "Support for version ranges". +<1> Optional: Specifies that the desired version range is greater than version `1.11.1`. For more information, see "Support for version ranges". After you create or update a CR, apply the configuration file by running the following command: diff --git a/modules/olmv1-disabling-a-default-catalog.adoc b/modules/olmv1-disabling-a-default-catalog.adoc new file mode 100644 index 0000000000..3764240ac8 --- /dev/null +++ b/modules/olmv1-disabling-a-default-catalog.adoc @@ -0,0 +1,42 @@ +// Module included in the following assemblies: +// +// * operators/olm_v1/olmv1-installing-an-operator-from-a-catalog.adoc + +:_mod-docs-content-type: PROCEDURE + +[id="olmv1-disabling-a-default-catalog_{context}"] += Disabling a default catalog + +You can disable the Red{nbsp}Hat-provided catalogs that are included with {product-title} by default. + +.Procedure + +* Disable a default catalog by running the following command: ++ +[source,terminal] +---- +$ oc patch clustercatalog openshift-certified-operators -p \ + '{"spec": {"availabilityMode": "Unavailable"}}' --type=merge +---- ++ +.Example output +[source,text] +---- +clustercatalog.olm.operatorframework.io/openshift-certified-operators patched +---- + +.Verification + +* Verify the catalog is disabled by running the following command: ++ +[source,terminal] +---- +$ oc get clustercatalog openshift-certified-operators +---- ++ +.Example output +[source,text] +---- +NAME LASTUNPACKED SERVING AGE +openshift-certified-operators False 6h54m +---- diff --git a/modules/olmv1-forcing-an-update-or-rollback.adoc b/modules/olmv1-forcing-an-update-or-rollback.adoc index 9f43435514..0682ac0583 100644 --- a/modules/olmv1-forcing-an-update-or-rollback.adoc +++ b/modules/olmv1-forcing-an-update-or-rollback.adoc @@ -27,22 +27,28 @@ You must verify the consequences of forcing a manual update or rollback. Failure .Example CR [source,yaml] ---- -apiVersion: olm.operatorframework.io/v1alpha1 -kind: Operator -metadata: - name: <1> -spec: - packageName: <2> - installNamespace: - serviceAccount: - name: - version: <3> - upgradeConstraintPolicy: Ignore <4> +apiVersion: olm.operatorframework.io/v1 + kind: ClusterExtension + metadata: + name: + spec: + namespace: <1> + serviceAccount: + name: <2> + source: + sourceType: Catalog + catalog: + packageName: + channels: + - <3> + version: <4> + upgradeConstraintPolicy: SelfCertified <5> ---- -<1> Specifies the name of the Operator or extension, such as `pipelines-operator` -<2> Specifies the package name, such as `openshift-pipelines-operator-rh`. -<3> Specifies the blocked update or rollback version. -<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`. +<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. +<2> Specifies the name of the service account you created to install, update, and manage your extension. +<3> Optional: Specifies channel names as an array, such as `pipelines-1.14` or `latest`. +<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". +<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. . Apply the changes to your Operator or extensions CR by running the following command: + diff --git a/modules/olmv1-installing-an-operator.adoc b/modules/olmv1-installing-an-operator.adoc index 87b1bdea24..ad15092b81 100644 --- a/modules/olmv1-installing-an-operator.adoc +++ b/modules/olmv1-installing-an-operator.adoc @@ -34,11 +34,13 @@ apiVersion: olm.operatorframework.io/v1 channels: - <3> version: <4> + upgradeConstraintPolicy: CatalogProvided <5> ---- <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. <2> Specifies the name of the service account you created to install, update, and manage your extension. <3> Optional: Specifies channel names as an array, such as `pipelines-1.14` or `latest`. <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". +<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". .Example `pipelines-operator.yaml` CR [source,yaml] diff --git a/modules/olmv1-version-range-comparisons.adoc b/modules/olmv1-version-range-comparisons.adoc index c5f2ac2fda..2c3cc0e512 100644 --- a/modules/olmv1-version-range-comparisons.adoc +++ b/modules/olmv1-version-range-comparisons.adoc @@ -40,14 +40,19 @@ You can specify a version range in an Operator or extension's CR by using a rang .Example version range comparison [source,yaml] ---- -apiVersion: olm.operatorframework.io/v1alpha1 -kind: ClusterExtension -metadata: - name: pipelines-operator -spec: - packageName: openshift-pipelines-operator-rh - installNamespace: - version: ">=1.11, <1.13" +apiVersion: olm.operatorframework.io/v1 + kind: ClusterExtension + metadata: + name: + spec: + namespace: + serviceAccount: + name: + source: + sourceType: Catalog + catalog: + packageName: + version: ">=1.11, <1.13" ---- 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.