Skip to content

Registry catalog API call #10102

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

Merged
merged 1 commit into from
Aug 1, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions dev_guide/managing_images.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,36 @@ By default, all service accounts in a project have rights to pull any image in
the same project, and the *builder* service account has rights to push any image
in the same project.

ifdef::openshift-origin,openshift-enterprise,openshift-dedicated,atomic-registry[]
=== Listing repositories

Listing of repositories (or rather ImageStream names) is supported via `/v2/_catalog` endpoint as
documented
link:https://github.com/docker/distribution/blob/master/docs/spec/api.md#listing-repositories[upstream].
The only requirement is that the authenticated user must have `list` rights on the `imagestreams`
in the whole cluster.

Here is one example of granting a permission to list ImageStreams to a user:

----
$ oc adm policy add-cluster-role-to-user registry-viewer user
----

.A CLI example of listing repositories
----
$ oc login -u user
$ curl -v -u unused:$(oc whoami -t) https://<registry_server>:<port>/v2/_catalog?n=100
----

[IMPORTANT]
====
This API call is very expensive for a high number of image streams in the cluster. We strongly
recommend to use
link:https://github.com/docker/distribution/blob/master/docs/spec/api.md#pagination[pagination]
instead of listing all image streams.
====
endif::openshift-origin,openshift-enterprise,openshift-dedicated,atomic-registry[]

ifdef::openshift-origin,openshift-online,openshift-enterprise,openshift-dedicated[]
[[using-image-pull-secrets]]
== Using Image Pull Secrets
Expand Down