The controller creates the operator ManifestWork unconditionally.
If a Subscription with the same name already exists on the spoke (e.g. installed manually or by another component), ManifestWork will claim ownership of it.
Deleting the mesh would then remove that pre-existing Subscription, breaking whatever depended on it.
A known case: on OCP <4.22, the ingress operator installs OSSM via a servicemeshoperator3 Subscription in openshift-operators.
Since we use the same Subscription name and namespace for OCP clusters, our ManifestWork would hijack it.
This could disrupt the ingress operator's functionality if the mesh is later deleted.
We should use a ManagedClusterView to check for an existing Subscription before creating the ManifestWork.
If no Subscription is found, proceed with ManifestWork creation as usual.
If an incompatible Subscription is found (different channel, catalog source, etc.), report a conflict status and halt reconciliation for that cluster.
If a compatible Subscription is found, the controller should "adopt" it by skipping ManifestWork creation entirely.
The operator is already installed and working, so we just need to track that it exists and move on to the next reconciliation steps (trust, discovery).
Cleanup should also be aware of adoption: when the mesh is deleted, the controller should not attempt to remove an adopted operator since it didn't install it.
The controller creates the operator
ManifestWorkunconditionally.If a
Subscriptionwith the same name already exists on the spoke (e.g. installed manually or by another component),ManifestWorkwill claim ownership of it.Deleting the mesh would then remove that pre-existing
Subscription, breaking whatever depended on it.A known case: on OCP <4.22, the ingress operator installs OSSM via a
servicemeshoperator3Subscriptioninopenshift-operators.Since we use the same
Subscriptionname and namespace for OCP clusters, ourManifestWorkwould hijack it.This could disrupt the ingress operator's functionality if the mesh is later deleted.
We should use a
ManagedClusterViewto check for an existingSubscriptionbefore creating theManifestWork.If no
Subscriptionis found, proceed withManifestWorkcreation as usual.If an incompatible
Subscriptionis found (different channel, catalog source, etc.), report a conflict status and halt reconciliation for that cluster.If a compatible
Subscriptionis found, the controller should "adopt" it by skippingManifestWorkcreation entirely.The operator is already installed and working, so we just need to track that it exists and move on to the next reconciliation steps (trust, discovery).
Cleanup should also be aware of adoption: when the mesh is deleted, the controller should not attempt to remove an adopted operator since it didn't install it.