-
Notifications
You must be signed in to change notification settings - Fork 426
Bug 1823143: Add ImageContentSourcePolicy awareness to oc image, oc adm release #662
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
Conversation
|
@sallyom: This pull request references Bugzilla bug 1823143, which is valid. The bug has been updated to refer to the pull request using the external bug tracker. 3 validation(s) were run on this bug
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. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: sallyom The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
$ oc adm release mirror registry.svc.ci.openshift.org/ocp/release:4.7.0-0.ci-2020-12-02-015504 --to localhost:5000/test/release
then
$ oc adm release -a ~/pull-secret-local-only extract --command openshift-install localhost:5000/test/release:4.7.0-0.ci-2020-12-02-015504
or
$ oc adm release -a ~/pull-secret-local-only extract --command openshift-install registry.svc.ci.openshift.org/ocp/release:4.7.0-0.ci-2020-12-02-015504 --icsp-file config/icsp..yaml
or
$ oc apply -f config/icsp...yaml
then
$ oc adm release -a ~/pull-secret-local-only extract --command openshift-install registry.svc.ci.openshift.org/ocp/release:4.7.0-0.ci-2020-12-02-015504
$ oc adm release info registry.svc.ci.openshift.org/ocp/release:4.7.0-0.ci-2020-12-02-015504 --image-for cli-artifacts
registry.svc.ci.openshift.org/ocp/4.7-2020-12-02-015504@sha256:b2a9b9cbf7d36cea817739677c4123ebb3e3e0263ae7d48723097be0b6547096
$ oc image mirror registry.svc.ci.openshift.org/ocp/4.7-2020-12-02-015504@sha256:b2a9b9cbf7d36cea817739677c4123ebb3e3e0263ae7d48723097be0b6547096=localhost:5000/cli-artifacts:4.7.0-0.ci-2020-12-02-015504
$ oc image -a ~/ps-local info registry.svc.ci.openshift.org/ocp/4.7-2020-12-02-015504@sha256:b2a9b9cbf7d36cea817739677c4123ebb3e3e0263ae7d48723097be0b6547096
error: unable to read image registry.svc.ci.openshift.org/ocp/4.7-2020-12-02-015504@sha256:b2a9b9cbf7d36cea817739677c4123ebb3e3e0263ae7d48723097be0b6547096: Get "https://registry.svc.ci.openshift.org/v2/ocp/4.7-2020-12-02-015504/manifests/sha256:b2a9b9cbf7d36cea817739677c4123ebb3e3e0263ae7d48723097be0b6547096": unauthorized: authentication required
failed because not authorized - now run the same but pass the icsp file:
$ oc image -a ~/ps-local info registry.svc.ci.openshift.org/ocp/4.7-2020-12-02-015504@sha256:b2a9b9cbf7d36cea817739677c4123ebb3e3e0263ae7d48723097be0b6547096 --icsp-file config/icsp-sha256-2c0f33960669ce07.yaml
or, after 'oc apply -f config/icsp...yaml':
$ oc image -a ~/ps-local info registry.svc.ci.openshift.org/ocp/4.7-2020-12-02-015504@sha256:b2a9b9cbf7d36cea817739677c4123ebb3e3e0263ae7d48723097be0b6547096 --lookup-cluster-icsp=true |
check image reference, icsp, then image instead of only using image references for 'oc adm release ...' commands 0. If user passes --icsp-file path, fail if no valid sources found from the file 1. Try the current flow of lookup image from any underlying image references. If this fails, go to 2. 2. Try to gather image source info from ImageContentSourcePolicy, if this fails go to 3. 3. Set the registry/repo/name to be that of user-given release rather than its refs. If image not found, return the original error from 1. When working with mirrored release payloads, a release from a mirrored registry, mylocalregistry/ocp/release:4.5.0-0.nightly-2020-04-18-093630 mirrored from registry.svc.ci.openshift.org/ocp/release:4.5.0-0.nightly-2020-04-18-093630 - Both reference 'quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:2eb0a51...'. In case of disconnected, oc will use 'mylocalregistry/ocp/release' instead of 'quay.io/openshift-release-dev/ocp-v4.0-art-dev' _or_ will get image source information from ICSP in cluster. Also, `oc adm release mirror` will write ICSP file to local disk.
… image mirror|extract|info'
9e562be to
1e7d78d
Compare
|
@sallyom: This pull request references Bugzilla bug 1823143, which is valid. 3 validation(s) were run on this bug
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. |
|
@sallyom: 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. |
|
/hold I am really not in favor of this approach, because it is not solving the root problem that generic registry access. |
|
closing, in favor of original #439, with icsp lookup methods in library-go |
|
@sallyom: This pull request references Bugzilla bug 1823143. The bug has been updated to no longer refer to the pull request using the external bug tracker. 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. |
(copied from #439)
/cc @soltysh
This PR implements openshift/enhancements#334:
oc adm release mirrorto either:oc adm releasewill try in this order:--lookup-cluster-icspthen decode/use that - don't look furtheroc image extract|mirror|append|info* if --icsp-file is set, or --lookup-cluster-icsp then decode/use that - don't look further
* try image passed as/is
*
oc imagecommand will not implicitly try alternative sourcesset up a secure local registry with this script.
and see example test commands below.