Skip to content

Instantly share code, notes, and snippets.

@DanyC97
Created May 23, 2018 21:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DanyC97/56070e3f1523e31c1ad96980df6d7fe5 to your computer and use it in GitHub Desktop.
Save DanyC97/56070e3f1523e31c1ad96980df6d7fe5 to your computer and use it in GitHub Desktop.
apiVersion: v1
kind: ServiceAccount
metadata:
name: foo-sa
namespace: foo
---
kind: SecurityContextConstraints
apiVersion: v1
metadata:
annotations:
kubernetes.io/description: FOO restricted SCC with hostPath volume enabled
name: foo-scc-restricted
priority: null
defaultAddCapabilities: null
allowHostIPC: false
allowHostNetwork: false
allowHostPID: false
allowHostPorts: false
allowPrivilegedContainer: false
allowedCapabilities: null
allowHostDirVolumePlugin: true
allowedFlexVolumes: null
readOnlyRootFilesystem: false
requiredDropCapabilities:
- KILL
- MKNOD
- SYS_CHROOT
runAsUser:
type: RunAsAny
seLinuxContext:
type: MustRunAs
supplementalGroups:
type: RunAsAny
fsGroup:
type: MustRunAs
users:
- system:serviceaccount:foo:foo-sa
groups:
- system:authenticated
volumes:
- configMap
- emptyDir
- hostPath
- persistentVolumeClaim
- secret
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment