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

podman play kube (and this quadlet) has no support for uid/gid mapping #16594

Closed
alexlarsson opened this issue Nov 23, 2022 · 7 comments · Fixed by #16748
Closed

podman play kube (and this quadlet) has no support for uid/gid mapping #16594

alexlarsson opened this issue Nov 23, 2022 · 7 comments · Fixed by #16748
Labels
locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. quadlet

Comments

@alexlarsson
Copy link
Contributor

When using play kube from a systemd service file (e.g. with quadlet) it seems very useful to be able to set up some particular uid mappings. In particular, --userns=auto which podman run supports seem useful.

@vrothberg
Copy link
Member

vrothberg commented Nov 23, 2022

Do you envision a global setting for all containers, or do you desire fine-grained control over individual containers?

@alexlarsson
Copy link
Contributor Author

Hmm, good question. Is it even possible to have different uid/gid mappings inside a single pod? I mean, podman pod create supports --userns=auto, what does that mean for the containers in that pod? Are all using that mapping, or is it the default for containers?

@vrothberg
Copy link
Member

I never tried that. @giuseppe @rhatdan, do you know?

@rhatdan
Copy link
Member

rhatdan commented Nov 23, 2022

There is one user namespace. Working with containers in different User Namespaces inside the same pod is not currently supported. You would hit issues with conflicting files ownerships ... Shifting file systems might at some point make this possible, but still dealing with interprocess communication would be broken if root in one container is not root in a different container. Bottom line one user namespace per pod.

@alexlarsson
Copy link
Contributor Author

That sounds about right to me. So we could extend the support of e.g. --userns=auto in pod create to kube play and then pass that from the quadlet generated CLI.

@ygalblum
Copy link
Contributor

podman kube play already supports the --userns argument, accepting the same values as in podman run.
What it doesn't support are --uidmap and --gidmap. But, do we need them?

@alexlarsson
Copy link
Contributor Author

What it doesn't support are --uidmap and --gidmap. But, do we need them?

I would say not, they are just much more painful to use. --userns=auto has options similar to the anyway, except they are in addition to the automatic selection of the rest.

So, just steal the current RemapUsers=auto code from the .container support in quadlet.

@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 8, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. quadlet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants