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: Mark as implementable (target phase I for 1.25) #3275

Merged
merged 1 commit into from
Jun 9, 2022

Conversation

rata
Copy link
Member

@rata rata commented Apr 7, 2022

With @giuseppe we created a PoC implementation for containerd and CRIO to validate this changes, all turned out to work just fine. Volume support is also working as expected.

This updates the KEP for 1.25 as discussed in SIG-node. Only PRR is missing to mark as implementable.

Signed-off-by: Rodrigo Campos rodrigoca@microsoft.com
Co-authored-by: Giuseppe Scrivano gscrivan@redhat.com
Signed-off-by: Giuseppe Scrivano gscrivan@redhat.com

cc @SergeyKanzhelev @mrunalp @thockin

  • One-line PR description: Add changes for userns support and switch to implementable
  • Other comments:

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Apr 7, 2022
@k8s-ci-robot k8s-ci-robot added the kind/kep Categorizes KEP tracking issues and PRs modifying the KEP directory label Apr 7, 2022
@k8s-ci-robot k8s-ci-robot added the sig/node Categorizes an issue or PR as relevant to SIG Node. label Apr 7, 2022
@rata
Copy link
Member Author

rata commented Apr 12, 2022

@mrunalp @SergeyKanzhelev @thockin friendly ping?

I'll be away until next week, but it will be great if you can have a look.

@marosset
Copy link
Contributor

/cc

@giuseppe
Copy link
Member

giuseppe commented May 3, 2022

@giuseppe
Copy link
Member

giuseppe commented May 5, 2022

@mrunalp could we get another review?

@giuseppe
Copy link
Member

giuseppe commented May 5, 2022

if I use Size, I get this error:

vendor/k8s.io/api/core/v1/generated.pb.go:21342:6: type IDMapping has both field and method named Size

I've reverted back to using Length

@fuweid
Copy link

fuweid commented May 9, 2022

cc

@marosset
Copy link
Contributor

marosset commented May 9, 2022

I reviewed these changes from a Windows perspective and it would require some OS changes to be able to support something like this on Windows and even if those changes were in place things would work differently.
Let's keep the KEP/changes focused on linux for the time being.

@rata
Copy link
Member Author

rata commented May 10, 2022

@marosset Perfect, thanks a lot!

For reviewers, please note that the CRI changes live all inside the linux-specific part. They are all inside the LinuxPodSandboxConfig field of the PodSandboxConfig message. (in particular PodSandboxConfig.linux.security_context.namespace_options)

@rata rata mentioned this pull request May 23, 2022
4 tasks
@rata rata changed the title KEP-127: Add CRI changes for userns support KEP-3317: Mark KEP as implementable for 1.25 May 23, 2022
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels May 23, 2022
@rata rata force-pushed the rata/userns branch 2 times, most recently from 6f047d6 to fa47967 Compare May 23, 2022 15:03
Copy link
Member

@SergeyKanzhelev SergeyKanzhelev left a comment

Choose a reason for hiding this comment

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

reapplying lgtm, changes looks good

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 7, 2022
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 7, 2022
Copy link
Member

@wojtek-t wojtek-t left a comment

Choose a reason for hiding this comment

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

@rata - couple follow ups from yesterday comments, but we're pretty close now.

keps/prod-readiness/sig-node/3317.yaml Outdated Show resolved Hide resolved
keps/prod-readiness/sig-node/3317.yaml Outdated Show resolved Hide resolved
keps/sig-node/127-user-namespaces/README.md Outdated Show resolved Hide resolved
@@ -250,6 +312,56 @@ limit the number of pods using user namespaces to `min(maxPods, 1024)`. This
leaves us plenty of host UID space free and this limits is probably never hit in
practice. See UNRESOLVED for more some UNRESOLVED info we still have on this.

##### pkg/volume changes for phase I
Copy link
Member

Choose a reason for hiding this comment

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

Comment to line 308 (follow up from your response to my comment):

The UID they choose is inside the user namespace, it doesn't affect the mapping picked on the host.

Since we are always allocating the same size, there is no fragmentation to worry about (in facts we just use a bitmap to store at runtime what ranges are allocated).

The picked range is stored in the file /var/lib/kubelet/pods/$POD/userns so the Kubelet can read all the allocated mappings if it restarts

Can you please add that information to the doc - I think it's actually a useful context for people who are not that familiar with details like me.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, good call. Thanks!

I've kept this as a different commit, as I think it might be way simpler in this case to review as a separate commit. The commit title is: KEP-127: Clarify how IDs will be used and stored

keps/sig-node/127-user-namespaces/README.md Outdated Show resolved Hide resolved
keps/sig-node/127-user-namespaces/README.md Show resolved Hide resolved
keps/sig-node/127-user-namespaces/README.md Show resolved Hide resolved
keps/sig-node/127-user-namespaces/README.md Show resolved Hide resolved
keps/sig-node/127-user-namespaces/README.md Show resolved Hide resolved
keps/sig-node/127-user-namespaces/README.md Show resolved Hide resolved
@rata
Copy link
Member Author

rata commented Jun 8, 2022

@wojtek-t Thanks a lot for the quick and detailed review! I think I addressed all. PTAL (left some comments open that were either unresolved waiting for Sergey or thought it might make the re-review easier if those are more visible. Feel free to close them your self if you consider them solved).

@rata rata changed the title KEP-3317: Changes tracked for 1.25 KEP-3317: Mark as implementable (target phase I for 1.25) Jun 8, 2022
@rata rata changed the title KEP-3317: Mark as implementable (target phase I for 1.25) KEP-127: Mark as implementable (target phase I for 1.25) Jun 8, 2022
Copy link
Member

@SergeyKanzhelev SergeyKanzhelev left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 8, 2022
@wojtek-t
Copy link
Member

wojtek-t commented Jun 9, 2022

@rata - ok, I think it's good enough for Alpha (as I mentioned we will have more discussions for Beta, especially around monitoring and toubleshooting, but I think we're good for Alpha).

Please squash the commits and I will approve.

This adds the needed KEP metadata, CRI changes, etc.

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
Co-authored-by: Giuseppe Scrivano <gscrivan@redhat.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 9, 2022
@rata
Copy link
Member Author

rata commented Jun 9, 2022

@wojtek-t squashed now, thanks!

btw, for the next time, I think you can add the label tide/merge-method-squash and approve. We avoid the forced push, that removes @SergeyKanzhelev lgtm label, so we have to do that dance once more now. (of course, nothing important :))

@wojtek-t
Copy link
Member

wojtek-t commented Jun 9, 2022

/lgtm
/approve PRR

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 9, 2022
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dchen1107, mikebrow, rata, SergeyKanzhelev, wojtek-t

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 9, 2022
@k8s-ci-robot k8s-ci-robot merged commit 6c7accb into kubernetes:master Jun 9, 2022
@k8s-ci-robot k8s-ci-robot added this to the v1.25 milestone Jun 9, 2022
@rata rata deleted the rata/userns branch June 9, 2022 10:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. 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 lgtm "Looks good to me", indicates that a PR is ready to be merged. 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
Development

Successfully merging this pull request may close these issues.