Closed Freyert closed 1 year ago
The main issue is you need to do set difference twice:
A = desired set B = existing set
difference(A,B) = (what's in A, but not in B) = items to add difference(B,A) = (what's in B, but not in A) = items to remove
Then only enter the create/destroy paths depending on the elements in either call.
The following just runs every time. So we will always issue a new POST/PUT.
Hi @Freyert. Thanks for raising an issue. Could you please provide your AtlasProject
resource where your installation of atlas operator is stuck in an infinite loop?
Closed due to no activity
What did you do to encounter the bug? Steps to reproduce the behavior:
What did you expect? A clear and concise description of what you expected to happen.
I would expect the operator to not re-request API Allow list rules if the rules currently exist (even in a Pending state).
What happened instead? A clear and concise description of what happened instead
The operator requests changes to the IP Access List, sees items in pending, goes into another reconcile loop, requests changes to the IP access list, forever.
Screenshots If applicable, add screenshots to help explain your problem.
https://github.com/mongodb/mongodb-atlas-kubernetes/blob/1f6ce4a1b71578a43154a709d2595ad29fb898e1/pkg/controller/atlasproject/ipaccess_list.go#L62-L83
Operator Information
Kubernetes Cluster Information
Additional context Add any other context about the problem here.
If possible, please include:
kubectl describe
output