Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
155 changes: 155 additions & 0 deletions release_notes/ocp-4-6-release-notes.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -575,6 +575,161 @@ Operator developers can now use conversion webhooks for Operators that target al

See xref:../operators/operator_sdk/osdk-generating-csvs.adoc#olm-defining-csv-webhook_osdk-generating-csvs[Defining webhooks] for more information.

[id="ocp-4-6-operator-api"]
==== Operator API now supported

The Operator API introduced in {product-title} 4.5 as a Technology Preview feature is now supported and enabled by default. Installing Operators using Operator Lifecycle Manager (OLM) has required cluster administrators to be aware of multiple APIs, including CatalogSources, Subscriptions, ClusterServiceVersions, and InstallPlans. This single Operator API resource is a first step towards a more simplified experience discovering and managing the lifecycle of Operators in a {product-title} cluster.

Relevant resources are now automatically labeled accordingly for the new Operator API for any Operators where the CSV is installed using a Subscription. Cluster administrators can use the CLI with this single API to interact with installed Operators. For example:

[source,terminal]
----
$ oc get operators
----

[source,terminal]
----
$ oc describe operator <operator_name>
----

[id="ocp-4-6-operator-rm-tp"]
===== Removing Technology Preview Operator API before cluster upgrade

If you enabled the Technology Preview feature version of the Operator API in {product-title} 4.5, you must disable it before upgrading to {product-title} 4.6. Failure to do so blocks your cluster upgrade, because the feature required a xref:../architecture/architecture-installation.adoc#unmanaged-operators_architecture-installation[Cluster Version Operator (CVO) override].

.Prerequisites

* {product-title} 4.5 cluster with Technology Preview Operator API enabled

.Procedure

. Because Operator API labels are applied to relevant resources automatically in {product-title} 4.6, you must remove any `operators.coreos.com/<name>` labels you previously applied manually.

.. You can check which resources are currently labeled for your Operator by running the following command and reviewing the `status.components.refs` section:
+
[source,terminal]
----
$ oc describe operator <operator_name>
----
+
For example:
+
[source,terminal]
----
$ oc describe operator etcd-test
----
+
.Example output
[source,terminal]
----
...
Status:
Components:
Label Selector:
Match Expressions:
Key: operators.coreos.com/etcd-test
Operator: Exists
Refs:
API Version: apiextensions.k8s.io/v1
Conditions:
Last Transition Time: 2020-07-02T05:50:40Z
Message: no conflicts found
Reason: NoConflicts
Status: True
Type: NamesAccepted
Last Transition Time: 2020-07-02T05:50:41Z
Message: the initial names have been accepted
Reason: InitialNamesAccepted
Status: True
Type: Established
Kind: CustomResourceDefinition <1>
Name: etcdclusters.etcd.database.coreos.com <1>
...
----
<1> Resource type.
<2> Resource name.

.. Remove the labels from all relevant resources. For example:
+
[source,terminal]
----
$ oc label sub etcd operators.coreos.com/etcd-test- -n test-project
$ oc label ip install-6c5mr operators.coreos.com/etcd-test- -n test-project
$ oc label csv etcdoperator.v0.9.4 operators.coreos.com/etcd-test- -n test-project
$ oc label crd etcdclusters.etcd.database.coreos.com operators.coreos.com/etcd-test-
$ oc label crd etcdbackups.etcd.database.coreos.com operators.coreos.com/etcd-test-
$ oc label crd etcdrestores.etcd.database.coreos.com operators.coreos.com/etcd-test-
----

. Delete the Operator custom resource definition (CRD):
+
[source,terminal]
----
$ oc delete crd operators.operators.coreos.com
----

. Remove the `OperatorLifecycleManagerV2=true` feature gate from the OLM Operator.

.. Edit the Deployment for the OLM Operator:
+
[source,terminal]
----
$ oc -n openshift-operator-lifecycle-manager \
edit deployment olm-operator
----

.. Remove the following flags from the `args` section in the Deployment:
+
[source,terminal]
----
...
spec:
containers:
- args:
...
- --feature-gates <1>
- OperatorLifecycleManagerV2=true <1>
Comment thread
adellape marked this conversation as resolved.
Outdated
----
<1> Remove these flags.

.. Save your changes.

. Re-enable CVO management of OLM:
+
[source,terminal]
----
Comment thread
adellape marked this conversation as resolved.
Outdated
$ oc patch clusterversion version \
--type=merge -p \
'{
"spec":{
"overrides":[
{
"kind":"Deployment",
"name":"olm-operator",
"namespace":"openshift-operator-lifecycle-manager",
"unmanaged":false,
"group":"apps/v1"
}
]
}
}'
----

. Verify that the Operator resource is no longer available:
+
[source,terminal]
----
$ oc get operators
----
+
.Example output
[source,terminal]
----
error: the server doesn't have a resource type "operators"
----

Your upgrade to {product-title} 4.6 should now no longer be blocked by this feature.

[id="ocp-4-6-images"]
=== Images

Expand Down