10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
# File 'lib/kuber_kit/service_deployer/strategies/helm.rb', line 10
def deploy(shell, service)
service_config = reader.read(shell, service)
chart_root_path = File.join(configs.service_config_dir, "#{service.name}_chart")
chart_templates_path = File.join(chart_root_path, "templates")
chart_config_path = File.join(chart_root_path, "Chart.yaml")
release_path = File.join(chart_templates_path, "release.yaml")
bash_commands.mkdir_p(shell, chart_root_path)
bash_commands.mkdir_p(shell, chart_templates_path)
shell.write(release_path, service_config)
shell.write(chart_config_path, chart_config_content(service.uri))
kubeconfig_path = KuberKit.current_configuration.kubeconfig_path
namespace = KuberKit.current_configuration.deployer_namespace
upgrade_result = helm_commands.upgrade(shell, service.uri, chart_root_path, kubeconfig_path: kubeconfig_path, namespace: namespace)
upgrade_result
end
|