Class: Dapp::Kube::Kubernetes::Client::Resource::Job
- Inherits:
-
Base
- Object
- Base
- Dapp::Kube::Kubernetes::Client::Resource::Job
show all
- Defined in:
- lib/dapp/kube/kubernetes/client/resource/job.rb
Instance Attribute Summary
Attributes inherited from Base
#spec
Instance Method Summary
collapse
Methods inherited from Base
#annotations, #initialize, #metadata, #name, #status
Instance Method Details
#failed? ⇒ Boolean
13
14
15
16
17
|
# File 'lib/dapp/kube/kubernetes/client/resource/job.rb', line 13
def failed?
!!spec.fetch('status', {}).fetch('conditions', []).find do |cond|
cond['type'] == 'Failed'
end
end
|
#succeeded? ⇒ Boolean
19
20
21
22
23
|
# File 'lib/dapp/kube/kubernetes/client/resource/job.rb', line 19
def succeeded?
!!spec.fetch('status', {}).fetch('conditions', []).find do |cond|
cond['type'] == 'Complete'
end
end
|
#terminated? ⇒ Boolean
9
10
11
|
# File 'lib/dapp/kube/kubernetes/client/resource/job.rb', line 9
def terminated?
failed? || succeeded?
end
|
#uid ⇒ Object
5
6
7
|
# File 'lib/dapp/kube/kubernetes/client/resource/job.rb', line 5
def uid
spec.fetch('metadata', {})['uid']
end
|