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

KEP-127: Support User Namespaces #1903

Conversation

mauriciovasquezbernal
Copy link
Contributor

This PR adds the summary and motivation sections for a KEP proposing to support user namespaces.

This is not a new topic in Kubernetes as it has been discussed multiple times in the past. #127 was tracking the Support Node-Level User Namespaces Remapping design proposal. There was also a PR implementing that but it was never merged.

We want to continue pushing for this feature in Kubernetes, as a first step we are opening this PR that is mainly based on the existing design proposal. We'll continue updating the proposal to complete the KEP and we hope to open a follow up PR soon.

@rata @alban @sargun, @solarkennedy, @jigish

/cc @mrunalp
/sig node

@k8s-ci-robot k8s-ci-robot added sig/node Categorizes an issue or PR as relevant to SIG Node. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jul 22, 2020
@k8s-ci-robot
Copy link
Contributor

Hi @mauriciovasquezbernal. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Jul 22, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: mauriciovasquezbernal
To complete the pull request process, please assign derekwaynecarr
You can assign the PR to them by writing /assign @derekwaynecarr in a comment when ready.

The full list of commands accepted by this bot can be found 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

@k8s-ci-robot k8s-ci-robot added kind/kep Categorizes KEP tracking issues and PRs modifying the KEP directory sig/architecture Categorizes an issue or PR as relevant to SIG Architecture. labels Jul 22, 2020
@sftim
Copy link
Contributor

sftim commented Jul 23, 2020

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jul 23, 2020
@mauriciovasquezbernal mauriciovasquezbernal force-pushed the mauricio/userns_summary_and_motivation branch from 65ddf34 to 68ca8be Compare July 23, 2020 13:12
and make progress.
-->

- To have different uid/gid mappings per pod/container. All pods/containers
Copy link
Member

Choose a reason for hiding this comment

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

Can we have another KEP for this in future? Or it won't be supported? (why?)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Definitely. Our plan is to scope this KEP to some specific use cases now and leave further improvements like that for the future.

@@ -165,6 +165,13 @@ updates.
[documentation style guide]: https://github.com/kubernetes/community/blob/master/contributors/guide/style-guide.md
-->

Container security consists of many different kernel features that work
together to make containers secure. User namespaces is one such features that
Copy link

Choose a reason for hiding this comment

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

Suggested change
together to make containers secure. User namespaces is one such features that
together to make containers secure. User namespaces is one such feature that

Comment on lines +225 to +226
- To have different uid/gid mappings per pod/container. All pods/containers
running in a node share a common user namespace remapping configuration.
Copy link

Choose a reason for hiding this comment

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

I suggest to distinguish the rationale for per pod mappings and per container mappings:

Suggested change
- To have different uid/gid mappings per pod/container. All pods/containers
running in a node share a common user namespace remapping configuration.
- To have different uid/gid mappings for each pod. All pods running in a
node share a common user namespace remapping configuration. There
is interest in the community for having different mappings for each pod
but for simplicity, this will not be specified in this initial KEP.
- To have different uid/gid mappings per container. By Kubernetes
design, all containers in a pod share the same network namespace.
Additionally, Linux requires that sysfs can only be mounted in a
container if the network namespace belongs to the current user
namespace. It follows that we can't have a different user namespace
for each container of the same pod.

### Non-Goals

<!--
What is out of scope for this KEP? Listing non-goals helps to focus discussion
and make progress.
-->

- To have different uid/gid mappings per pod/container. All pods/containers
running in a node share a common user namespace remapping configuration.
- Remote volumes support e.g. NFS.
Copy link

Choose a reason for hiding this comment

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

Suggested change
- Remote volumes support e.g. NFS.
- Remote volumes support e.g. NFS. There is interest in the community for
supporting volumes such as NFS. However, this would increase the
complexity significantly to consider remapping ids for volumes. So this is
kept out of scope from this KEP and can be discussed in a future KEP
instead.

@mauriciovasquezbernal
Copy link
Contributor Author

New PR with complete proposal #2101.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/kep Categorizes KEP tracking issues and PRs modifying the KEP directory ok-to-test Indicates a non-member PR verified by an org member that is safe to test. sig/architecture Categorizes an issue or PR as relevant to SIG Architecture. sig/node Categorizes an issue or PR as relevant to SIG Node. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants