common: Bring the fullname definition here, and not depend on Postgresql chart to bring it.

This commit is contained in:
Skyler Mäntysaari 2023-06-28 12:45:06 +03:00
parent db7f5a2877
commit 962f3b2401

View file

@ -8,6 +8,19 @@
{{- end -}} {{- end -}}
{{- end -}} {{- end -}}
{{- define "common.names.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-template.hardcodedValues" -}} {{- define "app-template.hardcodedValues" -}}
# Set the nameOverride based on the release name if no override has been set # Set the nameOverride based on the release name if no override has been set