From a883648aaf18d40ae3c27b922d6815110ee48f4c Mon Sep 17 00:00:00 2001 From: wrider Date: Tue, 23 Jul 2019 17:07:52 -0400 Subject: [PATCH] Using common template port numbers Change-Id: I5be7f5219dd05bb07f13ff7f782faaaafa628e1e Signed-off-by: wrider --- .../helm/dashboard/templates/appconfig.yaml | 2 +- .../helm/dashboard/templates/deployment.yaml | 2 +- .../helm/dashboard/templates/service.yaml | 8 ++++---- ric-aux/80-Auxiliary-Functions/helm/dashboard/values.yaml | 11 ++++++----- ric-aux/80-Auxiliary-Functions/helm/kong-aux/values.yaml | 7 ++++++- .../helm/ves/templates/ingress-ves.yaml | 2 +- .../helm/ves/templates/ves-deployment.yaml | 6 +++--- .../helm/ves/templates/ves-service.yaml | 12 ++++++------ 8 files changed, 28 insertions(+), 22 deletions(-) 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 e6358c56..b2ec7877 100644 --- a/ric-aux/80-Auxiliary-Functions/helm/dashboard/templates/appconfig.yaml +++ b/ric-aux/80-Auxiliary-Functions/helm/dashboard/templates/appconfig.yaml @@ -25,7 +25,7 @@ data: # this key becomes the filename when mounted application.properties: | # appconfig.yaml - server.port = {{ .Values.dashboard.service.http.containerPort }} + server.port = {{ include "common.serviceport.dashboard.container" . }} a1med.url.prefix = {{ include "dashboard.prefix.a1mediator" . }} a1med.url.suffix = {{ .Values.dashboard.properties.a1med.url.suffix }} anrxapp.url.prefix = {{ include "dashboard.prefix.anrxapp" . }} diff --git a/ric-aux/80-Auxiliary-Functions/helm/dashboard/templates/deployment.yaml b/ric-aux/80-Auxiliary-Functions/helm/dashboard/templates/deployment.yaml index adacef25..efe01062 100644 --- a/ric-aux/80-Auxiliary-Functions/helm/dashboard/templates/deployment.yaml +++ b/ric-aux/80-Auxiliary-Functions/helm/dashboard/templates/deployment.yaml @@ -46,7 +46,7 @@ spec: imagePullPolicy: {{ include "common.pullPolicy" . }} ports: - name: http - containerPort: {{ .Values.dashboard.service.http.containerPort }} + containerPort: {{ include "common.serviceport.dashboard.container" . }} protocol: TCP volumeMounts: - name: application-config diff --git a/ric-aux/80-Auxiliary-Functions/helm/dashboard/templates/service.yaml b/ric-aux/80-Auxiliary-Functions/helm/dashboard/templates/service.yaml index b35e4085..88dc203a 100644 --- a/ric-aux/80-Auxiliary-Functions/helm/dashboard/templates/service.yaml +++ b/ric-aux/80-Auxiliary-Functions/helm/dashboard/templates/service.yaml @@ -28,10 +28,10 @@ metadata: spec: type: NodePort ports: - - port: {{ .Values.dashboard.service.http.containerPort }} - nodePort: {{ .Values.dashboard.service.http.nodeport }} - targetPort: http - protocol: TCP + - port: {{ include "common.serviceport.dashboard.container" . }} + nodePort: {{ include "common.serviceport.dashboard.http" . }} + protocol: "TCP" + targetPort: "http" selector: app: {{ include "common.namespace.aux" . }}-{{ include "common.name.dashboard" . }} release: {{ .Release.Name }} diff --git a/ric-aux/80-Auxiliary-Functions/helm/dashboard/values.yaml b/ric-aux/80-Auxiliary-Functions/helm/dashboard/values.yaml index 77a3a5cd..45dc0a11 100644 --- a/ric-aux/80-Auxiliary-Functions/helm/dashboard/values.yaml +++ b/ric-aux/80-Auxiliary-Functions/helm/dashboard/values.yaml @@ -26,11 +26,12 @@ dashboard: name: ric-dashboard tag: 1.2.0 replicaCount: 1 - service: - http: - nodeport: 30080 - # Tomcat listens here - containerPort: 8080 + + # Service ports are now defined in + # ric-common/Common-Template/helm/ric-common/templates/_ports.tpl file. + # If need to change a service port, make the code change necessary, then + # update the _ports.tpl file with the new port number. + # config URLs must be specified at deployment properties: # The URL prefixes use K8S/Kong service names diff --git a/ric-aux/80-Auxiliary-Functions/helm/kong-aux/values.yaml b/ric-aux/80-Auxiliary-Functions/helm/kong-aux/values.yaml index f55709b3..02d97197 100644 --- a/ric-aux/80-Auxiliary-Functions/helm/kong-aux/values.yaml +++ b/ric-aux/80-Auxiliary-Functions/helm/kong-aux/values.yaml @@ -16,4 +16,9 @@ kong: http: nodePort: 32080 tls: - nodePort: 32443 \ No newline at end of file + nodePort: 32443 + # These port numbers MUST matche with what's in + # ric-common/Common-Template/helm/ric-common/templates/_ingresscontroller.tpl file. + # If need to change a proxy port here, do not forget to update the + # _ingresscontroller.tpl file with the new port number. + diff --git a/ric-aux/80-Auxiliary-Functions/helm/ves/templates/ingress-ves.yaml b/ric-aux/80-Auxiliary-Functions/helm/ves/templates/ingress-ves.yaml index 7a91f7d4..6db96ded 100644 --- a/ric-aux/80-Auxiliary-Functions/helm/ves/templates/ingress-ves.yaml +++ b/ric-aux/80-Auxiliary-Functions/helm/ves/templates/ingress-ves.yaml @@ -9,4 +9,4 @@ spec: - path: /vescollector backend: serviceName: xdcae-ves-collector - servicePort: 8080 + servicePort: {{ include "common.serviceport.ves.http.container" . }} diff --git a/ric-aux/80-Auxiliary-Functions/helm/ves/templates/ves-deployment.yaml b/ric-aux/80-Auxiliary-Functions/helm/ves/templates/ves-deployment.yaml index e730cf66..6d79ac76 100644 --- a/ric-aux/80-Auxiliary-Functions/helm/ves/templates/ves-deployment.yaml +++ b/ric-aux/80-Auxiliary-Functions/helm/ves/templates/ves-deployment.yaml @@ -58,9 +58,9 @@ spec: - name: {{ include "common.namespace" . }}-{{include "common.name" . }} image: {{ .Values.ves.onapRepository }}/{{ .Values.ves.image.name }}:{{ .Values.ves.image.tag }} ports: - - containerPort: 8080 + - containerPort: {{ include "common.serviceport.ves.http.container" . }} protocol: TCP - - containerPort: 8443 + - containerPort: {{ include "common.serviceport.ves.https.container" . }} protocol: TCP env: - name: CONSUL_HOST @@ -82,7 +82,7 @@ spec: readinessProbe: httpGet: path: "/healthcheck" - port: 8080 + port: {{ include "common.serviceport.ves.http.container" . }} scheme: HTTP initialDelaySeconds: 5 timeoutSeconds: 1 diff --git a/ric-aux/80-Auxiliary-Functions/helm/ves/templates/ves-service.yaml b/ric-aux/80-Auxiliary-Functions/helm/ves/templates/ves-service.yaml index 718cd412..cc66510f 100644 --- a/ric-aux/80-Auxiliary-Functions/helm/ves/templates/ves-service.yaml +++ b/ric-aux/80-Auxiliary-Functions/helm/ves/templates/ves-service.yaml @@ -30,14 +30,14 @@ spec: ports: - name: xport-t-8080 protocol: TCP - port: 8080 - targetPort: 8080 - nodePort: 30235 + port: {{ include "common.serviceport.ves.http.container" . }} + targetPort: {{ include "common.serviceport.ves.http.container" . }} + nodePort: {{ include "common.serviceport.ves.http" . }} - name: xport-t-8443 protocol: TCP - port: 8443 - targetPort: 8443 - nodePort: 30417 + port: {{ include "common.serviceport.ves.https.container" . }} + targetPort: {{ include "common.serviceport.ves.https.container" . }} + nodePort: {{ include "common.serviceport.ves.https" . }} selector: app: dcae-ves-collector type: NodePort -- 2.16.6