Adding possibility to customize the domain name when using Ingress in VOLTHA
Change-Id: Iaad15dfd4e756cba551413c799dd2a14578211a9
diff --git a/voltha/templates/_helpers.tpl b/voltha/templates/_helpers.tpl
index 0fd902b..2e399d3 100644
--- a/voltha/templates/_helpers.tpl
+++ b/voltha/templates/_helpers.tpl
@@ -24,6 +24,6 @@
{{/* Create a default fully qualified virtual hostname. We truncate at 63 chars because . . . */}}
{{- define "virtual-hostname" -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
-{{- $fullname := default (printf "%s.%s.local" .Values.global.stack_name $name) .Values.fullNameOverride -}}
+{{- $fullname := default (print .Values.global.stack_name "." $name "." .Values.ingress.baseHostname) .Values.fullHostnameOverride -}}
{{- $fullname | trunc 63 | trimSuffix "-" -}}
{{- end -}}
diff --git a/voltha/templates/ingress.yaml b/voltha/templates/ingress.yaml
index 69d161c..01158cc 100644
--- a/voltha/templates/ingress.yaml
+++ b/voltha/templates/ingress.yaml
@@ -40,7 +40,7 @@
rules:
{{- range .Values.ingress.hosts }}
{{- if $.Values.ingress.enableVirtualHosts }}
- - host: '{{ template "virtual-hostname" $ }}'
+ - host: {{ template "virtual-hostname" $ }}
http:
{{- else }}
{{- if .host }}