- changed variables that was uppercased, that's not OK for linters - cleanup some documentation - remove the "/" in label prefix, a function is now used to get the complete label (`labelName()`) - some cleanup in tpl files, and so on...
37 lines
1.1 KiB
Smarty
37 lines
1.1 KiB
Smarty
{{- define "__APP__.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 -}}
|
|
|
|
{{- define "__APP__.name" -}}
|
|
{{- if .Values.nameOverride -}}
|
|
{{- .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
|
|
{{- else -}}
|
|
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
|
|
{{- define "__APP__.labels" -}}
|
|
{{ include "__APP__.selectorLabels" .}}
|
|
{{ if .Chart.Version -}}
|
|
{{ printf "__PREFIX__/chart-version: '%s'" .Chart.Version }}
|
|
{{- end }}
|
|
{{ if .Chart.AppVersion -}}
|
|
{{ printf "__PREFIX__/app-version: '%s'" .Chart.AppVersion }}
|
|
{{- end }}
|
|
{{- end -}}
|
|
|
|
{{- define "__APP__.selectorLabels" -}}
|
|
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
|
{{ printf "__PREFIX__/name: %s" $name }}
|
|
{{ printf "__PREFIX__/instance: %s" .Release.Name }}
|
|
{{- end -}}
|