Class: Kubes::Kubectl::Dispatcher

Inherits:
Object
  • Object
show all
Defined in:
lib/kubes/kubectl/dispatcher.rb

Instance Method Summary collapse

Constructor Details

#initialize(name, options = {}) ⇒ Dispatcher

Returns a new instance of Dispatcher.



3
4
5
# File 'lib/kubes/kubectl/dispatcher.rb', line 3

def initialize(name, options={})
  @name, @options = name.to_s, options
end

Instance Method Details

#runObject



7
8
9
10
11
12
13
# File 'lib/kubes/kubectl/dispatcher.rb', line 7

def run
  if Kubes.kustomize?
    Kubes::Kubectl.run(@name, @options)
  else
    Kubes::Kubectl::Batch.new(@name, @options).run
  end
end