From 8dcae47ad61db4b1d3128f18b8922ab0ee672edf Mon Sep 17 00:00:00 2001 From: Zhe Huang Date: Fri, 19 Jul 2019 16:18:32 -0400 Subject: [PATCH] Using common template to provide endpoints to dashboard Signed-off-by: Zhe Huang Change-Id: Idbf8ee06bf232a5ba0c2da0ccbe16b56a08712c6 --- .../helm/dashboard/templates/_genurl.tpl | 34 +++++++-------- .../helm/dashboard/templates/appconfig.yaml | 14 ++++--- .../helm/dashboard/values.yaml | 48 ++++++++++------------ 3 files changed, 46 insertions(+), 50 deletions(-) diff --git a/ric-aux/80-Auxiliary-Functions/helm/dashboard/templates/_genurl.tpl b/ric-aux/80-Auxiliary-Functions/helm/dashboard/templates/_genurl.tpl index 9f89c39c..1aba1a6d 100644 --- a/ric-aux/80-Auxiliary-Functions/helm/dashboard/templates/_genurl.tpl +++ b/ric-aux/80-Auxiliary-Functions/helm/dashboard/templates/_genurl.tpl @@ -20,38 +20,38 @@ Generate the URLS of the endpoints. */}} -{{- define "dashboard.endpoint.a1mediator" -}} +{{- define "dashboard.prefix.a1mediator" -}} {{- $ingress := ( include "common.ingressurl.ricplt" . ) -}} - {{- if .Values.dashboard.properties.a1med.url.override -}} - {{- printf "%s" .Values.dashboard.properties.a1med.url.override -}} + {{- if .Values.dashboard.properties.a1med.url.prefix -}} + {{- printf "%s" .Values.dashboard.properties.a1med.url.prefix -}} {{- else -}} - {{- printf "http://%s/a1mediator%s" $ingress .Values.dashboard.properties.a1med.url.suffix -}} + {{- printf "http://%s/a1mediator" $ingress -}} {{- end -}} {{- end -}} -{{- define "dashboard.endpoint.anrxapp" -}} +{{- define "dashboard.prefix.anrxapp" -}} {{- $ingress := ( include "common.ingressurl.ricxapp" . ) -}} - {{- if .Values.dashboard.properties.anrxapp.url.override -}} - {{- printf "%s" .Values.dashboard.properties.anrxapp.url.override -}} + {{- if .Values.dashboard.properties.anrxapp.url.prefix -}} + {{- printf "%s" .Values.dashboard.properties.anrxapp.url.prefix -}} {{- else -}} - {{- printf "http://%s/anr%s" $ingress .Values.dashboard.properties.anrxapp.url.suffix -}} + {{- printf "http://%s/anr" $ingress -}} {{- end -}} {{- end -}} -{{- define "dashboard.endpoint.e2mgr" -}} +{{- define "dashboard.prefix.e2mgr" -}} {{- $ingress := ( include "common.ingressurl.ricplt" . ) -}} - {{- if .Values.dashboard.properties.e2mgr.url.override -}} - {{- printf "%s" .Values.dashboard.properties.e2mgr.url.override -}} + {{- if .Values.dashboard.properties.e2mgr.url.prefix -}} + {{- printf "%s" .Values.dashboard.properties.e2mgr.url.prefix -}} {{- else -}} - {{- printf "http://%s/e2mgr%s" $ingress .Values.dashboard.properties.e2mgr.url.suffix -}} + {{- printf "http://%s/e2mgr" $ingress -}} {{- end -}} {{- end -}} - -{{- define "dashboard.endpoint.xappmgr" -}} + +{{- define "dashboard.prefix.appmgr" -}} {{- $ingress := ( include "common.ingressurl.ricplt" . ) -}} - {{- if .Values.dashboard.properties.xappmgr.url.override -}} - {{- printf "%s" .Values.dashboard.properties.xappmgr.url.override -}} + {{- if .Values.dashboard.properties.appmgr.url.prefix -}} + {{- printf "%s" .Values.dashboard.properties.appmgr.url.prefix -}} {{- else -}} - {{- printf "http://%s/appmgr%s" $ingress .Values.dashboard.properties.xappmgr.url.suffix -}} + {{- printf "http://%s/appmgr" $ingress -}} {{- end -}} {{- end -}} diff --git a/ric-aux/80-Auxiliary-Functions/helm/dashboard/templates/appconfig.yaml b/ric-aux/80-Auxiliary-Functions/helm/dashboard/templates/appconfig.yaml index 2b68de28..e6358c56 100644 --- a/ric-aux/80-Auxiliary-Functions/helm/dashboard/templates/appconfig.yaml +++ b/ric-aux/80-Auxiliary-Functions/helm/dashboard/templates/appconfig.yaml @@ -26,9 +26,11 @@ data: application.properties: | # appconfig.yaml server.port = {{ .Values.dashboard.service.http.containerPort }} - a1med.url = {{ include "dashboard.endpoint.a1mediator" . }} - anrxapp.url = {{ include "dashboard.endpoint.anrxapp" . }} - e2mgr.url = {{ include "dashboard.endpoint.e2mgr" . }} - # mock names for R1 testing, removing this entry disables the mock - e2mgr.mock.rannames = {{ .Values.dashboard.properties.e2mgr.mock.rannames }} - xappmgr.url = {{ include "dashboard.endpoint.xappmgr" . }} + a1med.url.prefix = {{ include "dashboard.prefix.a1mediator" . }} + a1med.url.suffix = {{ .Values.dashboard.properties.a1med.url.suffix }} + anrxapp.url.prefix = {{ include "dashboard.prefix.anrxapp" . }} + anrxapp.url.suffix = {{ .Values.dashboard.properties.anrxapp.url.suffix }} + appmgr.url.prefix = {{ include "dashboard.prefix.appmgr" . }} + appmgr.url.suffix = {{ .Values.dashboard.properties.appmgr.url.suffix }} + e2mgr.url.prefix = {{ include "dashboard.prefix.e2mgr" . }} + e2mgr.url.suffix = {{ .Values.dashboard.properties.e2mgr.url.suffix }} diff --git a/ric-aux/80-Auxiliary-Functions/helm/dashboard/values.yaml b/ric-aux/80-Auxiliary-Functions/helm/dashboard/values.yaml index 17188ac5..77a3a5cd 100644 --- a/ric-aux/80-Auxiliary-Functions/helm/dashboard/values.yaml +++ b/ric-aux/80-Auxiliary-Functions/helm/dashboard/values.yaml @@ -23,8 +23,8 @@ repositoryCred: docker-reg-cred dashboard: image: - name: ric-dash-be - tag: 1.0.5 + name: ric-dashboard + tag: 1.2.0 replicaCount: 1 service: http: @@ -33,34 +33,28 @@ dashboard: containerPort: 8080 # config URLs must be specified at deployment properties: - # These URLs use K8S/Kong service names + # The URL prefixes use K8S/Kong service names a1med: - # The URL will be provided by the RIC common template url: - # no suffix required - suffix: "" - # You can override the URL using the following option - # override: http://ricplt-entry/a1mediator + # The default a1mediator endpoint is http://ricplt-entry/a1mediator + # You can override the a1mediator endpoint using the following option + # prefix: + suffix: '' anrxapp: - # The URL will be provided by the RIC common template url: - # no suffix required - suffix: "" - # You can override the URL using the following option - # override: http://ricxapp-entry/anr - e2mgr: - # The URL will be provided by the RIC common template + # The default anrxapp endpoint is http://ricxapp-entry/anr + # You can override the anrxapp endpoint using the following option + # prefix: + suffix: '' + appmgr: url: - # suffix must be "/v1" - suffix: "/v1" - # You can override the URL using the following option - # override: http://ricplt-entry/e2mgr/v1 - mock: - rannames: "" # mock with CSV; e.g., ABCD123456, EFGH123456 - xappmgr: - # The URL will be provided by the RIC common template + # The default appmgr endpoint is http://ricplt-entry/appmgr + # You can override the appmgr endpoint using the following option + # prefix: + suffix: /ric/v1 + e2mgr: url: - # suffix must be "/ric/v1" - suffix: "/ric/v1" - # You can override the URL using the following option - # override: http://ricplt-entry/appmgr/ric/v1 + # The default e2mgr endpoint is http://ricplt-entry/e2mgr + # You can override the e2mgr endpoint using the following option + # prefix: + suffix: /v1 -- 2.16.6