Class: KubernetesTemplateRendering::JsonnetTemplate
- Defined in:
- lib/kubernetes_template_rendering/jsonnet_template.rb
Defined Under Namespace
Classes: MultiFileJsonnetRenderError
Constant Summary collapse
- MULTI_FILE_RENDER_KEY =
"MULTI_FILE_RENDER"
- MULTI_FILE_RENDER_FILE_NAME_KEY =
"MULTI_FILE_RENDER_NAME"
Instance Attribute Summary
Attributes inherited from Template
#source_repo, #template_path, #variable_overrides, #variables
Instance Method Summary collapse
Methods inherited from Template
Constructor Details
This class inherits a constructor from KubernetesTemplateRendering::Template
Instance Method Details
#render(erb_binding: nil, jsonnet_library_path: nil) ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/kubernetes_template_rendering/jsonnet_template.rb', line 13 def render(erb_binding: nil, jsonnet_library_path: nil) json_doc = render_json_doc_from_template(jsonnet_library_path) if multi_file_jsonnet_doc?(json_doc) render_multi_file_jsonnet!(json_doc) else with_auto_generated_yaml_comment(json_doc.to_yaml) end end |