-
Notifications
You must be signed in to change notification settings - Fork 4.8k
pkg/oc/cli/admin/release: Add --insecure #21266
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
|
On the other hand, this may not be much use unless we can talk the cluster into pulling over HTTP. Launching a cluster based on an image mirrored to an insecure registry is giving me errors like: [core@wking-bootstrap ~]$ journalctl -f
...
Oct 16 05:26:40 wking-bootstrap bootkube.sh[1350]: Trying to pull 192.168.122.1:5000/openshift-v4.0:release...Failed
Oct 16 05:26:40 wking-bootstrap bootkube.sh[1350]: unable to pull 192.168.122.1:5000/openshift-v4.0:release: unable to pull image: Error determining manifest MIME type for docker://192.168.122.1:5000/openshift-v4.0:release: pinging docker registry returned: Get https://192.168.122.1:5000/v2/: http: server gave HTTP response to HTTPS client
... |
CRI-O's docs have:
So while this PR may be useful for consistency with |
|
The intention is that all "docker registry" modifier security related flags would be on all |
|
You need to run hack/update-generated-completions.sh |
2bb9c08 to
7524633
Compare
|
Unit (and basically everyone I checked) died with: Looking at the unit history, I'm just very unlucky ;). /retest |
|
/retest |
1 similar comment
|
/retest |
|
@wking can we do this for the |
7524633 to
4fd4121
Compare
|
/lgtm |
|
/approve |
soltysh
left a comment
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.
/approve
|
/test ci/prow/cmd |
|
/retest |
|
I don't know why the |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
Stuff has changed in the mean time, re-testing should solve the problem 😉 |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
The This command fails with:
Whereas this one works:
|
|
/retest Please review the full test history for this PR and help us cut down flakes. |
flaper87
left a comment
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.
I found the issue. We should pass the Insecure flag to the extract options too. It should be enough to add opts.Insecure = o.Insecure to https://github.com/openshift/origin/pull/21266/files#diff-e7e7595e7ee6718351c88cf2e07449acR639
|
/retest Please review the full test history for this PR and help us cut down flakes. |
1 similar comment
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/hold |
|
I didn't know this PR existed and started on it in openshift/machine-config-operator#496 (comment) too One higher level question though; how hard/hacky would it be to use the cluster CA from the active |
4fd4121 to
cbd6deb
Compare
|
New changes are detected. LGTM label has been removed. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: soltysh, wking 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 |
Matching 'oc image mirror --insecure'. This lets callers avoid: $ podman run -d -p 5000:5000 --name registry docker.io/library/registry $ oc adm release mirror --from=registry.svc.ci.openshift.org/openshift/origin-release:v4.0 --to localhost:5000/openshift-v4.0 info: Mirroring 79 images to localhost:5000/openshift-v4.0 ... error: unable to connect to localhost:5000/openshift-v4.0: Get https://localhost:5000/v2/: http: server gave HTTP response to HTTPS client ... error: unable to connect to localhost:5000/openshift-v4.0: Get https://localhost:5000/v2/: http: server gave HTTP response to HTTPS client error: an error occurred during planning when the local registry only speaks HTTP. Ideally we could turn this off only for pushes, allowing us to pull from a remote registry over HTTPS but push to the local registry over HTTP. But 'oc image mirror' doesn't seem to support that level of granularity. And even though the course --insecure allows access over HTTP, we should still be using HTTPS where possible, so the risk of leaking secrets from a properly-configured registry is small. Although maybe there are increased man-in-the-middle risks? I'm not entirely clear on whether --insecure weakens our "acceptable" HTTPS quality as well, or if it's just limited to the documented "allow HTTPS too". The contrib/completions/*/oc updates were generated with: $ make all WHAT=cmd/oc $ hack/update-generated-completions.sh
cbd6deb to
1607ad7
Compare
For the registry access? I'd have expected that was already happening for registries that belong to the cluster (e.g. via this). Is it not? I've pushed 4fd4121 -> 1607ad7, rebasing onto master and addressing (I think) @flaper87's |
|
I still need this PR for openshift/machine-config-operator#496 |
|
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 |
|
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 |
|
/unassign @flaper87 |
|
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. |
Matching
oc image mirror --insecure. This lets callers avoid:when the local registry only speaks HTTP.
Ideally we could turn this off only for pushes, allowing us to pull from a remote registry over HTTPS but push to the local registry over HTTP. But
oc image mirrordoesn't seem to support that level of granularity. And even though the coarse--insecureallows access over HTTP, we should still be using HTTPS where possible, so the risk of leaking secrets from a properly-configured registry is small. Although maybe there are increased man-in-the-middle risks? I'm not entirely clear on whether--insecureweakens our "acceptable" HTTPS quality as well (likecurl --insecure), or if it's just limited to the documented "allow HTTPS too".CC @smarterclayton.