-
Notifications
You must be signed in to change notification settings - Fork 594
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
feat: follow KEP-2568 non-root enhancements #5917
Conversation
/ok-to-test |
So regarding my question in the PR description: Everything still works in QEMU when i add
As it is part of the KEP-2568, should I add it? I am asking as there is already an issue regarding this for all containers: #5293 and I am not sure if there is something on the OS level that still needs to be done, or why the issue is hold back... |
I'll be looking into adding the seccomp support this week and see if there's anything extra needed. |
I guess you can add it, since kubelet will not enforce it as long as the feature-gate/cli flags are set, so I think it's okay to do this in this PR |
done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks!
yep, --preserve
is fine as all the mounted files are created on tmpfs
anyways, so they are thrown away with reboot.
KEP-2568: https://github.com/kubernetes/enhancements/tree/master/keps/sig-cluster-lifecycle/kubeadm/2568-kubeadm-non-root-control-plane Deviation: - example sets UID/GID in container context, its safer to do this in pod context Signed-off-by: Nico Berlee <[email protected]> Signed-off-by: Andrey Smirnov <[email protected]>
/m |
Pull Request
WIP: works for new clusters, haven't tested upgrades (likely this breaks because of existing file permissions...?)EDIT: tested and it just works, even with --preserve files are recreated with correct permission
Question: Should I include the seccomp yaml for the control-plane?What? (description)
Follow KEP-2568 (https://github.com/kubernetes/enhancements/tree/master/keps/sig-cluster-lifecycle/kubeadm/2568-kubeadm-non-root-control-plane). Seperation UIDs, Adding GIDs, allowPriviledgeEscalation: false,drop unneeded capabilities and add seccomp CP manifest changes.
Seccomp is excluded as i think it has a dependency on #5293 ? Also I have no idea how to test that.Why? (reasoning)
Mainly better compatibility (this KEP is scheduled to be implented for kubeadm 1.25) + security:
allowPrivilegeEscalation: false
: adds no_new_privs flag on the container processCapabilities: { Drop: [ "ALL" ] }
: Capabilities are a more fine-grained permissions model, and all capabilities should be dropped from a pod, with only those required added back. (NET_BIND_SERVICE is needed for kube-apiserver as it has setcap flags)RunAsUser
&RunAsGroup
: Assigning an unique ID helps with limiting the file exposure of secretsAcceptance
Please use the following checklist:
make conformance
) (GPG identity fails)make fmt
)make lint
)make docs
)make unit-tests
)