Azure / azure-service-operator

Azure Service Operator allows you to create Azure resources using kubectl
https://azure.github.io/azure-service-operator/
MIT License
739 stars 194 forks source link

Extend delete extension point to more easily allow users to hook the actual delete entirely #3471

Open matthchr opened 11 months ago

matthchr commented 11 months ago

Describe the current behavior

3467 merged support for deleting subscriptions owned by APIM products, but it did so in a way that results in a double DELETE HTTP request being sent.

It did this because it's easier to call next and delegate the tracking of the various delete states to ASO. But it would be ideal if there were a way to allow the extension to totally own the delete (thereby avoiding double-delete).

Describe the improvement @theunrepentantgeek suggested some sort of return-result paradigm where the extension could signal to the caller if it did or did not issue the delete (and possibly return a future to poll if it did, for LRO cases?), and then the ASO infrastructure could do the bookkeeping.

If we do the above, we should update the changes made in #3467 to move to a single delete. This has advantages for error reporting as well as API throttling.

matthchr commented 3 months ago

This is still something we're interested in doing.