Score

Capability

Jobs

Define your workload to be deployed as a Kubernetes Job through a Score extension file.

The extension file needs to request a Workload Profile which creates a Job, such as the built-in default-job Workload Profile.

You may optionally also set additional properties for the Kubernetes Job and Pod objects which will be created. You can set almost any property of the Kubernetes API specifications for those objects. Refer to the Job feature and Pod feature descriptions for details on supported properties.


humanitec.score.yaml (view on GitHub) :

apiVersion: humanitec.org/v1b1
# Select the "default-job" bulit-in Workload Profile
profile: humanitec/default-job

spec:
  job:
    # Set annotations and labels in the Job object metadata
    annotations:
      jobannotationkey: jobannotationvalue
    labels:
      joblabelkey: joblabelvalue
    # Set properties of the JobSpec, e.g.:
    activeDeadlineSeconds: 30
    ttlSecondsAfterFinished: 3600
  pod:
    # Set Pod annotations and labels in Pod metadata
    annotations:
      podannotationkey: podannotationvalue
    labels:
      podlabelkey: podlabelvalue
    # Set properties of the PodSpec, e.g.:
    nodeSelector:
      topology.kubernetes.io/region: europe-west3
    os:
      name: linux
Top