Skip to content

Commit

Permalink
core: fix openshift security context
Browse files Browse the repository at this point in the history
The MKNOD capability was missing and due to recent addition some pod now
only require this cap as well as privileged.
The cap must be explicitly exposed so it can be requested by a pod.

Closes: #9234
Signed-off-by: Sébastien Han <seb@redhat.com>
  • Loading branch information
leseb committed Nov 24, 2021
1 parent 12638cb commit b38f430
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cluster/examples/kubernetes/ceph/operator-openshift.yaml
Expand Up @@ -18,7 +18,7 @@ allowHostNetwork: false
# set to true if running rook with the provider as host
allowHostPorts: false
priority:
allowedCapabilities: []
allowedCapabilities: ["MKNOD"]
allowHostIPC: true
readOnlyRootFilesystem: false
requiredDropCapabilities: []
Expand Down
1 change: 1 addition & 0 deletions pkg/apis/ceph.rook.io/v1/scc.go
Expand Up @@ -42,6 +42,7 @@ func NewSecurityContextConstraints(name, namespace string) *secv1.SecurityContex
AllowHostIPC: true,
AllowHostNetwork: false,
AllowHostPorts: false,
AllowedCapabilities: []corev1.Capability{"MKNOD"},
RequiredDropCapabilities: []corev1.Capability{},
DefaultAddCapabilities: []corev1.Capability{},
RunAsUser: secv1.RunAsUserStrategyOptions{
Expand Down

0 comments on commit b38f430

Please sign in to comment.