Skip to content

Commit

Permalink
fix(common): ensure tcportals configmap name is expanded by default
Browse files Browse the repository at this point in the history
  • Loading branch information
PrivatePuffin authored Jun 27, 2024
1 parent 9c9e050 commit d7d93d3
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions library/common/templates/spawner/_portal.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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 */}}
Expand Down

0 comments on commit d7d93d3

Please sign in to comment.