volcano.sh/volcano@v1.9.0/example/invalid_jobs/duplicatedPolicyEvent-webhook-deny.yaml (about)

     1  apiVersion: batch.volcano.sh/v1alpha1
     2  kind: Job
     3  metadata:
     4    name: test-job-webhook-disallow
     5  spec:
     6    schedulerName: volcano
     7    minAvailable: 1
     8    tasks:
     9      - replicas: 2
    10        name: task-1
    11        template:
    12          metadata:
    13            name: web-1
    14          spec:
    15            containers:
    16              - image: nginx
    17                imagePullPolicy: IfNotPresent
    18                name: nginx
    19                resources:
    20                  requests:
    21                    cpu: "1"
    22            restartPolicy: OnFailure
    23    policies:
    24      - event: PodFailed
    25        action: RestartJob
    26      - event: PodFailed  ## this job will be rejected because one event should not have different action
    27        action: AbortJob