From 2f6205b2f64bc8ec4b860f78c1ff0ae0c8637eb3 Mon Sep 17 00:00:00 2001 From: Suraj Deshmukh Date: Wed, 15 Apr 2020 16:25:45 +0530 Subject: [PATCH] PSP: Add seccomp annotations This commit adds seccomp annotations to the PSP shipped with Rook Operator. In this way the operator when deployed will be more secure and will only be allowed the syscalls defined the runtime's seccomp profile. Signed-off-by: Suraj Deshmukh --- cluster/charts/rook-ceph/templates/psp.yaml | 3 +++ cluster/examples/kubernetes/ceph/common.yaml | 3 +++ tests/framework/installer/ceph_manifests.go | 3 +++ 3 files changed, 9 insertions(+) diff --git a/cluster/charts/rook-ceph/templates/psp.yaml b/cluster/charts/rook-ceph/templates/psp.yaml index 45142b9f3..311c5f5d1 100644 --- a/cluster/charts/rook-ceph/templates/psp.yaml +++ b/cluster/charts/rook-ceph/templates/psp.yaml @@ -15,6 +15,9 @@ apiVersion: policy/v1beta1 kind: PodSecurityPolicy metadata: name: 00-rook-ceph-operator + annotations: + seccomp.security.alpha.kubernetes.io/allowedProfileNames: 'runtime/default' + seccomp.security.alpha.kubernetes.io/defaultProfileName: 'runtime/default' spec: privileged: true allowedCapabilities: diff --git a/cluster/examples/kubernetes/ceph/common.yaml b/cluster/examples/kubernetes/ceph/common.yaml index 37817d0ce..f5f0aaba1 100644 --- a/cluster/examples/kubernetes/ceph/common.yaml +++ b/cluster/examples/kubernetes/ceph/common.yaml @@ -1251,6 +1251,9 @@ apiVersion: policy/v1beta1 kind: PodSecurityPolicy metadata: name: rook-privileged + annotations: + seccomp.security.alpha.kubernetes.io/allowedProfileNames: 'runtime/default' + seccomp.security.alpha.kubernetes.io/defaultProfileName: 'runtime/default' spec: privileged: true allowedCapabilities: diff --git a/tests/framework/installer/ceph_manifests.go b/tests/framework/installer/ceph_manifests.go index 50a8338f3..5a25163bb 100644 --- a/tests/framework/installer/ceph_manifests.go +++ b/tests/framework/installer/ceph_manifests.go @@ -1388,6 +1388,9 @@ apiVersion: policy/v1beta1 kind: PodSecurityPolicy metadata: name: rook-privileged + annotations: + seccomp.security.alpha.kubernetes.io/allowedProfileNames: 'runtime/default' + seccomp.security.alpha.kubernetes.io/defaultProfileName: 'runtime/default' spec: privileged: true allowedCapabilities: