Changeset View
Changeset View
Standalone View
Standalone View
helm/dagster/schema/schema/utils/helm_template.py
Show All 40 Lines | def render(self, values: DagsterHelmValues, chart_version: Optional[str] = None) -> List[Any]: | ||||
"template", | "template", | ||||
self.name, | self.name, | ||||
helm_dir_path, | helm_dir_path, | ||||
"--debug", | "--debug", | ||||
*["--values", tmp_file.name], | *["--values", tmp_file.name], | ||||
] | ] | ||||
if self.output: | if self.output: | ||||
# render all templates before filtering to surface Helm templating errors | ## Uncomment to render all templates before filtering to surface Helm templating | ||||
# with better error messages | ## errors with better error messages | ||||
subprocess.check_output(command) | # subprocess.check_output(command) | ||||
command += ["--show-only", self.output] | command += ["--show-only", self.output] | ||||
with self._with_chart_yaml(helm_dir_path, chart_version): | with self._with_chart_yaml(helm_dir_path, chart_version): | ||||
templates = subprocess.check_output(command) | templates = subprocess.check_output(command) | ||||
print("\n--- Helm Templates ---") # pylint: disable=print-call | print("\n--- Helm Templates ---") # pylint: disable=print-call | ||||
print(templates.decode()) # pylint: disable=print-call | print(templates.decode()) # pylint: disable=print-call | ||||
▲ Show 20 Lines • Show All 43 Lines • Show Last 20 Lines |