chore: remove cgroupnsMode setting from K3s container configuration#3653
Conversation
✅ Deploy Preview for testcontainers-go ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
💤 Files with no reviewable changes (1)
Summary by CodeRabbit
WalkthroughRemoved the forced Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
mdelapenya
left a comment
There was a problem hiding this comment.
Hi @lixin9311 this LGTM, thanks for the fix!
As soon as the CI pass, we'll merge this one
| testcontainers.WithExposedPorts(defaultKubeSecurePort, defaultRancherWebhookPort), | ||
| testcontainers.WithHostConfigModifier(func(hc *container.HostConfig) { | ||
| hc.Privileged = true | ||
| hc.CgroupnsMode = "host" |
There was a problem hiding this comment.
it's fine to remove it. In case somebody wants to re-add it, they can build their own HostConfigModifier
What does this PR do?
Remove
cgroupnsModesetting from K3s container configurationWhy is it important?
It mirrors the official k3s documentation about running in Docker:
https://docs.k3s.io/advanced#running-k3s-in-docker
My local dev machine is a MacBook Apple Silicon running OrbStack. With
--cgroupns host, Linux VM development environments (especially when memory ballooning is enabled) Pods will experienceSandboxChanged Pod sandbox changed, it will be killed and re-created.issue, and they will never become ready.PoC, use OrbStack if you start k3s with host cgroupns, get in the k3s docker, check pods, they will never become ready:
OrbStack features memory ballooning; I presume the ballooning hack kinda interferes with kubelet.
I have to use a workaround.
k3s docker can handle
cgroupns=privatewell, k3d also uses the default containerd cgroupns setting.Related issues