summaryrefslogtreecommitdiffstats
path: root/kubernetes/common/templates/_name.tpl
diff options
context:
space:
mode:
Diffstat (limited to 'kubernetes/common/templates/_name.tpl')
-rw-r--r--kubernetes/common/templates/_name.tpl15
1 files changed, 15 insertions, 0 deletions
diff --git a/kubernetes/common/templates/_name.tpl b/kubernetes/common/templates/_name.tpl
new file mode 100644
index 0000000000..f6c221f15d
--- /dev/null
+++ b/kubernetes/common/templates/_name.tpl
@@ -0,0 +1,15 @@
+{{/*
+ Expand the name of a chart.
+*/}}
+{{- define "common.name" -}}
+ {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+ Create a default fully qualified application name.
+ Truncated at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
+*/}}
+{{- define "common.fullname" -}}
+ {{- $name := default .Chart.Name .Values.nameOverride -}}
+ {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}} \ No newline at end of file