-
Notifications
You must be signed in to change notification settings - Fork 54
Give users appropriate access to resources #543
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
Give users appropriate access to resources #543
Conversation
josibake
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice! left a few comments that I think would make this less verbose and some ideas about how to structure this long term.
from a permissions standpoint, I think its nice to have values.yaml not give anything by default, have namespace-defaults.yaml give the needed permissions for running a user in a namespace, and then namespaces.yaml can be used to apply overrides as needed.
| - apiGroups: [""] | ||
| resources: ["pods/log", "pods/exec", "pods/attach", "pods/portforward"] | ||
| verbs: ["get"] | ||
| - apiGroups: [""] | ||
| resources: ["configmaps", "secrets"] | ||
| verbs: ["get"] | ||
| - apiGroups: [""] | ||
| resources: ["persistentvolumeclaims"] | ||
| verbs: ["get", "list"] | ||
| - apiGroups: [""] | ||
| resources: ["events"] | ||
| verbs: ["get"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems like these could all be set on the namespace-defaults.yaml file? that way we only specify rules in the namespaces.yaml when we want to override defaults for a particular user/namespace.
| verbs: ["get"] | ||
| - apiGroups: [""] | ||
| resources: ["persistentvolumeclaims"] | ||
| verbs: ["get", "list"] | ||
| - apiGroups: [""] | ||
| resources: ["events"] | ||
| verbs: ["get"] | ||
| - name: pod-manager | ||
| rules: | ||
| - apiGroups: [""] | ||
| resources: ["pods"] | ||
| verbs: ["get", "list", "watch", "create", "update", "delete"] | ||
| verbs: ["get", "list", "watch", "create", "delete", "update"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
longterm, we might want to have the values.yaml provide no permissions by default (or the most minimal possible), and then have sensible defaults in namespace-defaults.yaml , specific to the "war-games" use case. then namespaces.yaml is simply for overriding defaults as needed.
(what you have here is fine, more just thinking out loud of how we might want to structure this long term)
|
#544 merged, can be rebased on main |
Users need access to a number of resources so that they can run scenarios.
6371898 to
dbeadd6
Compare
|
Thanks for the feeback @josibake I rebased on main but will leave the rest as-is for now. I like your ideas about trimming the files down. |
Looking at this again, I do think the The reason this is important is a user is expected to to be able to create a |
|
Merging this as is for now (since its just changing defaults for configs) and will clean up in a follow up by me. |
The users need access to various resources to launch scenarios and view scenario logs.
I also included the "fixup namespace directory constants" here because it's needed.