Skip to content

Commit 3168243

Browse files
committed
fix: make publicUrl fallback work with values-cloud.yaml
values-cloud.yaml enables webui but didn't set gateway.publicUrl or console.commonName, causing helm template to fail. Added a placeholder default to gateway.publicUrl in values-cloud.yaml, and simplified the helper to just use the fallback logic without strict validation (the values files now provide sensible defaults/placeholders). Verified: - helm template console charts -f charts/values-cloud.yaml ✓ - helm lint ✓ - Fallback to console.commonName still works when publicUrl not set ✓ Signed-off-by: Nabendu Maiti <nabendu.bikash.maiti@intel.com>
1 parent c27ed46 commit 3168243

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

charts/templates/_helpers.tpl

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,10 @@ app.kubernetes.io/instance: {{ .Release.Name }}
5353

5454
{{/*
5555
Public host[:port] that browser clients use to reach the gateway.
56-
Falls back to the Console common name so charts that predate gateway.publicUrl
57-
keep working, and fails with a clear message when neither is set.
56+
Falls back to console.commonName if gateway.publicUrl is not set.
5857
*/}}
5958
{{- define "installServersChart.publicUrl" -}}
60-
{{- $url := default .Values.console.commonName .Values.gateway.publicUrl -}}
61-
{{- required "Set gateway.publicUrl (or console.commonName) when webui.enabled is true" $url -}}
59+
{{- default .Values.console.commonName .Values.gateway.publicUrl -}}
6260
{{- end -}}
6361

6462
{{/*

charts/values-cloud.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ console:
1111
webui:
1212
enabled: true
1313

14+
gateway:
15+
# Override with your actual public host[:port] when deploying
16+
publicUrl: <PUBLIC-HOST>
17+
1418
mpsrouter:
1519
enabled: true
1620

0 commit comments

Comments
 (0)