From 03f84c746fbe18e870afdd31d3dd6c9c1e6abc77 Mon Sep 17 00:00:00 2001 From: Fabien Boucher Date: Fri, 27 Oct 2023 10:30:23 +0000 Subject: [PATCH] container - security context - set the RuntimeDefault for Seccomp profile KubeAPIWarningLogger would violate PodSecurity "restricted:latest": seccompProfile (pod or container "mariadb-client" must set securityContext.seccompProfile.type to "RuntimeDefault" or "Localhost") Change-Id: I52291c790dfdd08a928b7425fa525ce28482ee9b --- controllers/libs/base/base.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/controllers/libs/base/base.go b/controllers/libs/base/base.go index e6110c85..2c79637f 100644 --- a/controllers/libs/base/base.go +++ b/controllers/libs/base/base.go @@ -36,6 +36,9 @@ func MkSecurityContext(privileged bool) *apiv1.SecurityContext { "ALL", }, }, + SeccompProfile: &apiv1.SeccompProfile{ + Type: apiv1.SeccompProfileTypeRuntimeDefault, + }, } }