Skip to content
Gregory Nickonov edited this page Mar 4, 2019 · 2 revisions

Quick Start

R.job 'setup-environment' do
  # Default restart policy is :OnFailure, see below
  pod_template_spec.restart_policy :Never

  container do
    # Setup main container
  end
end

Job is one of the Pod Template Owners, so all methods, like pod_template and container are available.

Default restart policy

By default, Pod's restart_policy is Always, but this value is invalid for Jobs and leads to the error when creating the Job. To simplify development, in Sunstone default value for restart policy is OnFailure, so if you don't want the Job to be restarted in case of failure don't' forget to set the value to Never.

Job

Kubernetes Documentation

Sunstone property Kubernetes property Type
metadata metadata Kubernetes Object Metadata
spec spec JobSpec
Clone this wiki locally