Class: Kuby::Kubernetes::DeployTask

Inherits:
Object
  • Object
show all
Defined in:
lib/kuby/kubernetes/deploy_task.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_taskObject (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

#loggerObject



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