Class: Orchparty::Services::Helm

Inherits:
Context
  • Object
show all
Defined in:
lib/orchparty/kubernetes_application.rb

Instance Attribute Summary

Attributes inherited from Context

#app_config, #cluster_name, #dir_path, #namespace, #options, #service

Instance Method Summary collapse

Methods inherited from Context

#initialize, #install, #print_install, #print_upgrade, #template, #upgrade

Methods included from Minfra::Cli::Logging

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

Constructor Details

This class inherits a constructor from Orchparty::Services::Context

Instance Method Details

#install_cmd(fix_file_path = nil) ⇒ Object



86
87
88
89
90
# File 'lib/orchparty/kubernetes_application.rb', line 86

def install_cmd(fix_file_path = nil)
  Minfra::Cli::HelmRunner.new("install --create-namespace --namespace #{namespace} --kube-context #{cluster_name} --version #{service.version} #{service.name} #{service.chart} #{template(
    value_path, service, fix_file_path: fix_file_path
  )}")
end

#upgrade_cmd(fix_file_path = nil) ⇒ Object



80
81
82
83
84
# File 'lib/orchparty/kubernetes_application.rb', line 80

def upgrade_cmd(fix_file_path = nil)
  Minfra::Cli::HelmRunner.new("upgrade --namespace #{namespace} --kube-context #{cluster_name} --version #{service.version} #{service.name} #{service.chart} #{template(
    value_path, service, fix_file_path: fix_file_path
  )}")
end

#value_pathObject



76
77
78
# File 'lib/orchparty/kubernetes_application.rb', line 76

def value_path
  service[:values]
end