Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 2030840

Summary: When deploying simple-kmod, an additional special-resource-operator cluster operator is created
Product: OpenShift Container Platform Reporter: Udi Kalifon <ukalifon>
Component: Special Resource OperatorAssignee: Quentin Barrand <quba>
Status: CLOSED NOTABUG QA Contact: Walid A. <wabouham>
Severity: high Docs Contact:
Priority: high    
Version: 4.9CC: aos-bugs, bthurber, quba
Target Milestone: ---   
Target Release: 4.11.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-03-03 14:50:25 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Udi Kalifon 2021-12-09 20:44:10 UTC
Description of problem:
When installing the redhat version (not the community version) of the SRO, it is created as an operator called "openshift-special-resource-operator.openshift-operators" in the openshift-operators namespace. After deploying simple-kmod, an additional operator called "special-resource-operator" is created as a cluster operator.


Version-Release number of selected component (if applicable):
OCP 4.9.4


How reproducible:
100%


Steps to Reproduce:
1. Install SRO. I install it from Operator Hub in the openshift console. You also need to create a default instance of NFD.
2. Check that you only have one operator with "oc get operators", and no addition SRO operator when you run "oc get clusteroperators".
3. Clone https://github.com/openshift/special-resource-operator.git and deploy simple-kmod with: oc apply -f charts/example/simple-kmod-0.0.1/simple-kmod.yaml
4. Check the operators and the cluster operators again.


Actual results:
A cluster operator appeared uninvited


Expected results:
There should be only one operator

Comment 2 Quentin Barrand 2022-01-06 15:25:18 UTC
Hi Udi,

Constantin and I dug into this and here are our findings:
- Operator objects are created by the OLM when installing an operator
- ClusterOperator objects are created by operators themselves to report their status to Kubernetes. It is still unclear for me who consumes that data.

There are two issues with the way SRO deals with its ClusterOperator object at the moment:
- SRO only creates the ClusterOperator after the first reconciliation, while it should probably do it as soon as it's ready. That explains why the ClusterOperator object only show up after you install simple-kmod.
- The Operator object is named openshift-special-resource-operator, while the ClusterOperator is named special-resource-operator. We should probably change this, but we should first understand if the ClusterOperator data is used by some component.

Comment 3 Quentin Barrand 2022-01-25 14:24:14 UTC
This BZ is being worked on downstream. Some prior work is required to merge all upstream changes that did not make it to downstream.

Comment 4 Quentin Barrand 2022-03-03 14:50:25 UTC
SRO is not a core operator, and as such it is not supposed to publish a ClusterOperator object.
The corresponding code will be removed and no ClusterOperator will be created moving forward.