From 4f19a2a6fb86bbabe183a7fd256b77892e21830f Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 29 Mar 2022 18:28:28 +0200 Subject: [PATCH] finish the helm yaml tree test --- helm/treetest/README.md | 15 +++++++++++++++ helm/treetest/test/server.yaml | 6 ++---- helm/treetest/values.yaml | 7 ++++--- 3 files changed, 21 insertions(+), 7 deletions(-) create mode 100644 helm/treetest/README.md diff --git a/helm/treetest/README.md b/helm/treetest/README.md new file mode 100644 index 0000000..4dd099f --- /dev/null +++ b/helm/treetest/README.md @@ -0,0 +1,15 @@ +## Motivation + +Setting yaml constructs inside configurations files via values.yaml. + +## TL;DR + +Setting it using + +``` +abc: | + ... +``` + +works, however pushing the multiline string into helm might be the +bigger issue / challenge. diff --git a/helm/treetest/test/server.yaml b/helm/treetest/test/server.yaml index 44b6ca0..e5a08a9 100644 --- a/helm/treetest/test/server.yaml +++ b/helm/treetest/test/server.yaml @@ -1,6 +1,4 @@ email: {{- if .Values.email -}} - {{ tpl .Values.email . }} - {{- end -}} - - {{ .Values.email }} + {{ .Values.email | nindent 4 }} + {{ end }} diff --git a/helm/treetest/values.yaml b/helm/treetest/values.yaml index 3555726..f1441f3 100644 --- a/helm/treetest/values.yaml +++ b/helm/treetest/values.yaml @@ -1,3 +1,4 @@ -email: - somehost: "abc" - someport: 5333 +email: | + abc: moo + def: "false" + rf: true