-
Notifications
You must be signed in to change notification settings - Fork 799
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
Add skopeo Login from c/common #865
Conversation
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.
What is the ultimate dependency graph envisioned to look like? This somewhat suggests Podman → CLI parsing + half of the implementation in Skopeo → another half of the implementation in Buildah.
And where does the actual Buildah CLI fit into this? It can’t call Skopeo, that would be a circular dependency.
Lets move the shared code to github.com/containers/common, And not vendor buildah into skopeo. |
How much code should be shared i c/common? If skopeo keeps |
(This should have been the first design concern before writing code I think.) We can’t trivially share global code anyway, due to things like My first guess would be, in Skopeo terms, to make the Alternatively, make |
BTW making the “optional bool” flag type public and used elsewhere would make sense to me, if we can make it work with Cobra nicely. |
Well if we need OptionalBool for Skopeo, I do not know why we don't need it for Buidlah And Podman. |
All of the handling of certs an plugins can be isolated from the CLI Parsing can't it? |
In principle, but that kind of depends on the adjustments that are not “CLI parsing”, e.g. Podman overriding the defaults in “rootless” mode and creating the directories in advance. Those kinds of activities are not “CLI parsing” but it must be possible to inject them into the operation at some point (or, well, they could be removed and pushed down into the backend libraries, as has been somewhat happening recently). |
5502704
to
4226ca1
Compare
4bff92a
to
501cac3
Compare
@QiWang19 Needs a rebase. |
abc92bc
to
c8ef7d8
Compare
can the tests for login/logout use the registry set up in integration/registry.go? |
Sure; check_test.go and other parts already set up several registries that can maybe just be reused. |
fd799da
to
43df415
Compare
83bde40
to
a1c646a
Compare
@mtrmac PTAL |
cmd/skopeo/utils.go
Outdated
SystemRegistriesConfPath: opts.registriesConfPath, | ||
BigFilesTemporaryDir: opts.tmpDir, | ||
} | ||
// DEPRECATED: We support this for backward compatibility, but override it if a per-image flag is provided. |
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.
This should be removed from imageOptions.newSystemContext
now (and I guess replaced with a comment that explains that the imageOptions
option overrides the global
one if both are present.
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.
(Non-blocking: I meant a comment specific to --tls-verify
. I guess the current generic one works.)
cf106d8
to
fdd1111
Compare
@mtrmac PTAL |
cmd/skopeo/utils.go
Outdated
SystemRegistriesConfPath: opts.registriesConfPath, | ||
BigFilesTemporaryDir: opts.tmpDir, | ||
} | ||
// DEPRECATED: We support this for backward compatibility, but override it if a per-image flag is provided. |
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.
(Non-blocking: I meant a comment specific to --tls-verify
. I guess the current generic one works.)
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.
Looks good, last nits.
@mtrmac PTAL |
#865 (comment) is still outstanding, and please rebase. Looks good otherwise. |
Implements skopeo login&logout commands. Signed-off-by: Qi Wang <[email protected]>
Signed-off-by: Qi Wang <[email protected]>
@mtrmac PTAL |
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.
LGTM. Thanks!
Used c/common/pkg/auth for skopeo login
Based on PR #857