-
-
Save developer-guy/4dd08831833bdb1d0bb816e555e9525d to your computer and use it in GitHub Desktop.
A restricted pod security policy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: policy/v1beta1 | |
kind: PodSecurityPolicy | |
metadata: | |
name: my-restricted-psp | |
spec: | |
privileged: false | |
# Required to prevent escalations to root. | |
allowPrivilegeEscalation: false | |
# Allow core volume types. | |
volumes: | |
- 'configMap' | |
- 'emptyDir' | |
- 'projected' | |
- 'secret' | |
- 'downwardAPI' | |
- 'nfs' | |
- 'persistentVolumeClaim' | |
- 'awsElasticBlockStore' | |
hostNetwork: false | |
hostIPC: false | |
hostPID: false | |
runAsUser: | |
# Require the container to run without root privileges. | |
rule: 'RunAsAny' | |
seLinux: | |
# This policy assumes the nodes are using AppArmor rather than SELinux. | |
rule: 'RunAsAny' | |
supplementalGroups: | |
rule: 'MustRunAs' | |
ranges: | |
# Forbid adding the root group. | |
- min: 1 | |
max: 65535 | |
fsGroup: | |
rule: 'MustRunAs' | |
ranges: | |
# Forbid adding the root group. | |
- min: 1 | |
max: 65535 | |
readOnlyRootFilesystem: false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment