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:
parent
796fd6201f
commit
d9023217fc
1 changed files with 150 additions and 9 deletions
|
|
@ -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
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue