apiVersion: batch.volcano.sh/v1alpha1
kind: Job
metadata:
  name: test-job-webhook-disallow
spec:
  schedulerName: volcano
  minAvailable: 1
  tasks:
    - replicas: 2
      name: task-1
      template:
        metadata:
          name: web-1
        spec:
          containers:
            - image: nginx
              imagePullPolicy: IfNotPresent
              name: nginx
              resources:
                requests:
                  cpu: "1"
          restartPolicy: OnFailure
  policies:
    - event: PodFailed
      action: RestartJob
    - event: PodFailed  ## this job will be rejected because one event should not have different action
      action: AbortJob
