9
10
11
12
13
14
15
16
17
18
19
20
21
|
# File 'lib/kuber_kit/service_generator/strategies/helm.rb', line 9
def generate(shell, service, export_path)
service_config = reader.read(shell, service)
chart_root_path = File.join(export_path, "#{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))
end
|