volcano.sh/volcano@v1.9.0/example/job-plugin.yaml (about)

     1  apiVersion: batch.volcano.sh/v1alpha1
     2  kind: Job
     3  metadata:
     4    name: test-job-plugin
     5  spec:
     6    minAvailable: 3
     7    schedulerName: volcano
     8    policies:
     9      - event: PodEvicted
    10        action: RestartJob
    11    plugins:
    12      # Add env to each container(VK_TASK_INDEX & VC_TASK_INDEX)
    13      env: []
    14      # Support ssh-free authentication
    15      # :param ssh-key-file-path: The path used to store ssh private and public keys(`/root/.ssh` by default)
    16      ssh: ["--ssh-key-file-path=/home/user/.ssh"]
    17      # Provide network information: hosts file(under path `/etc/volcano/`), headless service, etc.
    18      # :param publish-not-ready-addresses: publish not ready addresses(false by default)
    19      # :param disable-network-policy: disable network policy of the job(false by default)
    20      svc: ["--publish-not-ready-addresses=false", "--disable-network-policy=false"]
    21    maxRetry: 5
    22    queue: default
    23    tasks:
    24      - replicas: 3
    25        name: "default-nginx"
    26        template:
    27          metadata:
    28            name: web
    29          spec:
    30            containers:
    31              - image: nginx
    32                imagePullPolicy: IfNotPresent
    33                name: nginx
    34                resources:
    35                  requests:
    36                    cpu: "1"
    37            restartPolicy: OnFailure