summaryrefslogtreecommitdiffstats
path: root/kubernetes
diff options
context:
space:
mode:
authorJakub Latusek <j.latusek@samsung.com>2020-09-14 16:39:43 +0200
committerSylvain Desbureaux <sylvain.desbureaux@orange.com>2020-09-17 11:36:33 +0000
commitb0e340e90eadf96bc55b4c644682e3a3303d3a5d (patch)
tree6c7e5e0bf98f1eada0dddcd69dc2f7602ff953df /kubernetes
parent27aae18cdee00c873e3617a6a3b5fb2d294b9b98 (diff)
Use lowercase in common.fullname during linting in helm3
Helm3 linting check if object name conform Kubernetes naming requirements Change-Id: I03ac6f4c33048b59d495390a38f4adf6d3afa489 Signed-off-by: Jakub Latusek <j.latusek@samsung.com> Issue-ID: OOM-2562
Diffstat (limited to 'kubernetes')
-rw-r--r--kubernetes/common/common/templates/_name.tpl5
1 files changed, 5 insertions, 0 deletions
diff --git a/kubernetes/common/common/templates/_name.tpl b/kubernetes/common/common/templates/_name.tpl
index e918cc1dd8..adbe2b6cf9 100644
--- a/kubernetes/common/common/templates/_name.tpl
+++ b/kubernetes/common/common/templates/_name.tpl
@@ -51,6 +51,11 @@
{{- $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 -}}