-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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 support for podman context as alias to podman system connection #15072
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.
I don't think it makes sense to just alias the names. If we need docker compat we have to actually match the docker output and input (cli arguments).
Agreed. Let's discuss which goal we try to reach. If it's docker compat, we probably need to tackle it command-by-command/commit-by-commit to make it reviewable. |
Yup, I agree, although don't have time or understanding of how these match up. I was hoping to get this to pass tests and ask people who are hitting issues, to see if this gets them further. Then if someone (intern?) wants to take it over and drive it home for missing CLI and Output. I have a feeling getting use and list to work would get us 95% of the way towards making more tools work. |
8b16378
to
ed47f25
Compare
88f92dd
to
5ebe0b9
Compare
9146db7
to
dda3ea2
Compare
Alias podman --context -> podman --connection podman context use -> podman system connection default podman context rm -> podman system connection rm podman context create -> podman system connection add podman context ls ->podman system connection ls podman context inspect ->podman system connection ls --json (For specified connections) Podman context is a hidden command, but can be used for existing scripts that assume Docker under the covers. Signed-off-by: Daniel J Walsh <[email protected]>
@containers/podman-maintainers PTAL |
@@ -56,8 +56,22 @@ function _run_podman_remote() { | |||
c1="c1_$(random_string 15)" | |||
c2="c2_$(random_string 15)" | |||
|
|||
run_podman system connection add $c1 tcp://localhost:12345 | |||
run_podman system connection add --default $c2 tcp://localhost:54321 |
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'm slightly nervous about removing tests for system connection add --default
. I realize the code paths are the same, but the option parsing itself is now untested. If for some reason you need to resubmit, or if you too think this path should be tested, I think an easy check would be to add
run_podman system connection add --default $c3 tcp://localhost:something <--- be sure to define c3
run_podman system connection ls
is "$output" "...check that $c3 is now default, left as exercise for the reader"
...to the tail end, after you do all the c1/c2 checks.
But maybe this is not a valid concern.
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 don't think it is worth it, but I would rather get this merged and then open a PR to add more tests.
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.
That's fine with me.
@cdoern @vrothberg @giuseppe @flouthoc 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.
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
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: flouthoc, giuseppe, 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 |
Alias
podman context use -> podman system connection default
podman context rm -> podman system connection rm
podman context create -> podman system connection add
podman context ls ->podman system connection ls
Podman context is a hidden command, but can be used for existing scripts
that assume Docker under the covers.
Signed-off-by: Daniel J Walsh [email protected]
Does this PR introduce a user-facing change?