-
Notifications
You must be signed in to change notification settings - Fork 40.1k
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
Add kubelet SeccompDefault
alpha feature
#101943
Conversation
SeccompDefault
alpha feature
/triage accepted |
looking at the PRR, it is unclear to me how an operator would detect that enabling this caused an issue
can you clarify how a cluster operator would know if this was causing problems? |
Pods which previously run successfully would now get some syscalls blocked they either need for startup of the workload or a single feature. This means that in the worst case the pod gets stuck in a crash loop or encounter degraded functionality. So a cluster operator would see restarting containers, while the logs would indicate something like "operation not permitted". A good pre-check would be to run an e2e test suite for the application with the runtime default profile if the application was running unconfined before. |
Detecting when a crash is due to this requires application-specific knowledge, right? I don't see a way for a cluster operator to detect this generically.
That is a good idea for the application owner, but the application owner and cluster operator are often two different entities. |
The only way to get a hint to it is when toggling the feature toggles crashing pods on a node.
Agreed, mixed up the roles in my mind. |
We definitely have to update the KEP reflecting the flag. I think together with that I can also add a rollout plan. 🙂 |
KEP update PR in kubernetes/enhancements#2773 |
The KEP update PR got merged, which means this is now ready for review. @liggitt @kubernetes/sig-node-pr-reviews please take a look again |
config API and cli bits lgtm (one nit on documenting the feature gate requirement) |
tag me once the functional bits of this have approval and I can add approve for the config API |
This adds the gate `SeccompDefault` as new alpha feature. Seccomp path and field fallbacks are now passed to the helper functions, whereas unit tests covering those code paths have been added as well. Beside enabling the feature gate, the feature has to be enabled by the `SeccompDefault` kubelet configuration or its corresponding `--seccomp-default` CLI flag. Signed-off-by: Sascha Grunert <sgrunert@redhat.com> Apply suggestions from code review Co-authored-by: Paulo Gomes <pjbgf@linux.com> Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
5e739fa
to
8b7003a
Compare
Pinging for approval:
|
/test pull-kubernetes-e2e-gce-ubuntu-containerd |
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: liggitt, mrunalp, saschagrunert 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 |
/test pull-kubernetes-e2e-gce-ubuntu-containerd |
What type of PR is this?
/kind feature
What this PR does / why we need it:
This adds the gate
SeccompDefault
as new alpha feature. Seccomp path and field fallbacks are now passed to the helper functions, whereas unit tests covering those code paths have been added as well.Which issue(s) this PR fixes:
Refers to kubernetes/enhancements#2413
Special notes for your reviewer:
The functions
fieldProfile
andfieldSeccompProfile
usually never receive scmpsmp *v1.SeccompProfile == nil
. I decided to not cleanup those paths for security reasons.Beside enabling the feature gate, the feature has to be enabled by the
SeccompDefault
kubelet configuration or its corresponding--seccomp-default
CLI flag.Another thing to mention is that the feature does not change the API at all. This means that people using the feature will not get a modified
SecurityContext
if they do not specify anything within it.Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: