From d052a253e88bd1d15557b21e8c97334092d0771a Mon Sep 17 00:00:00 2001 From: RehanRaza Date: Wed, 27 May 2020 14:56:30 +0200 Subject: [PATCH] Enable https in nonrtric A1 controller Change-Id: Id53bc7f8506eb897f9060b15db08a5901ab769a0 Issue-ID: NONRTRIC-231 Signed-off-by: RehanRaza --- nonrtric/RECIPE_EXAMPLE/example_recipe.yaml | 17 ++++++++++++++--- nonrtric/helm/a1controller/templates/deployment.yaml | 15 +++++++++++---- nonrtric/helm/a1controller/templates/service.yaml | 11 +++++++++-- nonrtric/helm/a1controller/values.yaml | 17 ++++++++++++++--- .../resources/config/application_configuration.json | 2 +- 5 files changed, 49 insertions(+), 13 deletions(-) diff --git a/nonrtric/RECIPE_EXAMPLE/example_recipe.yaml b/nonrtric/RECIPE_EXAMPLE/example_recipe.yaml index 4a7d3f0b..77582e51 100644 --- a/nonrtric/RECIPE_EXAMPLE/example_recipe.yaml +++ b/nonrtric/RECIPE_EXAMPLE/example_recipe.yaml @@ -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: diff --git a/nonrtric/helm/a1controller/templates/deployment.yaml b/nonrtric/helm/a1controller/templates/deployment.yaml index d84bb37b..c5eb5964 100644 --- a/nonrtric/helm/a1controller/templates/deployment.yaml +++ b/nonrtric/helm/a1controller/templates/deployment.yaml @@ -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 diff --git a/nonrtric/helm/a1controller/templates/service.yaml b/nonrtric/helm/a1controller/templates/service.yaml index cb6ad895..5259bb84 100644 --- a/nonrtric/helm/a1controller/templates/service.yaml +++ b/nonrtric/helm/a1controller/templates/service.yaml @@ -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 }} diff --git a/nonrtric/helm/a1controller/values.yaml b/nonrtric/helm/a1controller/values.yaml index 6b0e5d37..80af1f0c 100644 --- a/nonrtric/helm/a1controller/values.yaml +++ b/nonrtric/helm/a1controller/values.yaml @@ -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 diff --git a/nonrtric/helm/policymanagementservice/resources/config/application_configuration.json b/nonrtric/helm/policymanagementservice/resources/config/application_configuration.json index 4c3e18af..a0860c6e 100644 --- a/nonrtric/helm/policymanagementservice/resources/config/application_configuration.json +++ b/nonrtric/helm/policymanagementservice/resources/config/application_configuration.json @@ -3,7 +3,7 @@ "controller": [ { "name": "controller1", - "baseUrl": "http://a1controller:8282", + "baseUrl": "https://a1controller:8383", "userName": "admin", "password": "Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U" } -- 2.16.6