From 962f3b24011e3e83075be6b8216ad53834f003c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Skyler=20M=C3=A4ntysaari?= Date: Wed, 28 Jun 2023 12:45:06 +0300 Subject: [PATCH] common: Bring the fullname definition here, and not depend on Postgresql chart to bring it. --- charts/apps/piped/templates/common.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/charts/apps/piped/templates/common.yaml b/charts/apps/piped/templates/common.yaml index 4c771e4..7c8f010 100644 --- a/charts/apps/piped/templates/common.yaml +++ b/charts/apps/piped/templates/common.yaml @@ -8,6 +8,19 @@ {{- 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" -}} # Set the nameOverride based on the release name if no override has been set