unprivileged-addon.yaml 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. apiVersion: policy/v1beta1
  2. kind: PodSecurityPolicy
  3. metadata:
  4. name: gce.unprivileged-addon
  5. annotations:
  6. kubernetes.io/description: 'This policy grants the minimum amount of
  7. privilege necessary to run non-privileged kube-system pods. This policy is
  8. not intended for use outside of kube-system, and may include further
  9. restrictions in the future.'
  10. seccomp.security.alpha.kubernetes.io/defaultProfileName: 'docker/default'
  11. seccomp.security.alpha.kubernetes.io/allowedProfileNames: 'runtime/default,docker/default'
  12. # 'runtime/default' is already the default, but must be filled in on the
  13. # pod to pass admission.
  14. apparmor.security.beta.kubernetes.io/defaultProfileName: 'runtime/default'
  15. apparmor.security.beta.kubernetes.io/allowedProfileNames: 'runtime/default'
  16. labels:
  17. kubernetes.io/cluster-service: 'true'
  18. addonmanager.kubernetes.io/mode: Reconcile
  19. spec:
  20. privileged: false
  21. allowPrivilegeEscalation: false
  22. # The docker default set of capabilities
  23. allowedCapabilities:
  24. - SETPCAP
  25. - MKNOD
  26. - AUDIT_WRITE
  27. - CHOWN
  28. - NET_RAW
  29. - DAC_OVERRIDE
  30. - FOWNER
  31. - FSETID
  32. - KILL
  33. - SETGID
  34. - SETUID
  35. - NET_BIND_SERVICE
  36. - SYS_CHROOT
  37. - SETFCAP
  38. volumes:
  39. - 'emptyDir'
  40. - 'configMap'
  41. - 'secret'
  42. - 'projected'
  43. hostNetwork: false
  44. hostIPC: false
  45. hostPID: false
  46. # TODO: The addons using this profile should not run as root.
  47. runAsUser:
  48. rule: 'RunAsAny'
  49. seLinux:
  50. rule: 'RunAsAny'
  51. supplementalGroups:
  52. rule: 'RunAsAny'
  53. fsGroup:
  54. rule: 'RunAsAny'
  55. readOnlyRootFilesystem: false