From f27f42021c5373cd2b09f66d491b71d4f3540c5a Mon Sep 17 00:00:00 2001 From: gmcnutt Date: Thu, 27 Jul 2017 09:32:43 -0700 Subject: [PATCH] docs(helm): update Globs examples to work correctly s/coffess/coffees/ --- docs/chart_template_guide/accessing_files.md | 9 +++++---- docs/chart_template_guide/yaml_techniques.md | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/docs/chart_template_guide/accessing_files.md b/docs/chart_template_guide/accessing_files.md index 3911af830..123bcdbfb 100644 --- a/docs/chart_template_guide/accessing_files.md +++ b/docs/chart_template_guide/accessing_files.md @@ -118,9 +118,10 @@ You have multiple options with Globs: ```yaml -{{ range $path := .Files.Glob "**.yaml" }} -{{ $path }}: | -{{ .Files.Get $path }} +{{ $root := . }} +{{ range $path, $bytes := .Files.Glob "**.yaml" }} +{{ $path }}: |- +{{ $root.Files.Get $path }} {{ end }} ``` @@ -128,7 +129,7 @@ Or ```yaml {{ range $path, $bytes := .Files.Glob "foo/*" }} -{{ $path }}: '{{ b64enc $bytes }}' +{{ $path.base }}: '{{ $root.Files.Get $path | b64enc }}' {{ end }} ``` diff --git a/docs/chart_template_guide/yaml_techniques.md b/docs/chart_template_guide/yaml_techniques.md index ccada54c0..44c41f903 100644 --- a/docs/chart_template_guide/yaml_techniques.md +++ b/docs/chart_template_guide/yaml_techniques.md @@ -319,7 +319,7 @@ refer to that value by reference. YAML refers to this as "anchoring": ```yaml coffee: "yes, please" favorite: &favoriteCoffee "Cappucino" -coffess: +coffees: - Latte - *favoriteCoffee - Espresso @@ -339,7 +339,7 @@ YAML would be: ```YAML coffee: yes, please favorite: Cappucino -coffess: +coffees: - Latte - Cappucino - Espresso