diff --git a/nginx-chart/templates/_helpers.tpl b/nginx-chart/templates/_helpers.tpl new file mode 100644 index 0000000..de00dcf --- /dev/null +++ b/nginx-chart/templates/_helpers.tpl @@ -0,0 +1,33 @@ +{{/* +Expand the name of the chart. +*/}} +{{- define "nginx-chart.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Create a default fully qualified app name. +*/}} +{{- define "nginx-chart.fullname" -}} + +{{- if .Values.fullnameOverride }} + +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} + +{{- else }} + +{{- $name := default .Chart.Name .Values.nameOverride }} + +{{- if contains $name .Release.Name }} + +{{- .Release.Name | trunc 63 | trimSuffix "-" }} + +{{- else }} + +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} + +{{- end }} + +{{- end }} + +{{- end }} \ No newline at end of file