k8spspseccomp
Basic Information
Function
This policy restricts the seccomp.security.alpha.kubernetes.io/allowedProfileNames annotation in PodSecurityPolicy.
Policy Example
The following policy instance shows the types of resources for which the policy definition takes effect. allowedProfiles in parameters defines the allowed annotations.
apiVersion: constraints.gatekeeper.sh/v1beta1 kind: K8sPSPSeccomp metadata: name: psp-seccomp spec: match: kinds: - apiGroups: [""] kinds: ["Pod"] parameters: allowedProfiles: - runtime/default - docker/default
Resource Definition That Complies with the Policy
In the example, the value of the container.seccomp.security.alpha.kubernetes.io/nginx annotation is in the specified value list and complies with the policy definition.
apiVersion: v1 kind: Pod metadata: name: nginx-seccomp-allowed annotations: container.seccomp.security.alpha.kubernetes.io/nginx: runtime/default labels: app: nginx-seccomp spec: containers: - name: nginx image: nginx
Resource Definition That Does Not Comply with the Policy
In the example, the value of the container.seccomp.security.alpha.kubernetes.io/nginx annotation is not in the configured value list and does not comply with the policy definition.
apiVersion: v1 kind: Pod metadata: name: nginx-seccomp-disallowed annotations: container.seccomp.security.alpha.kubernetes.io/nginx: unconfined labels: app: nginx-seccomp spec: containers: - name: nginx image: nginx
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot