Guest User

Untitled

a guest
Aug 16th, 2018
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.42 KB | None | 0 0
  1. apiVersion: policy/v1beta1
  2. kind: PodSecurityPolicy
  3. metadata:
  4. name: restricted
  5. annotations:
  6. seccomp.security.alpha.kubernetes.io/allowedProfileNames: 'docker/default'
  7. apparmor.security.beta.kubernetes.io/allowedProfileNames: 'runtime/default'
  8. seccomp.security.alpha.kubernetes.io/defaultProfileName: 'docker/default'
  9. apparmor.security.beta.kubernetes.io/defaultProfileName: 'runtime/default'
  10. spec:
  11. privileged: false
  12. # Required to prevent escalations to root.
  13. allowPrivilegeEscalation: false
  14. # This is redundant with non-root + disallow privilege escalation,
  15. # but we can provide it for defense in depth.
  16. requiredDropCapabilities:
  17. - ALL
  18. # Allow core volume types.
  19. volumes:
  20. - 'configMap'
  21. - 'emptyDir'
  22. - 'projected'
  23. - 'secret'
  24. - 'downwardAPI'
  25. # Assume that persistentVolumes set up by the cluster admin are safe to use.
  26. - 'persistentVolumeClaim'
  27. hostNetwork: false
  28. hostIPC: false
  29. hostPID: false
  30. runAsUser:
  31. # Require the container to run without root privileges.
  32. rule: 'MustRunAsNonRoot'
  33. seLinux:
  34. # This policy assumes the nodes are using AppArmor rather than SELinux.
  35. rule: 'RunAsAny'
  36. supplementalGroups:
  37. rule: 'MustRunAs'
  38. ranges:
  39. # Forbid adding the root group.
  40. - min: 1
  41. max: 65535
  42. fsGroup:
  43. rule: 'MustRunAs'
  44. ranges:
  45. # Forbid adding the root group.
  46. - min: 1
  47. max: 65535
  48. readOnlyRootFilesystem: false
Add Comment
Please, Sign In to add comment