generated from cybozu-go/neco-template
-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
If you have two SubNamespaces with the same name, you get a conflict. When you delete the SubNamespace "owning" the namespace, the namespace is deleted, but a new namespace isn't created. And the remaining SubNamespace is left in "Stalled" status condition. A restart of the accurate controller fixes the issue and the namespace is created, but it would be nice that this happened without manually intervention (I guess I could have waited for the next reconcile loop, but I was impatient).
Environments
- Version: accurate v1.7.1
- OS: OpenShift v4.18/k8s v1.31
To Reproduce
Steps to reproduce the behavior:
- Create two SubNamespaces with the same name. One of the SubNamespaces gets a Stalled status condition.
$ k get subnamespaces -A -o custom-columns="NAMESPACE:.metadata.namespace,NAME:.metadata.name,STALLED_MESSAGE:.status.conditions[?(@.type=='Stalled')].message"
NAMESPACE NAME STALLED_MESSAGE
stas-acme-test stas-bendik-test-accurate <none>
stas-vault-test stas-bendik-test-accurate Conflicting namespace already exists
- Delete the SubNamespace that is not in a Stalled condition.
$ k delete subnamespace stas-bendik-test-accurate -n stas-acme-test
subnamespace.accurate.cybozu.com "stas-bendik-test-accurate" deleted
- Observe that the corresponding namespace is deleted and not created again by the SubNamespace i Stalled condition.
$ k get namespace stas-bendik-test-accurate
Error from server (NotFound): namespaces "stas-bendik-test-accurate" not found
$ k get subnamespaces -A -o custom-columns="NAMESPACE:.metadata.namespace,NAME:.metadata.name,STALLED_MESSAGE:.status.conditions[?(@.type=='Stalled')].message"
NAMESPACE NAME STALLED_MESSAGE
stas-vault-test stas-bendik-test-accurate Conflicting namespace already exists
Expected behavior
I would expect Accurate to immediately create the namespace again after deleting the SubNamespace that was not in a Stalled condition.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working