fix(common): ensure tcportals configmap name is expanded by default

This commit is contained in:
Kjeld Schouten
2024-06-27 18:32:10 +02:00
committed by GitHub
parent 9c9e050ab2
commit d7d93d31e2

View File

@@ -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 */}}