Skip to content

Instantly share code, notes, and snippets.

@tallclair
Created November 22, 2019 20:21
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save tallclair/bfbea783d6c0aff2d481f74dce538079 to your computer and use it in GitHub Desktop.
Save tallclair/bfbea783d6c0aff2d481f74dce538079 to your computer and use it in GitHub Desktop.
Default PSP profile
apiVersion: policy/v1beta1
kind: PodSecurityPolicy
metadata:
name: default
annotations:
apparmor.security.beta.kubernetes.io/allowedProfileNames: 'runtime/default'
apparmor.security.beta.kubernetes.io/defaultProfileName: 'runtime/default'
spec:
privileged: false
# Maybe allow all volumes except hostPath
volumes:
- 'configMap'
- 'emptyDir'
- 'projected'
- 'secret'
- 'downwardAPI'
# Assume that persistentVolumes set up by the cluster admin are safe to use.
- 'persistentVolumeClaim'
hostNetwork: false
hostIPC: false
hostPID: false
seLinux:
# This policy assumes the nodes are using AppArmor rather than SELinux.
rule: 'RunAsAny'
readOnlyRootFilesystem: false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment