-
Notifications
You must be signed in to change notification settings - Fork 1
Job
Gregory Nickonov edited this page Mar 4, 2019
·
2 revisions
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.
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
.
Sunstone property | Kubernetes property | Type |
---|---|---|
metadata | metadata | Kubernetes Object Metadata |
spec | spec | JobSpec |