apiVersion: policy/v1beta1
kind: PodSecurityPolicy
metadata:
  name: ${KUBEDB_OPERATOR_NAME}
  labels:
    app: kubedb
spec:
  privileged: true  #Allowing privileged pods is necessary for ES db only!
  allowPrivilegeEscalation: true #Allowing privilege escalation is necessary for ES db only!
  volumes:
  - '*'
  hostNetwork: false
  hostIPC: false
  hostPID: false
  runAsUser:
    rule: RunAsAny
  seLinux:
    rule: RunAsAny
  supplementalGroups:
    rule: RunAsAny
  fsGroup:
    rule: RunAsAny
  allowedCapabilities:
  - IPC_LOCK
  - SYS_RESOURCE
