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.

86 lines
2.0 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. {% if kube_version is version('v1.12.1', '>=') %}
  47. forbiddenSysctls:
  48. - '*'
  49. {% endif %}
  50. ---
  51. apiVersion: policy/v1beta1
  52. kind: PodSecurityPolicy
  53. metadata:
  54. name: privileged
  55. annotations:
  56. seccomp.security.alpha.kubernetes.io/allowedProfileNames: '*'
  57. labels:
  58. kubernetes.io/cluster-service: "true"
  59. addonmanager.kubernetes.io/mode: Reconcile
  60. spec:
  61. privileged: true
  62. allowPrivilegeEscalation: true
  63. allowedCapabilities:
  64. - '*'
  65. volumes:
  66. - '*'
  67. hostNetwork: true
  68. hostPorts:
  69. - min: 0
  70. max: 65535
  71. hostIPC: true
  72. hostPID: true
  73. runAsUser:
  74. rule: 'RunAsAny'
  75. seLinux:
  76. rule: 'RunAsAny'
  77. supplementalGroups:
  78. rule: 'RunAsAny'
  79. fsGroup:
  80. rule: 'RunAsAny'
  81. readOnlyRootFilesystem: false
  82. {% if kube_version is version('v1.12.1', '>=') %}
  83. # This will fail if allowed-unsafe-sysctls is not set accordingly in kubelet flags
  84. allowedUnsafeSysctls:
  85. - '*'
  86. {% endif %}