-
Bug
-
Resolution: Obsolete
-
Major
-
None
-
4.8.z
-
Important
-
None
-
Rejected
-
False
-
Description of problem:
Deployment that specify seccomp profile at security context level is not able to identify the correct scc, even if it's created.
Version-Release number of selected component (if applicable):
4.8.x, 4.10.x
How reproducible:
Steps to Reproduce:
- create a scc with the required capabilities - create the sa - role binding the sa with the scc - create the deployment Required Security Capabilities are: ~~~ serviceAccountName: hellosa securityContext: allowPrivilegeEscalation: false capabilities: drop: ALL privileged: false readOnlyRootFilesystem: false runAsNonRoot: true seccompProfile: type: RuntimeDefault ~~~
Actual results:
Error even reported :
Error creating: pods "hello-6967cf9864-h4kc8" is forbidden: unable to validate against any security context constraint: [pod.metadata.annotations.seccomp.security.alpha.kubernetes.io/pod: *Forbidden: seccomp may not be set pod.metadata.annotations.container.seccomp.security.alpha.kubernetes.io/ubi-minimal*: Forbidden: seccomp may not be set provider "anyuid": Forbidden: not usable by user or serviceaccount pod.metadata.annotations.seccomp.security.alpha.kubernetes.io/pod: Forbidden: seccomp may not be set pod.metadata.annotations.container.seccomp.security.alpha.kubernetes.io/ubi-minimal: Forbidden: seccomp may not be set provider "nonroot": Forbidden: not usable by user or serviceaccount provider "hostmount-anyuid": Forbidden: not usable by user or serviceaccount provider "machine-api-termination-handler": Forbidden: not usable by user or serviceaccount provider "hostnetwork": Forbidden: not usable by user or serviceaccount provider "hostaccess": Forbidden: not usable by user or serviceaccount provider "node-exporter": Forbidden: not usable by user or serviceaccount provider "privileged": Forbidden: not usable by user or serviceaccount]
Expected results:
Correct deploy of the workload
Additional info:
Bug has been opened to verify the correct way to configure the scc for this kind of workload