apiVersion : kyverno.io/v1
kind: ClusterPolicy
metadata:
  name: validate-volumes-whitelist
spec:
  validationFailureAction: "audit"
  rules:
  - name: validate-volumes-whitelist
    match:
      resources:
        kinds:
        - Pod
    validate:
      message: "Volumes white list"
      anyPattern:
      - spec:
          volumes:
          - hostPath: "*"
      - spec:
          volumes:
          - emptyDir: "*"
      - spec:
          volumes:
          - configMap: "*"




