Kubernetes controller for multi-tenancy. It propagates resources between namespaces accurately and allows tenant users to create/delete sub-namespaces.
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.
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