Enable https in nonrtric A1 controller 70/3870/3
authorRehanRaza <muhammad.rehan.raza@est.tech>
Wed, 27 May 2020 12:56:30 +0000 (14:56 +0200)
committerRehanRaza <muhammad.rehan.raza@est.tech>
Thu, 28 May 2020 08:09:27 +0000 (10:09 +0200)
Change-Id: Id53bc7f8506eb897f9060b15db08a5901ab769a0
Issue-ID: NONRTRIC-231
Signed-off-by: RehanRaza <muhammad.rehan.raza@est.tech>
nonrtric/RECIPE_EXAMPLE/example_recipe.yaml
nonrtric/helm/a1controller/templates/deployment.yaml
nonrtric/helm/a1controller/templates/service.yaml
nonrtric/helm/a1controller/values.yaml
nonrtric/helm/policymanagementservice/resources/config/application_configuration.json

index 4a7d3f0..77582e5 100644 (file)
@@ -32,11 +32,22 @@ a1controller:
     image:
       registry: 'nexus3.o-ran-sc.org:10004/o-ran-sc'
       name: nonrtric-a1-controller
-      tag: 1.7.4
+      tag: 1.7.5
     replicaCount: 1
     service:
-      internalPort: 8181
-      externalPort: 8282
+      allowHttp: true
+      httpName: http
+      internalPort1: 8282
+      targetPort1: 8181
+      httpsName: https
+      internalPort2: 8383
+      targetPort2: 8443
+    liveness:
+      initialDelaySeconds: 60
+      periodSeconds: 10
+    readiness:
+      initialDelaySeconds: 60
+      periodSeconds: 10
 
 a1simulator:
   a1simulator:
index d84bb37..c5eb596 100644 (file)
@@ -52,13 +52,20 @@ spec:
           command:
             - /opt/onap/sdnc/bin/startODL.sh
           ports:
-            - containerPort: {{ .Values.a1controller.service.internalPort }}
+            - containerPort: {{ .Values.a1controller.service.targetPort1 }}
+              protocol: TCP
+            - containerPort: {{ .Values.a1controller.service.targetPort2 }}
               protocol: TCP
           readinessProbe:
             tcpSocket:
-              port: {{ .Values.a1controller.service.internalPort }}
-            initialDelaySeconds: 15
-            periodSeconds: 15
+              port: {{ .Values.a1controller.service.targetPort1 }}
+            initialDelaySeconds: {{ .Values.a1controller.readiness.initialDelaySeconds }}
+            periodSeconds: {{ .Values.a1controller.readiness.periodSeconds }}
+          livenessProbe:
+            tcpSocket:
+              port: {{ .Values.a1controller.service.targetPort1 }}
+            initialDelaySeconds: {{ .Values.a1controller.liveness.initialDelaySeconds }}
+            periodSeconds: {{ .Values.a1controller.liveness.periodSeconds }}
 ---
 apiVersion: apps/v1
 kind: Deployment
index cb6ad89..5259bb8 100644 (file)
@@ -27,9 +27,16 @@ metadata:
 spec:
   type: ClusterIP
   ports:
-    - port: {{ .Values.a1controller.service.externalPort }}
+    {{if eq .Values.a1controller.service.allowHttp true -}}
+    - name: {{ index .Values.a1controller.service.httpName }}
+      port: {{ .Values.a1controller.service.internalPort1 }}
+      targetPort: {{ .Values.a1controller.service.targetPort1 }}
+      protocol: TCP
+    {{- end }}
+    - name: {{ index .Values.a1controller.service.httpsName }}
+      port: {{ .Values.a1controller.service.internalPort2 }}
+      targetPort: {{ .Values.a1controller.service.targetPort2 }}
       protocol: TCP
-      targetPort: {{ .Values.a1controller.service.internalPort }}
   selector:
     app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.a1controller" . }}
     release: {{ .Release.Name }}
index 6b0e5d3..80af1f0 100644 (file)
@@ -22,8 +22,19 @@ a1controller:
   image:
     registry: 'nexus3.o-ran-sc.org:10002/o-ran-sc'
     name: nonrtric-a1-controller
-    tag: 1.7.4
+    tag: 1.7.5
   replicaCount: 1
   service:
-    internalPort: 8181
-    externalPort: 8282
\ No newline at end of file
+    allowHttp: true
+    httpName: http
+    internalPort1: 8282
+    targetPort1: 8181
+    httpsName: https
+    internalPort2: 8383
+    targetPort2: 8443
+  liveness:
+    initialDelaySeconds: 60
+    periodSeconds: 10
+  readiness:
+    initialDelaySeconds: 60
+    periodSeconds: 10
index 4c3e18a..a0860c6 100644 (file)
@@ -3,7 +3,7 @@
       "controller": [
          {
             "name": "controller1",
-            "baseUrl": "http://a1controller:8282",
+            "baseUrl": "https://a1controller:8383",
             "userName": "admin",
             "password": "Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U"
          }