Replies: 3 comments 3 replies
-
|
In your Tenant owners there's an evident typo:
This is a group, not a specific user. If you want to use a Service Account, former must be |
Beta Was this translation helpful? Give feedback.
-
|
After changing owner to - name: system:serviceaccount:argocd:argocd-application-controller
kind: ServiceAccountNamespace is fully synced and owner reference is present It works!. Thank you @prometherion The next question is how to unlink namespace from tenant object |
Beta Was this translation helpful? Give feedback.
-
|
Hi @prometherion and @djkormo I am experiencing same error "Cannot assign the desired namespace to a non-owned Tenant" in my test ArgoCD environment and not sure what I'm missing at this point. Could you please advise if possible?
But still getting above error with latest v0.7.4 Capsule image, K8s 1.31, ArgoCD v2.14.6. Any help is appreciated! |
Beta Was this translation helpful? Give feedback.



Uh oh!
There was an error while loading. Please reload this page.
-
How to use the capsule project with the argocd gitops approach
Capsule was installed using helm chart with version 0.7.4
How to sync namespaces resources
My capsule configuration
My tenant configuration
My namespaces configuration
My argocd application
How to reproduce
Argocd is used to synchronize tenant manifest and namespaces manifests
Expected behavior
After syncing resources (here namespace) in argocd they should be added to tenant with owner reference.
When I try to sync them (the namespace is not created yet) I see
In the capsule controller logs I see
{"level":"Level(-5)","ts":"2025-03-09T14:20:32.095Z","logger":"admission","msg":"received request","object":{"name":"destroyer-uat","namespace":"destroyer-uat"},"namespace":"destroyer-uat","name":"destroyer-uat","resource":{"group":"","version":"v1","resource":"namespaces"},"user":"system:serviceaccount:argocd:argocd-application-controller","requestID":"eb29c740-7c3c-4e14-8787-aabe236a0398"} {"level":"Level(-5)","ts":"2025-03-09T14:20:32.095Z","logger":"admission","msg":"wrote response","code":403,"reason":"Forbidden","message":"Cannot assign the desired namespace to a non-owned Tenant","requestID":"eb29c740-7c3c-4e14-8787-aabe236a0398","allowed":false} {"level":"debug","ts":"2025-03-09T14:20:32.095Z","logger":"events","msg":"Namespace destroyer-uat cannot be assigned to the current Tenant","type":"Warning","object":{"kind":"Tenant","name":"destroyer","uid":"05a8ac6b-7556-4f55-b247-bbe3e89bf0bd","apiVersion":"capsule.clastix.io/v1beta2","resourceVersion":"21037528"},"reason":"NonOwnedTenant"}When the namespace is created outside argocd and having owner reference added to a namespace I see
In logs I see
{"level":"Level(-5)","ts":"2025-03-09T14:23:49.175Z","logger":"admission","msg":"received request","object":{"name":"destroyer-dev","namespace":"destroyer-dev"},"namespace":"destroyer-dev","name":"destroyer-dev","resource":{"group":"","version":"v1","resource":"namespaces"},"user":"system:serviceaccount:argocd:argocd-application-controller","requestID":"5261797d-9d90-4b9a-a946-3e6a61817a5c"} {"level":"Level(-5)","ts":"2025-03-09T14:23:49.175Z","logger":"admission","msg":"wrote response","code":403,"reason":"Forbidden","message":"Denied patch request for this namespace","requestID":"5261797d-9d90-4b9a-a946-3e6a61817a5c","allowed":false} {"level":"debug","ts":"2025-03-09T14:23:49.175Z","logger":"events","msg":"Namespace destroyer-dev can not be patched","type":"Warning","object":{"kind":"Namespace","name":"destroyer-dev","uid":"a30b4a8c-936f-472b-b999-9ea97508bbc5","apiVersion":"v1","resourceVersion":"21037533"},"reason":"OfflimitNamespace"}Additional context
Beta Was this translation helpful? Give feedback.
All reactions