Azure / azure-service-operator

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

Feature: Make reconcile-policy default value configurable #4053

Open buzzaII opened 5 months ago

buzzaII commented 5 months ago

It would be ideal to be able to specify the default value for the annotation reconcile-policy to be changed. Currently its default is manage.

The use case is, the teams are setting this through commonAnnotations in Kustomize for all azure resource manifests, which could easily be forgotten and as a cluster administrator it would be great to enforce this at the controller level. Then reconcile-policy can be explicitly set to manage to destroy those resources (via a extra deployment step for destruction).

matthchr commented 5 months ago

You want to control this at the operator scope, yes? For example a parameter to the operator itself (in its configuration secret probably) that configures what its default is?

Can you expand a little on what you'd like to set the default to (just to make sure we understand the use-case)

buzzaII commented 5 months ago

Correct it would be an 'installation parameter' at the operator level

The use case is for my use of ASO i would like all azure controller resources to be detach-on-delete by default - and have to explicitly set the reconcile-policy to manage at the point I am interested in cleaning up these resources.

So in the controller the reconcile-policy would be detach-on-delete for the default value for my use case.

RSE132 commented 5 months ago

Even I am looking for the same thing. Otherwise if a azure resource is created with reconcile-policy to manage by default then an accidental deletion of the resource will delete the azure resources. In order to prevent accidental deletion setting reconcile-policy to detach-on-delete as default value would be good