rbac: allow build/image manipulation and retrieval#3133
rbac: allow build/image manipulation and retrieval#3133cgwalters wants to merge 1 commit intoopenshift:masterfrom
Conversation
This give rbac permissions to the machine-config-controller service account to manipulate Builds/BuildRequests and Imagestreams in the machine-config-operator namespace, as well as push images into the internal registry. This gives rbac permissions to the machine-config-daemon serviceaccount to retrieve images from the internal registry. This also updates the operator's sync so that these new registry role files will be generated and deployed properly with the mco.
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cgwalters The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
The service account token itself that is already available to the daemon does work if you do basic auth but I don't know how to format it for auth.json yet (just running "username:$token" through Like, this will work: where $token is the contents of It could also potentially be a completely different credential that we make specifically for this, if need be. |
|
Right, hmm. Thinking about this more...I think this path is arguing a bit for the "special pod" path. That would mean that kubelet would be provided the necessary token to pull the image. But the "special pod" path has a lot of tradeoffs. Here's another model - the operator passes the secret as part of the MCD pod instead. That seems like it'd Just Work, right? |
|
I see what you're saying about the "special pod". I did manage to coax the serviceaccount token itself into docker credentials, but I'd rather not write the serviceaccount token to disk. I'd rather write a "useless" pull secret that can only pull. I did initially want to just mount the pull secret -- the serviceaccount gets a default pull secret that works, but it's randomly named, so I can't reliably mount it. (If there is an easy way around the random secret naming thing I would love to know it). I was starting to go down the "we need to make a pull secret that has a reliable name and then have the pod mount it" path, and yes that should Just Work. |
|
We talked about this real-time, I think the conclusion is that the operator (not the daemon) can load the |
Prep for openshift#3135 This will do nothing right now and should be harmless, but will help avoid a conflict with layering, see openshift#3133
|
So I thought we had a good next step here, but I managed to hunt down where those automatic dockercfg secrets come from, and I don't know if this is "bad news", per se, but it really does look like openshift-controller-manager is doing the same thing (albeit more elegantly) that I was doing here: by just "making a JSON wrapper" around the service account token: I guess eventually if the daemon ends up having no real permissions, maybe it's okay to write that to disk, but right now that seems kind of...hmmm. |
|
See internal thread "no auto generation of legacy service account token starting with 1.24" |
|
Issues go stale after 90d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle stale |
|
@cgwalters: PR needs rebase. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
Stale issues rot after 30d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle rotten |
|
@cgwalters: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
|
Rotten issues close after 30d of inactivity. Reopen the issue by commenting /close |
|
@openshift-bot: Closed this PR. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
<walters> note: This drops 04df624#diff-879656d2f0921beeb4e9f00c109ade9a4fe9920cd742b43fa407144e6bbbd555R43 since I don't understand why it was there and it needs more motivation.
Splitting this out from the layering branch since it's one of the changes that currently conflicts on master. Prep for merging layering.
This give rbac permissions to the machine-config-controller service
account to manipulate Builds/BuildRequests and Imagestreams in the
machine-config-operator namespace, as well as push images into the internal registry.
This gives rbac permissions to the machine-config-daemon serviceaccount
to retrieve images from the internal registry.
This also updates the operator's sync so that these new registry role files will be
generated and deployed properly with the mco.