Watch
0
0
Fork
You've already forked hyperhive
0

k8s: the hyperhive namespace enforces pod security restricted

No pod in the namespace has a hostPort any more, and the census found nothing else that restricted refuses. The namespace now carries the restricted level for enforce, warn and audit, so the API server refuses a pod that drifts. The bao-login test's probe pods get the container security context restricted asks for. The controller switch test shows the API server admitting a compliant pod and refusing the same pod with a host port, a kept capability or privilege.
This commit is contained in:
atlas 2026-11-23 19:32:16 +01:00 • committed by mara
commit d9023217fc

View file

@ -103,6 +103,10 @@ pkgs.testers.runNixOSTest {
"sleep"
"3600"
];
# The namespace enforces Pod Security `restricted`, which asks the
# container for these: the pod-level settings alone leave it able to
# escalate and to keep capabilities.
inherit (lib.head podSpec.containers) securityContext;
volumeMounts = [
tokenMount
{