Using common template port numbers 47/547/1
authorwrider <lji@research.att.com>
Tue, 23 Jul 2019 21:07:52 +0000 (17:07 -0400)
committerwrider <lji@research.att.com>
Tue, 23 Jul 2019 21:11:18 +0000 (17:11 -0400)
Change-Id: I5be7f5219dd05bb07f13ff7f782faaaafa628e1e
Signed-off-by: wrider <lji@research.att.com>
ric-aux/80-Auxiliary-Functions/helm/dashboard/templates/appconfig.yaml
ric-aux/80-Auxiliary-Functions/helm/dashboard/templates/deployment.yaml
ric-aux/80-Auxiliary-Functions/helm/dashboard/templates/service.yaml
ric-aux/80-Auxiliary-Functions/helm/dashboard/values.yaml
ric-aux/80-Auxiliary-Functions/helm/kong-aux/values.yaml
ric-aux/80-Auxiliary-Functions/helm/ves/templates/ingress-ves.yaml
ric-aux/80-Auxiliary-Functions/helm/ves/templates/ves-deployment.yaml
ric-aux/80-Auxiliary-Functions/helm/ves/templates/ves-service.yaml

index e6358c5..b2ec787 100644 (file)
@@ -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" . }}
index adacef2..efe0106 100644 (file)
@@ -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
index b35e408..88dc203 100644 (file)
@@ -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 }}
index 77a3a5c..45dc0a1 100644 (file)
@@ -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
index f55709b..02d9719 100644 (file)
@@ -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.
+
index 7a91f7d..6db96de 100644 (file)
@@ -9,4 +9,4 @@ spec:
       - path: /vescollector
         backend:
           serviceName: xdcae-ves-collector
-          servicePort: 8080
+          servicePort: {{ include "common.serviceport.ves.http.container" . }}
index e730cf6..6d79ac7 100644 (file)
@@ -58,9 +58,9 @@ spec:
       - name: {{ include "common.namespace" . }}-{{include "common.name" . }}\r
         image: {{ .Values.ves.onapRepository }}/{{ .Values.ves.image.name }}:{{ .Values.ves.image.tag }}\r
         ports:\r
-        - containerPort: 8080\r
+        - containerPort: {{ include "common.serviceport.ves.http.container" . }}\r
           protocol: TCP\r
-        - containerPort: 8443\r
+        - containerPort: {{ include "common.serviceport.ves.https.container" . }}\r
           protocol: TCP\r
         env:\r
         - name: CONSUL_HOST\r
@@ -82,7 +82,7 @@ spec:
         readinessProbe:\r
           httpGet:\r
             path: "/healthcheck"\r
-            port: 8080\r
+            port: {{ include "common.serviceport.ves.http.container" . }}\r
             scheme: HTTP\r
           initialDelaySeconds: 5\r
           timeoutSeconds: 1\r
index 718cd41..cc66510 100644 (file)
@@ -30,14 +30,14 @@ spec:
   ports:\r
   - name: xport-t-8080\r
     protocol: TCP\r
-    port: 8080\r
-    targetPort: 8080\r
-    nodePort: 30235\r
+    port: {{ include "common.serviceport.ves.http.container" . }}\r
+    targetPort: {{ include "common.serviceport.ves.http.container" . }}\r
+    nodePort: {{ include "common.serviceport.ves.http" . }}\r
   - name: xport-t-8443\r
     protocol: TCP\r
-    port: 8443\r
-    targetPort: 8443\r
-    nodePort: 30417\r
+    port: {{ include "common.serviceport.ves.https.container" . }}\r
+    targetPort: {{ include "common.serviceport.ves.https.container" . }}\r
+    nodePort: {{ include "common.serviceport.ves.https" . }}\r
   selector:\r
     app: dcae-ves-collector\r
   type: NodePort\r