Adding possibility to customize the domain name when using Ingress in VOLTHA

Change-Id: Iaad15dfd4e756cba551413c799dd2a14578211a9
diff --git a/voltha-stack/Chart.yaml b/voltha-stack/Chart.yaml
index 987c363..ded391d 100644
--- a/voltha-stack/Chart.yaml
+++ b/voltha-stack/Chart.yaml
@@ -28,12 +28,12 @@
 name: voltha-stack
 
 appVersion: "2.8-dev"
-version: 0.2.1
+version: 0.2.2
 
 dependencies:
   - name: voltha
     repository: file://../voltha
-    version: 2.9.1
+    version: 2.9.2
     condition: voltha.enabled
   - name: voltha-adapter-openonu
     repository: file://../voltha-adapter-openonu
diff --git a/voltha/Chart.yaml b/voltha/Chart.yaml
index c293685..262023d 100644
--- a/voltha/Chart.yaml
+++ b/voltha/Chart.yaml
@@ -14,7 +14,7 @@
 ---
 apiVersion: "v1"
 name: "voltha"
-version: "2.9.1"
+version: "2.9.2"
 description: "A Helm chart for Voltha based on K8S resources in Voltha project"
 keywords:
   - "onf"
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 }}
diff --git a/voltha/values.yaml b/voltha/values.yaml
index 6fa6fcc..0d6671d 100644
--- a/voltha/values.yaml
+++ b/voltha/values.yaml
@@ -14,6 +14,7 @@
 ---
 nameOverride: ~
 fullNameOverride: ~
+fullHostnameOverride: ~
 
 # Default Values
 # The following are the default values used for every container in the
@@ -109,6 +110,7 @@
     nginx.ingress.kubernetes.io/backend-protocol: "GRPC"
     nginx.ingress.kubernetes.io/grpc-backend: "true"
   enableVirtualHosts: false
+  baseHostname: local
   hosts:
     - host:
       paths: