Hide Forgot
Description of problem: Seccomp runtime/default does not work Version-Release number of selected component (if applicable): openshift v3.4.0.18+ada983f kubernetes v1.4.0+776c994 etcd 3.1.0-rc.0 How reproducible: Always Steps to Reproduce: 1. configure the restricted SCC with: seccompProfiles: - runtime/default 2. oc login with normal user 3. create a pod oc create -f pod-sec-pod-default.yaml cat pod-sec-pod-default.yaml apiVersion: v1 kind: Pod metadata: labels: name: pod-seccomp name: pod-seccomp-dafault-pod annotations: seccomp.security.alpha.kubernetes.io/pod: runtime/default spec: containers: - image: "docker.io/deshuai/hello-pod:latest" imagePullPolicy: IfNotPresent name: hello-pod ports: - containerPort: 8080 protocol: TCP resources: {} securityContext: capabilities: {} privileged: false terminationMessagePath: /dev/termination-log volumeMounts: - mountPath: /tmp name: tmp dnsPolicy: ClusterFirst restartPolicy: Always serviceAccount: "" volumes: - emptyDir: {} name: tmp status: {} Actual results: [root@dhcp-128-70 seccomp]# oc create -f pod-sec-pod-default.yaml The Pod "pod-seccomp-dafault-pod" is invalid: metadata.annotations.seccomp.security.alpha.kubernetes.io/pod: Invalid value: "runtime/default": must be a valid seccomp profile Expected results: pod created and default seccomp profile applied. Additional info: if docker/default used, it works. Ref docs: https://docs.openshift.org/latest/admin_guide/seccomp.html
I'm assuming that the text string of "runtime" is meant to be replaced by the particular container engine in use. https://github.com/kubernetes/kubernetes/blob/59caf07228231c7c78aae66f9c1ad60e2c42fc29/pkg/api/validation/validation.go#L2122 Or is it? https://github.com/kubernetes/kubernetes/blob/59caf07228231c7c78aae66f9c1ad60e2c42fc29/pkg/security/apparmor/helpers.go#L35
update to the docs to point to docker/default which is what is being used in the validation. https://github.com/openshift/openshift-docs/pull/3150
Complementary kubernetes PR: https://github.com/kubernetes/kubernetes/pull/36086 (Closing as "not a bug" since it wasn't a coding issue.)
need verify this when doc PR merged.
This finally merged just now here: https://github.com/kubernetes/community/pull/390
Verified with latest oc, openshift v3.5.0.52. Now the actual behaviour and on-line doc are consistent. "docker/default" is default instead of "runtime/default". Fixed.
Updates are now published: https://access.redhat.com/documentation/en-us/openshift_container_platform/3.4/html/cluster_administration/admin-guide-seccomp#seccomp-configuring-openshift-for-seccomp