From d7d93d31e2a0f7bf840afce036624f782bd73357 Mon Sep 17 00:00:00 2001 From: Kjeld Schouten Date: Thu, 27 Jun 2024 18:32:10 +0200 Subject: [PATCH] fix(common): ensure tcportals configmap name is expanded by default --- library/common/templates/spawner/_portal.tpl | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/library/common/templates/spawner/_portal.tpl b/library/common/templates/spawner/_portal.tpl index ae0a30529..011cd32f7 100644 --- a/library/common/templates/spawner/_portal.tpl +++ b/library/common/templates/spawner/_portal.tpl @@ -24,7 +24,19 @@ ) -}} {{/* construct configmap */}} + + {{- $expandName := (include "tc.v1.common.lib.util.expandName" (dict + "rootCtx" $ "objectData" $objectData + "name" $name "caller" "Portal" + "key" "configmap")) -}} + {{- $objectName := (printf "tcportal-%s" $name) -}} + + {{- if eq $expandName "true" -}} + {{- $objectName = (printf "%s-%s" $fullname $name) -}} + {{- end -}} + + {{- $configMap := dict "name" $objectName "shortName" $objectName "data" $portalData -}} {{/* Perform validations */}} {{/* Configmaps have a max name length of 253 */}}