-
Notifications
You must be signed in to change notification settings - Fork 163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error: admission webhook "owner.namespace.capsule.clastix.io" denied the request #478
Comments
Hey, thanks for reporting this, really appreciated! May I ask you to provide also the Tenant YAML definition and the action used to create the Namespace for the said user? It seems it's executed by a Flux reconcile, would be great having further details in order to reproduce this. |
I have done some additional tests and it's not related to the version. When I add the service account at the end: "system:serviceaccounts:flux-system:tenant-serviceaccount" to the userGroups in the capsule configuration then it works. However this does not work: "system:serviceaccounts:flux-system". I thought that using the group "flux-system" will include any service account created in that namespace ? |
Is the service account assigned as an owner of the tenant? It's not enough to just have it in capsuleUserGroups |
Maybe better ask for help from @MaxFedotov that worked on this feature 👀 |
Well, no, I was able to test the full chain for Service Account. I got this Tenant definition: apiVersion: capsule.clastix.io/v1beta1
kind: Tenant
metadata:
name: gas
spec:
owners:
- kind: ServiceAccount
name: system:serviceaccount:flux-system:tenant-serviceaccount And the following CapsuleConfiguration: apiVersion: capsule.clastix.io/v1alpha1
kind: CapsuleConfiguration
metadata:
name: default
spec:
forceTenantPrefix: false
protectedNamespaceRegex: ""
userGroups:
- capsule.clastix.io
- system:serviceaccounts:flux-system Obviously, I got the namespace
I'm running the last commit of Capsule (
Please, could you share your Tenant definition? Because I was able to replicate your issue by using the wrong ServiceAccount name: apiVersion: capsule.clastix.io/v1beta1
kind: Tenant
metadata:
name: gas
spec:
owners:
- kind: ServiceAccount
- name: system:serviceaccounts:flux-system:tenant-serviceaccount
+ name: system:serviceaccount:flux-system:tenant-serviceaccount
- kind: User
name: bob
|
Obviously, if I missed something @MaxFedotov, please, be my guest: always had troubles with the SA integration, mostly for the integration part using |
@prometherion @tomarent i think this is the same issue that was here - #449 (comment) And this configuration works well for us :) |
Ok, marking the issue as duplicate. Please, @tomarent, if you feel the need to open it back, be my guest, and thanks for using Capsule! 🚀 |
Bug description
after upgrading to version v0.1.1-rc0, I receive the following error message:
You do not have any Tenant assigned: please, reach out to the system administrators, error: admission webhook "owner.namespace.capsule.clastix.io" denied the request: You do not have any Tenant assigned: please, reach out to the system administrators
FYI: the reason for trying version v0.1.1-rc0 is because I was facing the issue explained in issue #415
How to reproduce
Steps to reproduce the behavior:
The helmRelease I am using:
My CapsuleConfiguration file looks as following:
Expected behavior
Logs
Additional context
The text was updated successfully, but these errors were encountered: