Make pod-security-admission honor emulation version

This commit is contained in:
Jordan Liggitt
2025-07-28 16:53:23 -04:00
parent 7f4ee652ea
commit 4b0eeeb618
9 changed files with 115 additions and 20 deletions

View File

@@ -178,7 +178,7 @@ func GetRestrictedContainerSecurityContext() *v1.SecurityContext {
}
}
var psaEvaluator, _ = psapolicy.NewEvaluator(psapolicy.DefaultChecks())
var psaEvaluator, _ = psapolicy.NewEvaluator(psapolicy.DefaultChecks(), nil)
// MustMixinRestrictedPodSecurity makes the given pod compliant with the restricted pod security level.
// If doing so would overwrite existing non-conformant configuration, a test failure is triggered.