Add meta-comments to manifests to allow basic templating via `sed`. Add the following types of meta-comments: - # namespace:X - A basic namespace - replace the field with a namespace for X - # serviceaccount:namespace:X - A service account namespace for SCC - e.g., "system:serviceaccount:<ns>:rook-ceph-system" - Replace the namespace "<ns>" with with a namespace for X - # provisioner:namespace:X - A provisioner identifier with namespace prefix - e.g., "<ns>.cephfs.csi.ceph.com" - e.g., "<ns>.ceph.rook.io/bucket" - Replace the namespace "<ns>" with a namespace for X Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
82 lines
2.5 KiB
YAML
82 lines
2.5 KiB
YAML
# scc for the Rook and Ceph daemons
|
|
kind: SecurityContextConstraints
|
|
apiVersion: security.openshift.io/v1
|
|
metadata:
|
|
name: rook-ceph
|
|
allowPrivilegedContainer: true
|
|
allowHostNetwork: true
|
|
allowHostDirVolumePlugin: true
|
|
priority:
|
|
allowedCapabilities: []
|
|
allowHostPorts: true
|
|
allowHostPID: true
|
|
allowHostIPC: true
|
|
readOnlyRootFilesystem: false
|
|
requiredDropCapabilities: []
|
|
defaultAddCapabilities: []
|
|
runAsUser:
|
|
type: RunAsAny
|
|
seLinuxContext:
|
|
type: MustRunAs
|
|
fsGroup:
|
|
type: MustRunAs
|
|
supplementalGroups:
|
|
type: RunAsAny
|
|
allowedFlexVolumes:
|
|
- driver: "ceph.rook.io/rook"
|
|
- driver: "ceph.rook.io/rook-ceph"
|
|
volumes:
|
|
- configMap
|
|
- downwardAPI
|
|
- emptyDir
|
|
- flexVolume
|
|
- hostPath
|
|
- persistentVolumeClaim
|
|
- projected
|
|
- secret
|
|
users:
|
|
# A user needs to be added for each rook service account.
|
|
# This assumes running in the default sample "rook-ceph" namespace.
|
|
# If other namespaces or service accounts are configured, they need to be updated here.
|
|
- system:serviceaccount:rook-ceph:rook-ceph-system # serviceaccount:namespace:operator
|
|
- system:serviceaccount:rook-ceph:default # serviceaccount:namespace:cluster
|
|
- system:serviceaccount:rook-ceph:rook-ceph-mgr # serviceaccount:namespace:cluster
|
|
- system:serviceaccount:rook-ceph:rook-ceph-osd # serviceaccount:namespace:cluster
|
|
---
|
|
# scc for the CSI driver
|
|
kind: SecurityContextConstraints
|
|
apiVersion: security.openshift.io/v1
|
|
metadata:
|
|
name: rook-ceph-csi
|
|
allowPrivilegedContainer: true
|
|
allowHostNetwork: true
|
|
allowHostDirVolumePlugin: true
|
|
priority:
|
|
allowedCapabilities: ['*']
|
|
allowHostPorts: true
|
|
allowHostPID: true
|
|
allowHostIPC: true
|
|
readOnlyRootFilesystem: false
|
|
requiredDropCapabilities: []
|
|
defaultAddCapabilities: []
|
|
runAsUser:
|
|
type: RunAsAny
|
|
seLinuxContext:
|
|
type: RunAsAny
|
|
fsGroup:
|
|
type: RunAsAny
|
|
supplementalGroups:
|
|
type: RunAsAny
|
|
allowedFlexVolumes:
|
|
- driver: "ceph.rook.io/rook"
|
|
- driver: "ceph.rook.io/rook-ceph"
|
|
volumes: ['*']
|
|
users:
|
|
# A user needs to be added for each rook service account.
|
|
# This assumes running in the default sample "rook-ceph" namespace.
|
|
# If other namespaces or service accounts are configured, they need to be updated here.
|
|
- system:serviceaccount:rook-ceph:rook-csi-rbd-plugin-sa # serviceaccount:namespace:operator
|
|
- system:serviceaccount:rook-ceph:rook-csi-rbd-provisioner-sa # serviceaccount:namespace:operator
|
|
- system:serviceaccount:rook-ceph:rook-csi-cephfs-plugin-sa # serviceaccount:namespace:operator
|
|
- system:serviceaccount:rook-ceph:rook-csi-cephfs-provisioner-sa # serviceaccount:namespace:operator
|