You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

82 lines
1.8 KiB

  1. ---
  2. apiVersion: policy/v1beta1
  3. kind: PodSecurityPolicy
  4. metadata:
  5. name: restricted
  6. annotations:
  7. seccomp.security.alpha.kubernetes.io/defaultProfileName: 'docker/default'
  8. seccomp.security.alpha.kubernetes.io/allowedProfileNames: 'docker/default'
  9. {% if apparmor_enabled %}
  10. apparmor.security.beta.kubernetes.io/defaultProfileName: 'runtime/default'
  11. apparmor.security.beta.kubernetes.io/allowedProfileNames: 'runtime/default'
  12. {% endif %}
  13. labels:
  14. kubernetes.io/cluster-service: 'true'
  15. addonmanager.kubernetes.io/mode: Reconcile
  16. spec:
  17. privileged: false
  18. allowPrivilegeEscalation: false
  19. requiredDropCapabilities:
  20. - ALL
  21. volumes:
  22. - 'configMap'
  23. - 'emptyDir'
  24. - 'projected'
  25. - 'secret'
  26. - 'downwardAPI'
  27. - 'persistentVolumeClaim'
  28. hostNetwork: false
  29. hostIPC: false
  30. hostPID: false
  31. runAsUser:
  32. rule: 'MustRunAsNonRoot'
  33. seLinux:
  34. rule: 'RunAsAny'
  35. supplementalGroups:
  36. rule: 'MustRunAs'
  37. ranges:
  38. - min: 1
  39. max: 65535
  40. fsGroup:
  41. rule: 'MustRunAs'
  42. ranges:
  43. - min: 1
  44. max: 65535
  45. readOnlyRootFilesystem: false
  46. forbiddenSysctls:
  47. - '*'
  48. ---
  49. apiVersion: policy/v1beta1
  50. kind: PodSecurityPolicy
  51. metadata:
  52. name: privileged
  53. annotations:
  54. seccomp.security.alpha.kubernetes.io/allowedProfileNames: '*'
  55. labels:
  56. kubernetes.io/cluster-service: "true"
  57. addonmanager.kubernetes.io/mode: Reconcile
  58. spec:
  59. privileged: true
  60. allowPrivilegeEscalation: true
  61. allowedCapabilities:
  62. - '*'
  63. volumes:
  64. - '*'
  65. hostNetwork: true
  66. hostPorts:
  67. - min: 0
  68. max: 65535
  69. hostIPC: true
  70. hostPID: true
  71. runAsUser:
  72. rule: 'RunAsAny'
  73. seLinux:
  74. rule: 'RunAsAny'
  75. supplementalGroups:
  76. rule: 'RunAsAny'
  77. fsGroup:
  78. rule: 'RunAsAny'
  79. readOnlyRootFilesystem: false
  80. # This will fail if allowed-unsafe-sysctls is not set accordingly in kubelet flags
  81. allowedUnsafeSysctls:
  82. - '*'