Class: Orchparty::Services::Apply
- 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
- #cleanup ⇒ Object
- #install_cmd(fix_file_path = nil) ⇒ Object
- #upgrade_cmd(fix_file_path = nil) ⇒ Object
- #value_path ⇒ Object
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
#cleanup ⇒ Object
108 109 110 |
# File 'lib/orchparty/kubernetes_application.rb', line 108 def cleanup File.unlink(service[:tmp_file]) if service[:tmp_file] end |
#install_cmd(fix_file_path = nil) ⇒ Object
103 104 105 106 |
# File 'lib/orchparty/kubernetes_application.rb', line 103 def install_cmd(fix_file_path = nil) Minfra::Cli::KubeCtlRunner.new("apply --namespace #{namespace} --context #{cluster_name} #{template(value_path, service, fix_file_path: fix_file_path)}") end |
#upgrade_cmd(fix_file_path = nil) ⇒ Object
98 99 100 101 |
# File 'lib/orchparty/kubernetes_application.rb', line 98 def upgrade_cmd(fix_file_path = nil) Minfra::Cli::KubeCtlRunner.new("apply --namespace #{namespace} --context #{cluster_name} #{template(value_path, service, fix_file_path: fix_file_path)}") end |
#value_path ⇒ Object
94 95 96 |
# File 'lib/orchparty/kubernetes_application.rb', line 94 def value_path service[:tmp_file] || service[:name] end |