cybozu-go / accurate

Kubernetes controller for multi-tenancy. It propagates resources between namespaces accurately and allows tenant users to create/delete sub-namespaces.
https://cybozu-go.github.io/accurate/
Apache License 2.0
38 stars 5 forks source link

Add validation for safely deletion of SubNamespace #22

Closed masa213f closed 2 years ago

masa213f commented 2 years ago

What

When a SubNamespace is deleted, a related Namespace is deleted by the accurate controller.

However, sometimes the Namespace deletion does not complete, and it remains terminating. At this time, the owner of the SbuNamespace may not manage the terminating namespace.

The reason why the Namespace cannot be deleted is that some namespaced resources in it cannot be deleted due to the finalizer or any other reasons.

How

Add validation when deleting a SubNamespace. If there are any namespaced resources left in the related namespace, deny the deletion.

Checklist

ymmt2005 commented 2 years ago

It seems that no one is interested in implementing this. Closing.