Class: Orchparty::Services::SecretGeneric
- 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
128 129 130 |
# File 'lib/orchparty/kubernetes_application.rb', line 128 def cleanup tempfile.unlink end |
#install_cmd(fix_file_path = nil) ⇒ Object
122 123 124 125 126 |
# File 'lib/orchparty/kubernetes_application.rb', line 122 def install_cmd(fix_file_path = nil) cmd="kubectl --namespace #{namespace} create secret generic --dry-run=client -o yaml #{service[:name]} #{template(value_path, service, flag: '--from-file=')} > #{tempfile.path}" res = system(cmd) Minfra::Cli::KubeCtlRunner.new("apply --context #{cluster_name} -f #{tempfile.path}") end |
#upgrade_cmd(fix_file_path = nil) ⇒ Object
118 119 120 |
# File 'lib/orchparty/kubernetes_application.rb', line 118 def upgrade_cmd(fix_file_path = nil) install_cmd(fix_file_path) end |
#value_path ⇒ Object
114 115 116 |
# File 'lib/orchparty/kubernetes_application.rb', line 114 def value_path service[:from_file] end |