Add nginx-chart/templates/_helpers.tpl
This commit is contained in:
@@ -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 }}
|
||||||
Reference in New Issue
Block a user