-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
oc import-image attempts to watch all imagestream of namespace after an import #13214
Comments
@AlbertoPeon is the issue that you need to add the watch verb, or that you can't restrict the role to just resources with a specific name? and in your example command: is the value of $image literally |
@bparees the second one, the service account needs to watch all imagestreams in the namespace instead of only the one limited by It is really not a big deal, just a bit annoying to have to add that role. WRT your second question, yes, it would be :
|
We already watch IS by name, but unfortunately watch are limited and that they don't work with limited privs. We'd have to change that watch call to poll on a get. |
Hm. Polling doesn't seem unreasonable in this case, thanks. |
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 |
/remove-lifecycle stale |
`watch` doesn't work with RBAC `resourceNames` as well as `get`. Changing the `waitForImport` to poll a `get` instead. fixes openshift#13214
`watch` doesn't work with RBAC `resourceNames` as well as `get`. Changing the `waitForImport` to poll a `get` instead. fixes openshift#13214
`watch` doesn't work with RBAC `resourceNames` as well as `get`. Changing the `waitForImport` to poll a `get` instead. fixes openshift#13214
`watch` doesn't work with RBAC `resourceNames` as well as `get`. Changing the `waitForImport` to poll a `get` instead. fixes openshift#13214
`watch` doesn't work with RBAC `resourceNames` as well as `get`. Changing the `waitForImport` to poll a `get` instead. fixes openshift#13214
`watch` doesn't work with RBAC `resourceNames` as well as `get`. Changing the `waitForImport` to poll a `get` instead. fixes openshift#13214
`watch` doesn't work with RBAC `resourceNames` as well as `get`. Changing the `waitForImport` to poll a `get` instead. fixes openshift#13214
Version
$ oc version
oc v1.4.1+3f9807a
kubernetes v1.4.0+776c994
features: Basic-Auth
Problem description
We have a set of images that we build outside of OpenShift, push to an external Docker registry and then we import them to OpenShif with
oc import-image
.For that, a lightweight serviceaccount is provisioned and assigned the following role:
As you can see, we only allow to modify resources with name 'image_name'
However, when running
oc import-image
:The import actually succeeds but the command fails (returns != 0 status code) trying to display the imported images. It seems that the command tries to watch all the imagestreams in the namespace?
As a workaround, I can add an extra rule to the role defined above like:
However, it will be more convenient if this permission wasn't required to just import images.
The text was updated successfully, but these errors were encountered: