Skip to content
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

[CI:DOCS] List /etc/containers/certs.d as default for --cert-path #12412

Merged
merged 1 commit into from
Nov 29, 2021

Conversation

rhatdan
Copy link
Member

@rhatdan rhatdan commented Nov 25, 2021

Helps Document #10116

Signed-off-by: Daniel J Walsh [email protected]

What this PR does / why we need it:

How to verify it

Which issue(s) this PR fixes:

Special notes for your reviewer:

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 25, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rhatdan

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 25, 2021
@rhatdan
Copy link
Member Author

rhatdan commented Nov 25, 2021

Replaces: #12411

Copy link
Member

@vrothberg vrothberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jonyhy96
Copy link

Can u show any code ref that really use /etc/containers/certs.d/ as default? I tried deploy a registry with self-signed certification, it will only work when i do pull with --cert-dir specific to /etc/containers/certs.d/.

@vrothberg
Copy link
Member

https://github.com/containers/image/blob/main/docker/docker_client.go#L188

Do you have a $HOME/.config/containers/certs.d? If that exists, rootless Podman will use that.

@jonyhy96
Copy link

https://github.com/containers/image/blob/main/docker/docker_client.go#L188

Do you have a $HOME/.config/containers/certs.d? If that exists, rootless Podman will use that.

After reading through source code of podman pull, i can't found any code ref point to docker_client.go#L188.

Pull => abi.Pull => r.copyFromRegistry => copySingleImageFromRegistry => r.newCopier

@rhatdan rhatdan changed the title List /etc/containers/certs.d as default for --cert-path [CI:DOCS] List /etc/containers/certs.d as default for --cert-path Nov 29, 2021
@umohnani8
Copy link
Member

LGTM

@rhatdan rhatdan added the lgtm Indicates that a PR is ready to be merged. label Nov 29, 2021
@openshift-merge-robot openshift-merge-robot merged commit d51ebca into containers:main Nov 29, 2021
@rhatdan
Copy link
Member Author

rhatdan commented Nov 29, 2021

@umohnani8 when you give the second LGTM, could you add a / in front to merge please.

@jonyhy96
Copy link

@rhatdan @umohnani8 Have time to take a look at #12412 (comment)?

@rhatdan
Copy link
Member Author

rhatdan commented Nov 30, 2021

@jonyhy96 Please open a new issue. @vrothberg PTAL

@rhatdan
Copy link
Member Author

rhatdan commented Nov 30, 2021

@mtrmac WDYT?

@mtrmac
Copy link
Collaborator

mtrmac commented Nov 30, 2021

What this PR does / why we need it:

? The last comment of #10116 shows this was an user error, but not in the path.

Meanwhile

Do you have a $HOME/.config/containers/certs.d? If that exists, rootless Podman will use that.

so the /etc/containers/certs.d value is not “the default”, at least not without further qualification/explanation.

So I think the short paragraph for --cert-dir should primarily be a bit more prominent about pointing to the man page to understand the specific directory structure and naming convention — and if users understand that more difficult part, they are also going to find the default paths in the same man page.

@mtrmac
Copy link
Collaborator

mtrmac commented Nov 30, 2021

After reading through source code of podman pull, i can't found any code ref point to docker_client.go#L188.

Pull => abi.Pull => r.copyFromRegistry => copySingleImageFromRegistry =>

No,

srcRef, err := registryTransport.NewReference(candidate.Value)
(or another way to get a c/image/docker.dockerReference) is how it is connected.

@jonyhy96
Copy link

jonyhy96 commented Dec 1, 2021

After reading through source code of podman pull, i can't found any code ref point to docker_client.go#L188.
Pull => abi.Pull => r.copyFromRegistry => copySingleImageFromRegistry =>

No,

srcRef, err := registryTransport.NewReference(candidate.Value)

(or another way to get a c/image/docker.dockerReference) is how it is connected.

Thanks for explanation! for each sourceReference it will new a docker-client which will actually use perHostCertDirs

@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 22, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants