argoproj-labs / argo-rollouts-manager

Kubernetes Operator for Argo Rollouts controller.
https://argo-rollouts-manager.readthedocs.io/en/latest/
Apache License 2.0
84 stars 255 forks source link

Add logic to reconcile multiple RolloutMangers #65

Closed Rizwana777 closed 1 week ago

Rizwana777 commented 2 weeks ago

What does this PR do / why we need it:

JIRA - https://issues.redhat.com/browse/GITOPS-4766

Rizwana777 commented 2 weeks ago

I have added the iteration logic in Reconcile function itself, the example mention in the issue have a separate function which is called in SetupWithManager function, please do let me know if the logic I have added is correct or not, thank you

Rizwana777 commented 1 week ago

I've pushed a commit that takes a different approach to reconciling multiple RolloutManagers:

  • In general, one RolloutManager should not modify the status of another RolloutManager.
  • Instead, we can use the watch api to ensure that reconcile is called on all RolloutManagers whenever the another RolloutManager changes significantly (hinted at this approach in the original issue)

I've pushed a commit which does this, take a look and let me know if you see any issues. If not, we can clean up the resulting commit and then we are good to go.

I see no issues Jonathan, I have used enqueueRequestsFromMapFunc earlier as hinted but didn't followed the approach you have added so it was not working as expected and I tried adding the multiple Reconcile logic in Reconcile function itself which is not a good approach, thanks for the correction