Simplification of the logic in the managed service instances controller
As Kubernetes is async by natrure we cannot guarantee that instance provisioning will be called only once. This is okay, because the OSB API is idempotent, so however many times we call it it will always return the same response. Therefore we don't need logic to avoid multiple provision calls.
At some point the instance will become ready and will no longer try to reach out to the broker anyway
Same goes for the deprovisioning logic. We do not need a status condition there as well. Furthermore we already have the finalizer and do check if it is removed or not so that we do not finalize the resource multiple times. However this is not a guarantee because of the distributed nature of the system
Making the provision call return the operation id that it got from the broker simplifies the polling logic as well. If the operation id is empty the call is synchronous so we don't have to poll last operation, if not we can call get last operation once and requeue if still in progress. The same pattern should be applicable for polling last delete operation in the finalizer when we get to it.
All tests are passing with the simplified logic, only the tests that were explicitly testing the logic around the removed contitions have been removed as obsolete.
Is there a related GitHub Issue?
No
What is this change about?
Simplification of the logic in the managed service instances controller