Merge "Use lowercase in common.fullname during linting in helm3"
authorSylvain Desbureaux <sylvain.desbureaux@orange.com>
Fri, 18 Sep 2020 07:00:03 +0000 (07:00 +0000)
committerGerrit Code Review <gerrit@onap.org>
Fri, 18 Sep 2020 07:00:03 +0000 (07:00 +0000)
kubernetes/common/common/templates/_name.tpl

index e918cc1..adbe2b6 100644 (file)
 {{- $dot := default . .dot -}}
 {{- $suffix := default "" .suffix -}}
   {{- $name := default $dot.Chart.Name $dot.Values.nameOverride -}}
+  {{/* when linted, the name must be lower cased. When used from a component,
+       name should be overriden in order to avoid collision so no need to do it */}}
+  {{- if eq (printf "common/%s/templates" $name) $dot.Template.BasePath -}}
+  {{- $name = lower $name -}}
+  {{- end -}}
   {{- include "common.fullnameExplicit" (dict "dot" $dot "chartName" $name "suffix" $suffix) }}
 {{- end -}}