-
Notifications
You must be signed in to change notification settings - Fork 448
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
Narrow down RBAC rules #2091
Narrow down RBAC rules #2091
Changes from 13 commits
1753314
c14b197
a6b7a36
280b07b
ccd4505
b90e686
16e6fe4
47623d5
4a2f61b
fe5934e
18dc99c
e2f0c43
9485d7a
ce33dad
9d8b1b1
0fb54a2
7cdd471
b12915c
e794067
ab8d995
df29e98
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,18 +8,45 @@ rules: | |
- "" | ||
resources: | ||
- configmaps | ||
- serviceaccounts | ||
- services | ||
- events | ||
- namespaces | ||
verbs: | ||
- "*" | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- serviceaccounts | ||
- persistentvolumes | ||
- persistentvolumeclaims | ||
verbs: | ||
- "get" | ||
- "list" | ||
- "watch" | ||
- "create" | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- secrets | ||
verbs: | ||
- "get" | ||
- "create" | ||
- "delete" | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- namespaces | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need permission for namespace in the Controller @johnugeorge @tenzen-y ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As I can see, we operate namespaces only from UI. So we can remove the permission for namespaces. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes. It is needed only in UI. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I retested it. Currently, Katib needs get/list/watch for namespaces as well. Need to investigate separately |
||
verbs: | ||
- "get" | ||
- "list" | ||
- "watch" | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- pods | ||
- pods/log | ||
- pods/status | ||
- secrets | ||
verbs: | ||
- "*" | ||
- "get" | ||
- apiGroups: | ||
- apps | ||
resources: | ||
|
@@ -32,7 +59,10 @@ rules: | |
- roles | ||
- rolebindings | ||
verbs: | ||
- "*" | ||
- "get" | ||
- "create" | ||
- "list" | ||
- "watch" | ||
- apiGroups: | ||
- batch | ||
resources: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @johnugeorge Should we limit scope for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we do get/create/delete/watch for all |
||
|
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.
Do we need
*
for services ?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.
Yes. We do it in https://github.com/kubeflow/katib/blob/master/pkg/controller.v1beta1/suggestion/suggestion_controller_util.go
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.
We do get/create/delete/watch