Class: Kubec::Kubernetes::CronJob
- Defined in:
- lib/kubec/kubernetes/cron_job.rb
Overview
:nodoc:
Instance Attribute Summary
Attributes inherited from Config
Instance Method Summary collapse
Methods inherited from Config
api_version, #fetch, #initialize, kind, #metadata, #prepare, #spec
Constructor Details
This class inherits a constructor from Kubec::Kubernetes::Config
Instance Method Details
#schedule(at) ⇒ Object
9 10 11 |
# File 'lib/kubec/kubernetes/cron_job.rb', line 9 def schedule(at) spec[:schedule] = at end |
#template(&block) ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/kubec/kubernetes/cron_job.rb', line 13 def template(&block) inst = Template.new spec[:jobTemplate] = { spec: { template: inst } } inst.instance_eval(&block) end |