Class: KubernetesApplication

Inherits:
Object
  • Object
show all
Includes:
Minfra::Cli::Logging
Defined in:
lib/orchparty/kubernetes_application.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Minfra::Cli::Logging

#debug, #deprecated, #error, #exit_error, #info, #warn

Constructor Details

#initialize(namespace:, cluster_name:, file_name:, status_dir:, app_config: [], out_io: $stdout) ⇒ KubernetesApplication



311
312
313
314
315
316
317
318
# File 'lib/orchparty/kubernetes_application.rb', line 311

def initialize(namespace:, cluster_name:, file_name:, status_dir:, app_config: [], out_io: $stdout)
  self.file_path = Pathname.new(file_name).parent.expand_path # path of the stack
  self.cluster_name = cluster_name
  self.namespace = namespace
  self.app_config = app_config
  @status_dir = status_dir
  @out_io = out_io
end

Instance Attribute Details

#app_configObject

Returns the value of attribute app_config.



308
309
310
# File 'lib/orchparty/kubernetes_application.rb', line 308

def app_config
  @app_config
end

#cluster_nameObject

Returns the value of attribute cluster_name.



308
309
310
# File 'lib/orchparty/kubernetes_application.rb', line 308

def cluster_name
  @cluster_name
end

#file_pathObject

Returns the value of attribute file_path.



308
309
310
# File 'lib/orchparty/kubernetes_application.rb', line 308

def file_path
  @file_path
end

#namespaceObject

Returns the value of attribute namespace.



308
309
310
# File 'lib/orchparty/kubernetes_application.rb', line 308

def namespace
  @namespace
end

#status_dirObject (readonly)

Returns the value of attribute status_dir.



309
310
311
# File 'lib/orchparty/kubernetes_application.rb', line 309

def status_dir
  @status_dir
end

Instance Method Details

#installObject



320
321
322
# File 'lib/orchparty/kubernetes_application.rb', line 320

def install
  each_service(:install)
end


328
329
330
# File 'lib/orchparty/kubernetes_application.rb', line 328

def print(method)
  each_service("print_#{method}".to_sym)
end

#upgradeObject



324
325
326
# File 'lib/orchparty/kubernetes_application.rb', line 324

def upgrade
  each_service(:upgrade)
end