Two operators watching a CR

17 views
Skip to first unread message

Harihara Narayanan B

unread,
Nov 25, 2020, 4:33:06 PM11/25/20
to Operator Framework
Hello,

We are developing an operator that will instantiate a CR of another dependent operator, what I observed is that if I let my operator to watch that CR - the reconciliation loop on both my operator and of the dependent operator run endless but if I set my operator to not watch that CR (in the watches.yaml), the problem disappears and both reconciliation loops stop after all resources have been created (expected behaviour).
When both operator watch the CR,  the resourceVersion of the CR keeps changing every few seconds, looks like the two operators are updating the CR after each other and causing the endless the reconciliation loop.

Is it recommended to not watch the CRs of the dependent operators that are created within the CR of my operator? Any further details how does this impact the reconciliation loop ?

To share logs, below is what I see in the dependent operator’s logs -
```
E1104 22:15:09.456628 1 queueinformer_operator.go:290] sync {"update" "openshift-operator-lifecycle-manager/packageserver"} failed: error updating ClusterServiceVersion status: Operation cannot be fulfilled on clusterserviceversions.operators.coreos.com "packageserver": the object has been modified; please apply your changes to the latest version and try again
```

regards,
Harihara N Balakrishnan
Reply all
Reply to author
Forward
0 new messages