Closed gaohoward closed 4 months ago
@howardgao I like your approach: starting from the deployed route and setting fields that the operator cares to reconcile the ActiveMQArtemis CR spec. The operator should only restore fields that the operator cares to reconcile the ActiveMQArtemis CR spec
, so no host if the field IngressHost
is not defined and no annotations. The ownerReferences should be restored because the operator needs those to watch deployed resources.
The ownerReferences should be restored because the operator needs those to watch deployed resources.
the owner reference will be set on create, and we will only discover what we own, the comparison logic to determine if there is a change should ignore the ownerReference, in fact it ignores metadata, however we have had to respect metadata since we added the template to modify annotations. see calls to : https://github.com/artemiscloud/activemq-artemis-operator/blob/main/controllers/activemqartemis_reconciler.go#L1522
@howardgao I like your approach: starting from the deployed route and setting fields that the operator cares to reconcile the ActiveMQArtemis CR spec. The operator should only restore
fields that the operator cares to reconcile the ActiveMQArtemis CR spec
, so no host if the fieldIngressHost
is not defined and no annotations. The ownerReferences should be restored because the operator needs those to watch deployed resources.
I could add updating the OwnerReference to the resources.Update() method.
@howardgao please ignore my previous comment, I changed my mind, I agree with @gtully
Agreed.
There are some issues to be decided:
Question is : do we want to handle those cases and if we do, how to do it?