-
Notifications
You must be signed in to change notification settings - Fork 178
feat: Permission API block #1449
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
base: main
Are you sure you want to change the base?
Conversation
In the other PR you asked if I needed help. And I do, at least pointers (not a Go joke). I'll try to list them here:
|
Signed-off-by: niuxe <[email protected]>
Signed-off-by: niuxe <[email protected]>
Signed-off-by: niuxe <[email protected]>
Signed-off-by: niuxe <[email protected]>
f66479f
to
1a69f9d
Compare
You have done the correct thing. We mainly deprecate in the docs and create an issue. Once we are satisfied with all new functions, we are going to roll over to v1.
Correct, or with other structs, which are not directly bound to CRD use only. eg |
I am still thinking about, if there's more need to extend this case. With this we are adding these things:
So what if we abstracted even more regarding the clusterrolebinding, where on a tenant perspective, we mainly define, which clusterRoleBindings can be bound on bases of labelSelectors (maybe also considering namespace). Eg. permissions:
allowedClusterBindings:
- matchExpressions:
- key: target
operator: In
values: ["customer"] Then we offload the entire permissions to it's on CR, essentially allowing tenant owners initially to provision them: apiVersion: capsule.clastix.io/v1beta2
kind: TenantPermission
metadata:
name: solar
namespace: solar-system
spec:
bindings:
- read-only
subjects:
- name: operators
kind: Group
actAsOwner: false And then we leverage WDYT |
I like the idea of keeping the A lot of the functionality is already there with options to limit labels or image registries. To me it would make sense with this new feature to aim for a direction of a What I'm thinking though, should this PR create the permission block, with the new CR in mind, or should we add the fields directly on the Tenant CRD? If you, and I agree, wanna go down the road of keeping the Tenant more as a config CRD, and the off load the whole permission logic to the new CRD. I think it would make more sense implementing it that way in the first place. A side thought, in our cluster we're trying to make it easy for tenants, and we're adding the If we change the Unless the idea is for cluster admins to also use |
Great Thinking. Most definitly, i would also prefer going with the dedicated CR. Implementing this goes you core knowhow on how to write a golang based kubernetes controller in no time, i will help you with the bootstrapping. In the case of "If we change the permissions block to only scope clusterRoles allowed to be bound" This one i don't understand completely tbh. |
What I mean here was, right now the When we bootstrap a tenant, we use GlobalTenantResource and If we remove this functionality from the tenant, so it's only possible to specify But you answered that. :) I am a fan of keep the |
Things to achieve in this PR:
|
Signed-off-by: niuxe <[email protected]>
Signed-off-by: niuxe <[email protected]>
Signed-off-by: niuxe <[email protected]>
876ba7b
to
cbbf588
Compare
Signed-off-by: niuxe <[email protected]>
Signed-off-by: niuxe <[email protected]>
Signed-off-by: niuxe <[email protected]>
Working from the conversation in this PR: #1332
Original feature was to implement a flag for the webhook to allow creation of namespace, by letting some users impersinate the owner.
After feedback from @oliverbaehler this has changed to be a new API block in the
Tenant
resource, for controlling the RBAC for the Capsule Tenant.Features:
AdditionalRoleBindings
field.ClusterRoleBindings
(Addressing this issue AddadditionalClusterRoleBindings
to allow setting cluster wide access for a tenant. #1386 )RoleBindings
with the use of a namespace selector.