From 602988cc70be38c95dfc5d63dab0175a4c353d38 Mon Sep 17 00:00:00 2001 From: Mueed Chaudhry Date: Wed, 14 Feb 2018 17:05:56 -0500 Subject: [PATCH] rephrase second occurance of naming convention to be less redundant --- docs/chart_template_guide/named_templates.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/chart_template_guide/named_templates.md b/docs/chart_template_guide/named_templates.md index dbbeb2f48..3eb96acb0 100644 --- a/docs/chart_template_guide/named_templates.md +++ b/docs/chart_template_guide/named_templates.md @@ -105,9 +105,7 @@ data: {{- end }} ``` -There is one _really important detail_ to keep in mind when naming templates: **template names are global**. If you declare two templates with the same name, whichever one is loaded last will be the one used. Because templates in subcharts are compiled together with top-level templates, you should be careful to name your templates with chart-specific names. - -One popular naming convention is to prefix each defined template with the name of the chart: `{{ define "mychart.labels" }}` or `{{ define "mychart_labels" }}`. +As mentioned above, **template names are global**. As a result of this, if two templates are declared with the same name the last occurance will be the one that is used. Since templates in subcharts are compiled together with top-level templates, it is best to name your templates with _chart specific names_. A popular naming convention is to prefix each defined template with the name of the chart: `{{ define "mychart.labels" }}` or `{{ define "mychart_labels" }}`. ## Setting the scope of a template