apiVersion: policy/v1beta1
kind: PodSecurityPolicy
metadata:
  name: ingress-nginx-tmp
spec:
  allowedCapabilities:
    - NET_BIND_SERVICE
  privileged: false
  allowPrivilegeEscalation: true
  # Allow core volume types.
  volumes:
    - 'configMap'
    #- 'emptyDir'
    #- 'projected'
    - 'secret'
    #- 'downwardAPI'
  hostNetwork: true
  hostPorts:
  # http
  - min: 80
    max: 80
  # https
  - min: 443
    max: 443
  # metrics
  - min: 10254
    max: 10254
  # admission webhooks
  - min: 8443
    max: 8443
  hostIPC: false
  hostPID: false
  runAsUser:
    # Require the container to run without root privileges.
    rule: 'MustRunAsNonRoot'
  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
  seLinux:
    rule: 'RunAsAny'
