Class: Kuby::Kubernetes::DeployTask
- Inherits:
-
Object
- Object
- Kuby::Kubernetes::DeployTask
- Defined in:
- lib/kuby/kubernetes/deploy_task.rb
Instance Attribute Summary collapse
-
#deploy_task ⇒ Object
readonly
Returns the value of attribute deploy_task.
Instance Method Summary collapse
-
#initialize(**kwargs) ⇒ DeployTask
constructor
A new instance of DeployTask.
- #logger ⇒ Object
- #run!(**kwargs) ⇒ Object
Constructor Details
#initialize(**kwargs) ⇒ DeployTask
Returns a new instance of DeployTask.
10 11 12 |
# File 'lib/kuby/kubernetes/deploy_task.rb', line 10 def initialize(**kwargs) @deploy_task ||= ::Krane::DeployTask.new(**kwargs) end |
Instance Attribute Details
#deploy_task ⇒ Object (readonly)
Returns the value of attribute deploy_task.
8 9 10 |
# File 'lib/kuby/kubernetes/deploy_task.rb', line 8 def deploy_task @deploy_task end |
Instance Method Details
#logger ⇒ Object
22 23 24 |
# File 'lib/kuby/kubernetes/deploy_task.rb', line 22 def logger deploy_task.instance_variable_get(:@logger) end |
#run!(**kwargs) ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/kuby/kubernetes/deploy_task.rb', line 14 def run!(**kwargs) new_path = "#{File.dirname(KubectlRb.executable)}:#{ENV['PATH']}" with_env('PATH' => new_path) do deploy_task.run!(**kwargs) end end |