forked from kubernetes-retired/multi-tenancy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Let subns with propagated objects be deleted
See issue kubernetes-retired#1130. The HNC object validator was preventing the K8s namespace controller from cleaning out a namespace to allow it to be deleted. This change lets HNC understand that when a namespace is being deleted, we should ignore the subnamespaceOf annotation. This allows the HierarchyConfiguration object to be reset to its initial state (like a full namespace would when it's being deleted), orphaning the namespace and allowing all its propagated objects to be removed. Tested: added new tests and ran them multiple times while watching the logs. The subnamespace test failed without this change and passed every time with it, with the logs showing the expected behaviour.
- Loading branch information
1 parent
62424dc
commit 2f2de46
Showing
2 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters