From 8c86f56defd56c5ea02eb6952ba4b852599100d5 Mon Sep 17 00:00:00 2001 From: Konrad Bańka Date: Thu, 12 Nov 2020 09:13:37 +0100 Subject: Improve early-detection of empty template MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previous empty template detection pattern matched only against templates resolved to empty-or-whitespace-only files. This change makes it handle other case of empty yaml correctly, namely, yaml containing comments only. Issue-ID: MULTICLOUD-1252 Signed-off-by: Konrad Bańka Change-Id: I9132e167ec607c8a4a4ca5584141ed043c6ddd4f --- .../mock_charts/testchart3/templates/always-empty.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 src/k8splugin/mock_files/mock_charts/testchart3/templates/always-empty.yaml (limited to 'src/k8splugin/mock_files/mock_charts/testchart3/templates/always-empty.yaml') diff --git a/src/k8splugin/mock_files/mock_charts/testchart3/templates/always-empty.yaml b/src/k8splugin/mock_files/mock_charts/testchart3/templates/always-empty.yaml new file mode 100644 index 00000000..121130fc --- /dev/null +++ b/src/k8splugin/mock_files/mock_charts/testchart3/templates/always-empty.yaml @@ -0,0 +1,9 @@ +--- +{{ if eq 0 1 }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: dummy +data: + key1: value1 +{{ end }} -- cgit 1.2.3-korg