From ba97a18c9c46b74dd1578e6c5da00754e0a4ec34 Mon Sep 17 00:00:00 2001 From: "promptless[bot]" Date: Wed, 8 Jul 2026 18:45:58 +0000 Subject: [PATCH] docs: clarify Files.Lines behavior for empty and missing files Signed-off-by: promptless[bot] --- docs/chart_template_guide/accessing_files.md | 4 ++++ .../version-3/chart_template_guide/accessing_files.md | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/docs/chart_template_guide/accessing_files.md b/docs/chart_template_guide/accessing_files.md index ff3e6c3a1..3149abf88 100644 --- a/docs/chart_template_guide/accessing_files.md +++ b/docs/chart_template_guide/accessing_files.md @@ -235,6 +235,10 @@ data: {{ . }}{{ end }} ``` +If the file you reference is empty or does not exist, `Lines` returns an empty +list rather than failing. The `range` loop then produces no output, so +referencing a missing or empty file will not cause template rendering to fail. + There is no way to pass files external to the chart during `helm install`. So if you are asking users to supply data, it must be loaded using `helm install -f` or `helm install --set`. diff --git a/versioned_docs/version-3/chart_template_guide/accessing_files.md b/versioned_docs/version-3/chart_template_guide/accessing_files.md index ff3e6c3a1..3149abf88 100644 --- a/versioned_docs/version-3/chart_template_guide/accessing_files.md +++ b/versioned_docs/version-3/chart_template_guide/accessing_files.md @@ -235,6 +235,10 @@ data: {{ . }}{{ end }} ``` +If the file you reference is empty or does not exist, `Lines` returns an empty +list rather than failing. The `range` loop then produces no output, so +referencing a missing or empty file will not cause template rendering to fail. + There is no way to pass files external to the chart during `helm install`. So if you are asking users to supply data, it must be loaded using `helm install -f` or `helm install --set`.