added restricted-hostpath scc
added role and binding for peanutflix for restricted-hostpath
This commit is contained in:
BIN
manifests/.DS_Store
vendored
BIN
manifests/.DS_Store
vendored
Binary file not shown.
12
manifests/scc/scc-restricted--hostpath-rolebinding.yaml
Normal file
12
manifests/scc/scc-restricted--hostpath-rolebinding.yaml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRoleBinding
|
||||||
|
metadata:
|
||||||
|
name: peanutflix-sa-restricted-hostpath
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: ClusterRole
|
||||||
|
name: system:openshift:scc:restricted-hostpath
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: peanutflix-sa
|
||||||
|
namespace: peanutflix
|
||||||
38
manifests/scc/scc-restricted-hostpath.yaml
Normal file
38
manifests/scc/scc-restricted-hostpath.yaml
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
apiVersion: security.openshift.io/v1
|
||||||
|
kind: SecurityContextConstraints
|
||||||
|
metadata:
|
||||||
|
name: restricted-hostpath
|
||||||
|
allowHostDirVolumePlugin: true # Needed for /dev/dri hostPath
|
||||||
|
allowHostIPC: false
|
||||||
|
allowHostNetwork: false
|
||||||
|
allowHostPID: false
|
||||||
|
allowHostPorts: false
|
||||||
|
allowPrivilegeEscalation: false
|
||||||
|
allowPrivilegedContainer: false
|
||||||
|
allowedCapabilities: null
|
||||||
|
defaultAddCapabilities: null
|
||||||
|
fsGroup:
|
||||||
|
type: MustRunAs
|
||||||
|
ranges:
|
||||||
|
- min: 1000
|
||||||
|
max: 2000
|
||||||
|
readOnlyRootFilesystem: false
|
||||||
|
requiredDropCapabilities:
|
||||||
|
- ALL
|
||||||
|
runAsUser:
|
||||||
|
type: MustRunAsRange
|
||||||
|
uidRangeMin: 1000
|
||||||
|
uidRangeMax: 2000
|
||||||
|
seLinuxContext:
|
||||||
|
type: MustRunAs
|
||||||
|
supplementalGroups:
|
||||||
|
type: RunAsAny
|
||||||
|
volumes:
|
||||||
|
- configMap
|
||||||
|
- downwardAPI
|
||||||
|
- emptyDir
|
||||||
|
- hostPath # This is what distinguishes it from restricted-s6
|
||||||
|
- persistentVolumeClaim
|
||||||
|
- projected
|
||||||
|
- secret
|
||||||
|
priority: 6 # Higher than restricted-s6 (5) due to hostPath access
|
||||||
Reference in New Issue
Block a user