Class: Google::Apis::RunV1alpha1::JobSpec
- Inherits:
-
Object
- Object
- Google::Apis::RunV1alpha1::JobSpec
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/run_v1alpha1/classes.rb,
lib/google/apis/run_v1alpha1/representations.rb,
lib/google/apis/run_v1alpha1/representations.rb
Overview
JobSpec describes how the job execution will look like.
Instance Attribute Summary collapse
-
#active_deadline_seconds ⇒ Fixnum
Optional.
-
#backoff_limit ⇒ Fixnum
Optional.
-
#completions ⇒ Fixnum
Optional.
-
#parallelism ⇒ Fixnum
Optional.
-
#template ⇒ Google::Apis::RunV1alpha1::InstanceTemplateSpec
InstanceTemplateSpec describes the data an instance should have when created from a template.
-
#ttl_seconds_after_finished ⇒ Fixnum
Optional.
Instance Method Summary collapse
-
#initialize(**args) ⇒ JobSpec
constructor
A new instance of JobSpec.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ JobSpec
Returns a new instance of JobSpec.
2343 2344 2345 |
# File 'lib/google/apis/run_v1alpha1/classes.rb', line 2343 def initialize(**args) update!(**args) end |
Instance Attribute Details
#active_deadline_seconds ⇒ Fixnum
Optional. Specifies the duration in seconds relative to the startTime that the
job may be active before the system tries to terminate it. If set to zero, the
system will never attempt to terminate the job based on time. Otherwise, the
value must be positive integer. +optional
Corresponds to the JSON property activeDeadlineSeconds
2300 2301 2302 |
# File 'lib/google/apis/run_v1alpha1/classes.rb', line 2300 def active_deadline_seconds @active_deadline_seconds end |
#backoff_limit ⇒ Fixnum
Optional. Specifies the number of retries per instance, before marking this
job failed. If set to zero, instances will never retry on failure. +optional
Corresponds to the JSON property backoffLimit
2306 2307 2308 |
# File 'lib/google/apis/run_v1alpha1/classes.rb', line 2306 def backoff_limit @backoff_limit end |
#completions ⇒ Fixnum
Optional. Specifies the desired number of successfully finished instances the
job should be run with. Setting to 1 means that parallelism is limited to 1
and the success of that instance signals the success of the job. More info:
https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-
completion/ +optional
Corresponds to the JSON property completions
2315 2316 2317 |
# File 'lib/google/apis/run_v1alpha1/classes.rb', line 2315 def completions @completions end |
#parallelism ⇒ Fixnum
Optional. Specifies the maximum desired number of instances the job should run at any given time. Must be <= completions. The actual number of instances running in steady state will be less than this number when ((.spec.completions
- .status.successful) < .spec.parallelism), i.e. when the work left to do is
less than max parallelism. More info: https://kubernetes.io/docs/concepts/
workloads/controllers/jobs-run-to-completion/ +optional
Corresponds to the JSON property
parallelism
2325 2326 2327 |
# File 'lib/google/apis/run_v1alpha1/classes.rb', line 2325 def parallelism @parallelism end |
#template ⇒ Google::Apis::RunV1alpha1::InstanceTemplateSpec
InstanceTemplateSpec describes the data an instance should have when created
from a template.
Corresponds to the JSON property template
2331 2332 2333 |
# File 'lib/google/apis/run_v1alpha1/classes.rb', line 2331 def template @template end |
#ttl_seconds_after_finished ⇒ Fixnum
Optional. ttlSecondsAfterFinished limits the lifetime of a Job that has
finished execution (either Complete or Failed). If this field is set,
ttlSecondsAfterFinished after the Job finishes, it is eligible to be
automatically deleted. When the Job is being deleted, its lifecycle guarantees
(e.g. finalizers) will be honored. If this field is set to zero, the Job won't
be automatically deleted. +optional
Corresponds to the JSON property ttlSecondsAfterFinished
2341 2342 2343 |
# File 'lib/google/apis/run_v1alpha1/classes.rb', line 2341 def ttl_seconds_after_finished @ttl_seconds_after_finished end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
2348 2349 2350 2351 2352 2353 2354 2355 |
# File 'lib/google/apis/run_v1alpha1/classes.rb', line 2348 def update!(**args) @active_deadline_seconds = args[:active_deadline_seconds] if args.key?(:active_deadline_seconds) @backoff_limit = args[:backoff_limit] if args.key?(:backoff_limit) @completions = args[:completions] if args.key?(:completions) @parallelism = args[:parallelism] if args.key?(:parallelism) @template = args[:template] if args.key?(:template) @ttl_seconds_after_finished = args[:ttl_seconds_after_finished] if args.key?(:ttl_seconds_after_finished) end |