Skip to content

Commit 6fcdd79

Browse files
authored
Merge pull request #34348 from adellape/osdk_apidep2
2 parents 54751c6 + 12512cc commit 6fcdd79

File tree

1 file changed

+12
-16
lines changed

1 file changed

+12
-16
lines changed

modules/osdk-control-compat.adoc

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77

88
[IMPORTANT]
99
====
10-
Kubernetes periodically deprecates certain APIs that are removed in subsequent releases. As a result, your Operator projects are unable to use removed APIs starting with the version of {product-title} that uses the Kubernetes version that removed the API.
10+
Kubernetes periodically deprecates certain APIs that are removed in subsequent releases. If your Operator is using a deprecated API, it might no longer work after the {product-title} cluster is upgraded to the Kubernetes version where the API has been removed.
1111
12-
As an Operator author, it is strongly recommended that you review the link:https://kubernetes.io/docs/reference/using-api/deprecation-guide/[Deprecated API Migration Guide] in Kubernetes documentation and keep your projects up to date to avoid using deprecated and removed APIs. Ideally, you should update your Operator before the release of a future version of {product-title} that would make the Operator incompatible.
12+
As an Operator author, it is strongly recommended that you review the link:https://kubernetes.io/docs/reference/using-api/deprecation-guide/[Deprecated API Migration Guide] in Kubernetes documentation and keep your Operator projects up to date to avoid using deprecated and removed APIs. Ideally, you should update your Operator before the release of a future version of {product-title} that would make the Operator incompatible.
1313
====
1414

1515
When an API is removed from an {product-title} version, Operators running on that cluster version that are still using removed APIs will no longer work properly. As an Operator author, you should plan to update your Operator projects to accommodate API deprecation and removal to avoid interruptions for users of your Operator.
@@ -29,19 +29,20 @@ If a cluster administrator has installed your Operator, before they upgrade to t
2929

3030
The following procedure helps prevent administrators from installing versions of your Operator on an incompatible version of {product-title}. These steps also prevent administrators from upgrading to a newer version of {product-title} that is incompatible with the version of your Operator that is currently installed on their cluster.
3131

32+
This procedure is also useful when you know that the current version of your Operator will not work well, for any reason, on a specific {product-title} version. By defining the cluster versions where the Operator should be distributed, you ensure that the Operator does not appear in a catalog of a cluster version which is outside of the allowed range.
33+
3234
[IMPORTANT]
3335
====
34-
You should configure the following settings in your Operator project as soon as possible. Users running workloads with deprecated APIs that are planning to eventually upgrade to a future version of {product-title} must be running an Operator that has the proper configuration to avoid a cluster upgrade to an incompatible version and potentially adversely impact their critical workloads.
36+
Operators that use deprecated APIs can adversely impact critical workloads when cluster administrators upgrade to a future version of {product-title} where the API is no longer supported. If your Operator is using deprecated APIs, you should configure the following settings in your Operator project as soon as possible.
3537
====
3638

3739
.Prerequisites
3840

39-
- Operator SDK CLI installed on a development workstation
40-
- Operator project initialized by using the Operator SDK
41+
- An existing Operator project
4142

4243
.Procedure
4344

44-
. Configure the maximum version of {product-title} that your Operator is compatible with. In your Operator project's cluster service version (CSV), set the `olm.openShiftMaxVersion` annotation to prevent administrators from upgrading their cluster before upgrading the installed Operator to a compatible version:
45+
. If you know that a specific bundle of your Operator is not supported and will not work correctly on {product-title} later than a certain cluster version, configure the maximum version of {product-title} that your Operator is compatible with. In your Operator project's cluster service version (CSV), set the `olm.maxOpenShiftVersion` annotation to prevent administrators from upgrading their cluster before upgrading the installed Operator to a compatible version:
4546
+
4647
.Example CSV with `olm.maxOpenShiftVersion` annotation
4748
[source,yaml]
@@ -50,9 +51,9 @@ apiVersion: operators.coreos.com/v1alpha1
5051
kind: ClusterServiceVersion
5152
metadata:
5253
annotations:
53-
"olm.properties": '[{"type": "olm.maxOpenShiftVersion", "value": "4.8"}]' <1>
54+
"olm.properties": '[{"type": "olm.maxOpenShiftVersion", "value": "<cluster_version>"}]' <1>
5455
----
55-
<1> Setting `value` to `4.8` prevents cluster upgrades to {product-title} versions later than 4.8 when this bundle is installed on a cluster.
56+
<1> Specify the maximum cluster version of {product-title} that your Operator is compatible with. For example, setting `value` to `4.8` prevents cluster upgrades to {product-title} versions later than 4.8 when this bundle is installed on a cluster.
5657

5758
. If your bundle is intended for distribution in a Red Hat-provided Operator catalog, configure the compatible versions of {product-title} for your Operator by setting the following properties. This configuration ensures your Operator is only included in catalogs that target compatible versions of {product-title}:
5859
+
@@ -70,19 +71,14 @@ com.redhat.openshift.versions: "v4.6-v4.8" <1>
7071
----
7172
<1> Set to a range or single version.
7273

73-
.. To prevent your bundle from being carried on to an incompatible version of {product-title}, ensure that the index image is generated with the proper `com.redhat.openshift.versions` label in your project's `bundle.Dockerfile`:
74+
.. To prevent your bundle from being carried on to an incompatible version of {product-title}, ensure that the index image is generated with the proper `com.redhat.openshift.versions` label in your Operator's bundle image. For example, if your project was generated using the Operator SDK, update the `bundle.Dockerfile` file:
7475
+
7576
.Example `bundle.Dockerfile` with compatible versions
7677
+
7778
[source,yaml]
7879
----
79-
LABEL com.redhat.openshift.versions="v4.6-v4.8" <1>
80+
LABEL com.redhat.openshift.versions="<versions>" <1>
8081
----
81-
<1> Set to a range or single version.
82-
+
83-
[NOTE]
84-
====
85-
This label is also useful when you know that the current version of your Operator will not work well, for any reason, on a specific {product-title} version. By using it, you define the cluster versions where the Operator should be distributed, and the Operator does not appear in a catalog of a cluster version which is outside of the range.
86-
====
82+
<1> Set to a range or single version, for example, `v4.6-v4.8`. This setting defines the cluster versions where the Operator should be distributed, and the Operator does not appear in a catalog of a cluster version which is outside of the range.
8783

8884
You can now bundle a new version of your Operator and publish the updated version to a catalog for distribution.

0 commit comments

Comments
 (0)