-
Notifications
You must be signed in to change notification settings - Fork 45
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
Tighten storage-operator permissions against Salt #2635
Tighten storage-operator permissions against Salt #2635
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
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.
LGTM
@@ -4,36 +4,23 @@ metadata: | |||
creationTimestamp: null | |||
name: storage-operator | |||
rules: | |||
# For recording transition events |
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.
Good idea to add comments in this file 👍
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.
FWIW, if we update operator-sdk
/controller-runtime
(or move to kubebuilder
), the RBAC rules are to be defined in the Go code using annotations, and this file is to be generated by the tooling.
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.
Oh yeah... Debt ticket #2644
@@ -45,7 +45,9 @@ external_auth: | |||
storage-operator: | |||
- '*': | |||
- 'disk.dump' | |||
- 'state.sls' | |||
- 'state.sls': |
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.
Ho, this was simpler than I thought ^^
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.
That's the theory, not working atm 😅
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.
OK it looks like it's working actually!
This comment has been minimized.
This comment has been minimized.
2faa98d
to
51fd518
Compare
This comment has been minimized.
This comment has been minimized.
51fd518
to
803d521
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
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.
Why does the storage-operator need to read deployments and replicasets?
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.
It comes from kubemetrics
: when creating the Service, it reads its Pod's owner controller (a ReplicaSet) and this controller's controller (a Deployment) to determine the right selector
to use, I think. The information is disseminated in several issues and pull requests in operator-sdk
, and I found most of them when investigating the Failed to list *unstructured.Unstructured
error logs. Could do some digging up my history if you want, but I can confirm that there were unauthorized errors if I remove those permissions.
When changes lead to issues in storage-operator provisioning of Volumes, it is useful to provide the user with appropriate details directly in the logs, instead of requiring manual investigations on the platform.
/approve |
Waiting for approvalThe following approvals are needed before I can proceed with the merge:
Peer approvals must include at least 1 approval from the following list:
The following options are set: approve |
In the queueThe changeset has received all authorizations and has been added to the The changeset will be merged in:
The following branches will NOT be impacted:
There is no action required on your side. You will be notified here once IMPORTANT Please do not attempt to modify this pull request.
If you need this pull request to be removed from the queue, please contact a The following options are set: approve |
I have successfully merged the changeset of this pull request
The following branches have NOT changed:
Please check the status of the associated issue None. Goodbye gdemonet. |
Component: salt, storage-operator
Context: see conversation in #2634
Summary: to do
Acceptance criteria: to do
Closes: #2634
Fixes: #1528
Fixes: #2084