Skip to content

jobspec

jobspec value in Kubedeploy defines Jobs specific parameters.

Note

jobspec will be only taken into account if the deploymetMode is set to Job.

Available values for jobspec in Kubedeploy:

jobspec:
  restartPolicy: OnFailure # (1)
  command: [] # (2)
  args: [] # (3)
  parallelism: 1 # (4)
  backoffLimit: 3 # (5)
  ttlSecondsAfterFinished: 300 # (6)
  1. Define restart policy for jobs if deploymentMode=Job, see reference
  2. Define command for Job
  3. Define args for Job
  4. Define Job paralelisam, see reference
  5. Define Job backoff limit, see reference
  6. (Feature state: 1.2.0) Define Automatic Cleanup for Finished Jobs

Deprecation Warning

Starting from Kubedeploy version 1.2, you should begin using image.command and image.args instead of cronjobspec.command and cronjobspec.args. These values will remain available as failsafe options until Kubedeploy 2.0, at which point they will be removed.

Define job

values.yaml
1
2
3
4
5
6
7
8
nameOverride: my-job
deploymentMode: Job
image:
  repository: busybox
  tag: latest

jobspec:
  command: ["sh", "-c", "echo hello from job" ]
Deploy command
helm install hello sysbee/kubedeploy -f values.yaml

The above example will create a Job that will run once and echo a hello message.

See also: