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

remote: fix podman-remote play kube --userns #19203

Merged

Conversation

sstosh
Copy link
Contributor

@sstosh sstosh commented Jul 12, 2023

Fix podman play kube --userns to work in remote environment.

Related: #17392

Does this PR introduce a user-facing change?

The remote Podman client’s `podman play kube` command now work --userns option.

@github-actions github-actions bot added the kind/api-change Change to remote API; merits scrutiny label Jul 12, 2023
@sstosh
Copy link
Contributor Author

sstosh commented Jul 12, 2023

podman-remote --userns=auto works in rootless remote.

$ bin/podman unshare cat /proc/self/uid_map
         0       1000          1
         1     524288      65536

$ bin/podman-remote play kube test.yaml
Pod:
d397dc09e978c0ed2416b0be6f8b7f2b517ca90b1ebc0742fe4c57c9d7710d3a
Container:
ef19b78add7b2696efecd79f4aed6f00ad71ce29a83166cfd62ef106de6c387a

$ bin/podman-remote exec testPod-testCtr cat /proc/self/uid_map
         0       1000          1
         1     524288      65536

$ bin/podman-remote play kube --replace --userns=auto test.yaml
Pods stopped:
d397dc09e978c0ed2416b0be6f8b7f2b517ca90b1ebc0742fe4c57c9d7710d3a
Pods removed:
d397dc09e978c0ed2416b0be6f8b7f2b517ca90b1ebc0742fe4c57c9d7710d3a
Secrets removed:
Volumes removed:
Pod:
1602ef3a9ebedbbcc3707cb9f406b1e5d9cda56fc77fa3f0cddef5eb83f77cea
Container:
0a17f031fe309d65a6a0ef4fa554fde54976ae7aa8e1db955b7fbf15357b14bb

$ bin/podman-remote exec testPod-testCtr cat /proc/self/uid_map
         0          1       1024

@sstosh sstosh force-pushed the remote-play-kube-userns branch from f21ee42 to 92a2aa1 Compare July 12, 2023 06:57
Copy link
Member

@Luap99 Luap99 left a comment

Choose a reason for hiding this comment

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

Thanks, you also have to add the parameter to our swagger docs, see pkg/api/server/register_kube.go

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 once the previous comment is addressed

@sstosh sstosh force-pushed the remote-play-kube-userns branch from 92a2aa1 to d7b1f76 Compare July 12, 2023 09:14
Copy link
Member

@Luap99 Luap99 left a comment

Choose a reason for hiding this comment

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

/lgtm
/hold

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 12, 2023
@openshift-ci openshift-ci bot added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jul 12, 2023
Fix `podman play kube --userns` to work in remote environment.

Related: containers#17392

Signed-off-by: Toshiki Sonoda <[email protected]>
@sstosh sstosh force-pushed the remote-play-kube-userns branch from d7b1f76 to c6b5b9a Compare July 12, 2023 09:49
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Jul 12, 2023
@sstosh
Copy link
Contributor Author

sstosh commented Jul 12, 2023

Sorry, I fixed the e2e test and re-pushed.

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
/hold

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jul 12, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 12, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Luap99, sstosh, vrothberg

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

@rhatdan
Copy link
Member

rhatdan commented Jul 12, 2023

/hold cancel

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 12, 2023
@openshift-merge-robot openshift-merge-robot merged commit dcf0a3c into containers:main Jul 12, 2023
@sstosh sstosh deleted the remote-play-kube-userns branch July 12, 2023 23:32
@fsdrw08
Copy link

fsdrw08 commented Aug 14, 2023

may I know which version of the podman contain this commit will be release?

@rhatdan
Copy link
Member

rhatdan commented Aug 16, 2023

Looks like podman 4.7 in October.

@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 Nov 15, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 15, 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. kind/api-change Change to remote API; merits scrutiny 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. release-note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants