Class: KuberKit::CLI
Class Method Summary collapse
Instance Method Summary collapse
- #apply(file_path) ⇒ Object
- #compile(image_names_str) ⇒ Object
- #deploy ⇒ Object
- #env(env_file_name) ⇒ Object
- #service(service_name) ⇒ Object
- #template(template_name) ⇒ Object
Class Method Details
.exit_on_failure? ⇒ Boolean
69 70 71 |
# File 'lib/kuber_kit/cli.rb', line 69 def self.exit_on_failure? true end |
Instance Method Details
#apply(file_path) ⇒ Object
51 52 53 54 55 56 |
# File 'lib/kuber_kit/cli.rb', line 51 def apply(file_path) KuberKit.set_debug_mode([:debug]) KuberKit::Container['actions.configuration_loader'].call() KuberKit::Container['actions.kubectl_applier'].call(File.(file_path), ) end |
#compile(image_names_str) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/kuber_kit/cli.rb', line 12 def compile(image_names_str) KuberKit.set_debug_mode([:debug]) image_names = image_names_str.split(",").map(&:strip).map(&:to_sym) KuberKit::Container['actions.configuration_loader'].call() KuberKit::Container['actions.image_compiler'].call(image_names, ) logger = KuberKit::Container['tools.logger'] logger.info("---------------------------") logger.info("Image compilation finished!") logger.info("---------------------------") end |
#deploy ⇒ Object
61 62 63 64 65 66 67 |
# File 'lib/kuber_kit/cli.rb', line 61 def deploy KuberKit.set_debug_mode([:debug]) KuberKit::Container['actions.configuration_loader'].call() KuberKit::Container['actions.service_deployer'].call(services: [:services], tags: [:tags]) end |
#env(env_file_name) ⇒ Object
27 28 29 30 31 32 |
# File 'lib/kuber_kit/cli.rb', line 27 def env(env_file_name) KuberKit.set_debug_mode([:debug]) KuberKit::Container['actions.configuration_loader'].call() KuberKit::Container['actions.env_file_reader'].call(env_file_name.to_sym, ) end |