From f5c959cfbd1c8101730d25ba857075514a72f6b0 Mon Sep 17 00:00:00 2001 From: ecaiyanlinux Date: Wed, 15 Dec 2021 15:06:42 +0100 Subject: [PATCH] Add ORU ODU helm charts to nonrtric deployement odusliceassurance oruclosedlooprecovery Signed-off-by: ecaiyanlinux Issue-ID: NONRTRIC-691 Change-Id: I565d62bb3f7767fe3cf94e9760b09c374938bbb4 --- bin/deploy-nonrtric | 2 +- bin/undeploy-nonrtric | 2 +- nonrtric/RECIPE_EXAMPLE/example_recipe.yaml | 37 ++++++++++ nonrtric/helm/nonrtric/Chart.yaml | 9 +++ nonrtric/helm/nonrtric/values.yaml | 3 + nonrtric/helm/odusliceassurance/Chart.yaml | 21 ++++++ nonrtric/helm/odusliceassurance/requirements.yaml | 20 ++++++ .../odusliceassurance/templates/deployment.yaml | 65 ++++++++++++++++++ .../helm/odusliceassurance/templates/service.yaml | 37 ++++++++++ nonrtric/helm/odusliceassurance/values.yaml | 38 +++++++++++ nonrtric/helm/oruclosedlooprecovery/Chart.yaml | 21 ++++++ .../helm/oruclosedlooprecovery/requirements.yaml | 20 ++++++ .../resources/config/o-ru-to-o-du-map.csv | 11 +++ .../oruclosedlooprecovery/templates/configmap.yaml | 29 ++++++++ .../templates/deployment.yaml | 78 ++++++++++++++++++++++ .../oruclosedlooprecovery/templates/service.yaml | 37 ++++++++++ nonrtric/helm/oruclosedlooprecovery/values.yaml | 41 ++++++++++++ .../templates/_odusliceassurance.tpl | 24 +++++++ .../templates/_oruclosedlooprecovery.tpl | 24 +++++++ 19 files changed, 517 insertions(+), 2 deletions(-) create mode 100644 nonrtric/helm/odusliceassurance/Chart.yaml create mode 100644 nonrtric/helm/odusliceassurance/requirements.yaml create mode 100644 nonrtric/helm/odusliceassurance/templates/deployment.yaml create mode 100644 nonrtric/helm/odusliceassurance/templates/service.yaml create mode 100644 nonrtric/helm/odusliceassurance/values.yaml create mode 100644 nonrtric/helm/oruclosedlooprecovery/Chart.yaml create mode 100644 nonrtric/helm/oruclosedlooprecovery/requirements.yaml create mode 100644 nonrtric/helm/oruclosedlooprecovery/resources/config/o-ru-to-o-du-map.csv create mode 100644 nonrtric/helm/oruclosedlooprecovery/templates/configmap.yaml create mode 100644 nonrtric/helm/oruclosedlooprecovery/templates/deployment.yaml create mode 100644 nonrtric/helm/oruclosedlooprecovery/templates/service.yaml create mode 100644 nonrtric/helm/oruclosedlooprecovery/values.yaml create mode 100644 ric-common/Common-Template/helm/nonrtric-common/templates/_odusliceassurance.tpl create mode 100644 ric-common/Common-Template/helm/nonrtric-common/templates/_oruclosedlooprecovery.tpl diff --git a/bin/deploy-nonrtric b/bin/deploy-nonrtric index 775a311e..cdf993e3 100755 --- a/bin/deploy-nonrtric +++ b/bin/deploy-nonrtric @@ -106,7 +106,7 @@ rm $HELM_LOCAL_REPO/* helm repo remove local $ROOT_DIR/prepare-common-templates -COMPONENTS="controlpanel a1controller a1simulator policymanagementservice informationservice rappcatalogueservice nonrtricgateway dmaapadapterservice dmaapmediatorservice helmmanager" +COMPONENTS="controlpanel a1controller a1simulator policymanagementservice informationservice rappcatalogueservice nonrtricgateway dmaapadapterservice dmaapmediatorservice helmmanager oruclosedlooprecovery odusliceassurance" for component in $COMPONENTS; do echo "Packaging NONRTRIC component [$component]" helm dep up $ROOT_DIR/../nonrtric/helm/$component diff --git a/bin/undeploy-nonrtric b/bin/undeploy-nonrtric index b3b2cc91..a97f888a 100755 --- a/bin/undeploy-nonrtric +++ b/bin/undeploy-nonrtric @@ -18,7 +18,7 @@ # This script to undeploy the NONRTRIC -COMPONENTS="controlpanel a1controller a1simulator policymanagementservice informationservice rappcatalogueservice nonrtricgateway dmaapadapterservice dmaapmediatorservice helmmanager" +COMPONENTS="controlpanel a1controller a1simulator policymanagementservice informationservice rappcatalogueservice nonrtricgateway dmaapadapterservice dmaapmediatorservice helmmanager oruclosedlooprecovery odusliceassurance" RECIPE_NAMESPACE=$(kubectl get cm --all-namespaces | grep nonrtric-recipe | awk '{print $1}') kubectl get configmap -n $RECIPE_NAMESPACE nonrtric-recipe -o jsonpath='{.data.recipe}' > /tmp/recipe.yaml diff --git a/nonrtric/RECIPE_EXAMPLE/example_recipe.yaml b/nonrtric/RECIPE_EXAMPLE/example_recipe.yaml index 1a0edb11..e856e8ea 100644 --- a/nonrtric/RECIPE_EXAMPLE/example_recipe.yaml +++ b/nonrtric/RECIPE_EXAMPLE/example_recipe.yaml @@ -32,6 +32,8 @@ nonrtric: installDmaapadapterservice: true installDmaapmediatorservice: true installHelmmanager: true + installOruclosedlooprecovery: true + installOdusliceassurance: true volume1: # Set the size to 0 if you do not need the volume (if you are using Dynamic Volume Provisioning) size: 2Gi @@ -301,3 +303,38 @@ helmmanager: # The alternative use a dynamic volume provisioner in the cluster. Storage class can then be for instance 'standard' or 'gluster-fs' (depeneds on which classes that are available) size: 1Gi storageClassName: helmmanager-storage + +odusliceassurance: + odusliceassurance: + imagePullPolicy: IfNotPresent + image: + registry: "nexus3.o-ran-sc.org:10002/o-ran-sc" + name: "nonrtric-o-du-slice-assurance" + tag: 1.0.0 + env: + mr_host: "http://onap-dmaap" + mr_port: "3904" + sdnr_address: "http://sdnr:8181" + sdnr_user: "admin" + sdnr_password: "Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U" + log_level: "Info" + polltime: "10" + +oruclosedlooprecovery: + oruclosedlooprecovery: + imagePullPolicy: IfNotPresent + image: + registry: "nexus3.o-ran-sc.org:10002/o-ran-sc" + name: "nonrtric-o-ru-closed-loop-recovery" + tag: 1.0.0 + env: + consumer_host: "http://mrproducer" + consumer_port: "8095" + consumer_cert_path: "security/producer.crt" + consumer_key_path: "security/producer.key" + info_coord_addr: "http://ics:8083" + sdnr_address: "http://sdnr:8282" + sdnr_user: "admin" + sdnr_password: "Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U" + oru_to_odu_map_file: "o-ru-to-o-du-map.csv" + log_level: "Info" diff --git a/nonrtric/helm/nonrtric/Chart.yaml b/nonrtric/helm/nonrtric/Chart.yaml index 76422fff..73072293 100644 --- a/nonrtric/helm/nonrtric/Chart.yaml +++ b/nonrtric/helm/nonrtric/Chart.yaml @@ -75,3 +75,12 @@ dependencies: repository: "@local" condition: nonrtric.installHelmmanager + - name: odusliceassurance + version: ~1.0.0 + repository: "@local" + condition: nonrtric.installOdusliceassurance + + - name: oruclosedlooprecovery + version: ~1.0.0 + repository: "@local" + condition: nonrtric.installOruclosedlooprecovery diff --git a/nonrtric/helm/nonrtric/values.yaml b/nonrtric/helm/nonrtric/values.yaml index 4b07fb95..d33f23bc 100644 --- a/nonrtric/helm/nonrtric/values.yaml +++ b/nonrtric/helm/nonrtric/values.yaml @@ -25,6 +25,9 @@ nonrtric: installDmaapadapterservice: true installDmaapmediatorservice: true installHelmmanager: true + installOruclosedlooprecovery: true + installOdusliceassurance: true + volume1: size: 1Gi storageClassName: volume1 diff --git a/nonrtric/helm/odusliceassurance/Chart.yaml b/nonrtric/helm/odusliceassurance/Chart.yaml new file mode 100644 index 00000000..f506b969 --- /dev/null +++ b/nonrtric/helm/odusliceassurance/Chart.yaml @@ -0,0 +1,21 @@ +################################################################################ +# Copyright (c) 2021 Nordix Foundation. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +################################################################################ + +apiVersion: v1 +appVersion: "2.0.0" +description: A Helm chart for odu slice assurance +name: odusliceassurance +version: 1.0.0 diff --git a/nonrtric/helm/odusliceassurance/requirements.yaml b/nonrtric/helm/odusliceassurance/requirements.yaml new file mode 100644 index 00000000..69b4db6d --- /dev/null +++ b/nonrtric/helm/odusliceassurance/requirements.yaml @@ -0,0 +1,20 @@ +################################################################################ +# Copyright (c) 2021 Nordix Foundation. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +################################################################################ + +dependencies: + - name: nonrtric-common + version: ^2.0.0 + repository: "@local" diff --git a/nonrtric/helm/odusliceassurance/templates/deployment.yaml b/nonrtric/helm/odusliceassurance/templates/deployment.yaml new file mode 100644 index 00000000..819a725c --- /dev/null +++ b/nonrtric/helm/odusliceassurance/templates/deployment.yaml @@ -0,0 +1,65 @@ +################################################################################ +# Copyright (c) 2021 Nordix Foundation. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +################################################################################ + +kind: Deployment +apiVersion: apps/v1 +metadata: + name: {{ include "common.name.odusliceassurance" . }} + namespace: {{ include "common.namespace.nonrtric" . }} + generation: 1 + labels: + app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.odusliceassurance" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} + annotations: + deployment.kubernetes.io/revision: '1' +spec: + replicas: 1 + selector: + matchLabels: + app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.odusliceassurance" . }} + release: {{ .Release.Name }} + template: + metadata: + labels: + app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.odusliceassurance" . }} + release: {{ .Release.Name }} + spec: + hostname: {{ include "common.name.odusliceassurance" . }} + containers: + - name: {{ include "common.container.odusliceassurance" . }} + image: {{ .Values.odusliceassurance.image.registry }}/{{ .Values.odusliceassurance.image.name }}:{{ .Values.odusliceassurance.image.tag }} + imagePullPolicy: {{ .Values.odusliceassurance.imagePullPolicy }} + ports: + - containerPort: 80 + protocol: TCP + env: + - name: MR_HOST + value: "{{ .Values.odusliceassurance.env.mr_host }}" + - name: MR_PORT + value: "{{ .Values.odusliceassurance.env.mr_port }}" + - name: SDNR_ADDRESS + value: "{{ .Values.odusliceassurance.env.sdnr_address }}" + - name: SDNR_USER + value: "{{ .Values.odusliceassurance.env.sdnr_user }}" + - name: SDNR_PASSWORD + value: "{{ .Values.odusliceassurance.env.sdnr_password }}" + - name: LOG_LEVEL + value: "{{ .Values.odusliceassurance.env.log_level }}" + - name: POLLTIME + value: "{{ .Values.odusliceassurance.env.polltime }}" + diff --git a/nonrtric/helm/odusliceassurance/templates/service.yaml b/nonrtric/helm/odusliceassurance/templates/service.yaml new file mode 100644 index 00000000..d4d29f28 --- /dev/null +++ b/nonrtric/helm/odusliceassurance/templates/service.yaml @@ -0,0 +1,37 @@ +################################################################################ +# Copyright (c) 2021 Nordix Foundation. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +################################################################################ + +kind: Service +apiVersion: v1 +metadata: + name: {{ include "common.name.odusliceassurance" . }} + namespace: {{ include "common.namespace.nonrtric" . }} + labels: + app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.odusliceassurance" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + ports: + {{if eq .Values.odusliceassurance.service.allowHttp true -}} + - name: {{ index .Values.odusliceassurance.service.httpName }} + port: {{ .Values.odusliceassurance.service.port }} + protocol: TCP + {{- end }} + selector: + app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.odusliceassurance" . }} + release: {{ .Release.Name }} + type: ClusterIP diff --git a/nonrtric/helm/odusliceassurance/values.yaml b/nonrtric/helm/odusliceassurance/values.yaml new file mode 100644 index 00000000..8479912a --- /dev/null +++ b/nonrtric/helm/odusliceassurance/values.yaml @@ -0,0 +1,38 @@ +################################################################################ +# Copyright (c) 2021 Nordix Foundation. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +################################################################################ + +# Default values for odu slice assurance. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +odusliceassurance: + imagePullPolicy: IfNotPresent + image: + registry: 'nexus3.o-ran-sc.org:10002/o-ran-sc' + name: nonrtric-o-du-slice-assurance + tag: 1.0.0 + service: + httpName: web + allowHttp: true + port: 80 + env: + mr_host: "http://onap-dmaap" + mr_port: "3904" + sdnr_address: "http://sdnr:8181" + sdnr_user: "admin" + sdnr_password: "Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U" + log_level: "Info" + polltime: "10" diff --git a/nonrtric/helm/oruclosedlooprecovery/Chart.yaml b/nonrtric/helm/oruclosedlooprecovery/Chart.yaml new file mode 100644 index 00000000..df25c817 --- /dev/null +++ b/nonrtric/helm/oruclosedlooprecovery/Chart.yaml @@ -0,0 +1,21 @@ +################################################################################ +# Copyright (c) 2021 Nordix Foundation. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +################################################################################ + +apiVersion: v1 +appVersion: "2.0.0" +description: A Helm chart for oru closed loop recovery +name: oruclosedlooprecovery +version: 1.0.0 diff --git a/nonrtric/helm/oruclosedlooprecovery/requirements.yaml b/nonrtric/helm/oruclosedlooprecovery/requirements.yaml new file mode 100644 index 00000000..69b4db6d --- /dev/null +++ b/nonrtric/helm/oruclosedlooprecovery/requirements.yaml @@ -0,0 +1,20 @@ +################################################################################ +# Copyright (c) 2021 Nordix Foundation. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +################################################################################ + +dependencies: + - name: nonrtric-common + version: ^2.0.0 + repository: "@local" diff --git a/nonrtric/helm/oruclosedlooprecovery/resources/config/o-ru-to-o-du-map.csv b/nonrtric/helm/oruclosedlooprecovery/resources/config/o-ru-to-o-du-map.csv new file mode 100644 index 00000000..951337af --- /dev/null +++ b/nonrtric/helm/oruclosedlooprecovery/resources/config/o-ru-to-o-du-map.csv @@ -0,0 +1,11 @@ +ERICSSON-O-RU-11220,HCL-O-DU-1122 +ERICSSON-O-RU-11221,HCL-O-DU-1122 +ERICSSON-O-RU-11222,HCL-O-DU-1122 +ERICSSON-O-RU-11223,HCL-O-DU-1122 +ERICSSON-O-RU-11223,HCL-O-DU-1122 +ERICSSON-O-RU-11224,HCL-O-DU-1123 +ERICSSON-O-RU-11225,HCL-O-DU-1123 +ERICSSON-O-RU-11226,HCL-O-DU-1123 +ERICSSON-O-RU-11227,HCL-O-DU-1124 +ERICSSON-O-RU-11228,HCL-O-DU-1125 +ERICSSON-O-RU-11229,HCL-O-DU-1125 \ No newline at end of file diff --git a/nonrtric/helm/oruclosedlooprecovery/templates/configmap.yaml b/nonrtric/helm/oruclosedlooprecovery/templates/configmap.yaml new file mode 100644 index 00000000..4f1ce19a --- /dev/null +++ b/nonrtric/helm/oruclosedlooprecovery/templates/configmap.yaml @@ -0,0 +1,29 @@ +################################################################################ +# Copyright (c) 2021 Nordix Foundation. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +################################################################################ + + +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "common.name.oruclosedlooprecovery" . }}-configmap-config + namespace: {{ include "common.namespace.nonrtric" . }} + labels: + app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.oruclosedlooprecovery" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +data: +{{ tpl (.Files.Glob "resources/config/*").AsConfig . | indent 2 }} \ No newline at end of file diff --git a/nonrtric/helm/oruclosedlooprecovery/templates/deployment.yaml b/nonrtric/helm/oruclosedlooprecovery/templates/deployment.yaml new file mode 100644 index 00000000..0f2d08c4 --- /dev/null +++ b/nonrtric/helm/oruclosedlooprecovery/templates/deployment.yaml @@ -0,0 +1,78 @@ +################################################################################ +# Copyright (c) 2021 Nordix Foundation. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +################################################################################ + +kind: Deployment +apiVersion: apps/v1 +metadata: + name: {{ include "common.name.oruclosedlooprecovery" . }} + namespace: {{ include "common.namespace.nonrtric" . }} + generation: 1 + labels: + app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.oruclosedlooprecovery" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} + annotations: + deployment.kubernetes.io/revision: '1' +spec: + replicas: 1 + selector: + matchLabels: + app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.oruclosedlooprecovery" . }} + release: {{ .Release.Name }} + template: + metadata: + labels: + app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.oruclosedlooprecovery" . }} + release: {{ .Release.Name }} + spec: + hostname: {{ include "common.name.oruclosedlooprecovery" . }} + containers: + - name: {{ include "common.container.oruclosedlooprecovery" . }} + image: {{ .Values.oruclosedlooprecovery.image.registry }}/{{ .Values.oruclosedlooprecovery.image.name }}:{{ .Values.oruclosedlooprecovery.image.tag }} + imagePullPolicy: {{ .Values.oruclosedlooprecovery.imagePullPolicy }} + ports: + - containerPort: 80 + protocol: TCP + env: + - name: CONSUMER_HOST + value: "{{ .Values.oruclosedlooprecovery.env.consumer_host }}" + - name: CONSUMER_PORT + value: "{{ .Values.oruclosedlooprecovery.env.consumer_port }}" + - name: CONSUMER_CERT_PATH + value: "{{ .Values.oruclosedlooprecovery.env.consumer_cert_path }}" + - name: CONSUMER_KEY_PATH + value: "{{ .Values.oruclosedlooprecovery.env.consumer_key_path }}" + - name: INFO_COORD_ADDR + value: "{{ .Values.oruclosedlooprecovery.env.info_coord_addr }}" + - name: SDNR_ADDRESS + value: "{{ .Values.oruclosedlooprecovery.env.sdnr_address }}" + - name: SDNR_USER + value: "{{ .Values.oruclosedlooprecovery.env.sdnr_user }}" + - name: SDNR_PASSWORD + value: "{{ .Values.oruclosedlooprecovery.env.sdnr_password }}" + - name: ORU_TO_ODU_MAP_FILE + value: "{{ .Values.oruclosedlooprecovery.env.oru_to_odu_map_file }}" + - name: LOG_LEVEL + value: "{{ .Values.oruclosedlooprecovery.env.log_level }}" + volumeMounts: + - name: {{ include "common.name.oruclosedlooprecovery" . }}-oru-config + mountPath: "/app/o-ru-to-o-du-map.csv" + subPath: "o-ru-to-o-du-map.csv" + volumes: + - name: {{ include "common.name.oruclosedlooprecovery" . }}-oru-config + configMap: + name: {{ include "common.name.oruclosedlooprecovery" . }}-configmap-config diff --git a/nonrtric/helm/oruclosedlooprecovery/templates/service.yaml b/nonrtric/helm/oruclosedlooprecovery/templates/service.yaml new file mode 100644 index 00000000..adca2098 --- /dev/null +++ b/nonrtric/helm/oruclosedlooprecovery/templates/service.yaml @@ -0,0 +1,37 @@ +################################################################################ +# Copyright (c) 2021 Nordix Foundation. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +################################################################################ + +kind: Service +apiVersion: v1 +metadata: + name: {{ include "common.name.oruclosedlooprecovery" . }} + namespace: {{ include "common.namespace.nonrtric" . }} + labels: + app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.oruclosedlooprecovery" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + ports: + {{if eq .Values.oruclosedlooprecovery.service.allowHttp true -}} + - name: {{ index .Values.oruclosedlooprecovery.service.httpName }} + port: {{ .Values.oruclosedlooprecovery.service.port }} + protocol: TCP + {{- end }} + selector: + app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.oruclosedlooprecovery" . }} + release: {{ .Release.Name }} + type: ClusterIP diff --git a/nonrtric/helm/oruclosedlooprecovery/values.yaml b/nonrtric/helm/oruclosedlooprecovery/values.yaml new file mode 100644 index 00000000..e3830c8f --- /dev/null +++ b/nonrtric/helm/oruclosedlooprecovery/values.yaml @@ -0,0 +1,41 @@ +################################################################################ +# Copyright (c) 2021 Nordix Foundation. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +################################################################################ + +# Default values for oru closed loop recovery. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +oruclosedlooprecovery: + imagePullPolicy: IfNotPresent + image: + registry: 'nexus3.o-ran-sc.org:10002/o-ran-sc' + name: nonrtric-o-ru-closed-loop-recovery + tag: 1.0.0 + service: + httpName: web + allowHttp: true + port: 80 + env: + consumer_host: "http://mrproducer" + consumer_port: "8095" + consumer_cert_path: "security/producer.crt" + consumer_key_path: "security/producer.key" + info_coord_addr: "http://ics:8083" + sdnr_address: "http://sdnr:8282" + sdnr_user: "admin" + sdnr_password: "Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U" + oru_to_odu_map_file: "o-ru-to-o-du-map.csv" + log_level: "Info" diff --git a/ric-common/Common-Template/helm/nonrtric-common/templates/_odusliceassurance.tpl b/ric-common/Common-Template/helm/nonrtric-common/templates/_odusliceassurance.tpl new file mode 100644 index 00000000..d6e1d483 --- /dev/null +++ b/ric-common/Common-Template/helm/nonrtric-common/templates/_odusliceassurance.tpl @@ -0,0 +1,24 @@ +################################################################################ +# Copyright (c) 2020 Nordix Foundation. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +################################################################################ + +{{- define "common.name.odusliceassurance" -}} + {{- printf "odusliceassurance" -}} +{{- end -}} + +{{- define "common.container.odusliceassurance" -}} + {{- $name := ( include "common.name.odusliceassurance" . ) -}} + {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} diff --git a/ric-common/Common-Template/helm/nonrtric-common/templates/_oruclosedlooprecovery.tpl b/ric-common/Common-Template/helm/nonrtric-common/templates/_oruclosedlooprecovery.tpl new file mode 100644 index 00000000..0cf0b23b --- /dev/null +++ b/ric-common/Common-Template/helm/nonrtric-common/templates/_oruclosedlooprecovery.tpl @@ -0,0 +1,24 @@ +################################################################################ +# Copyright (c) 2021 Nordix Foundation. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +################################################################################ + +{{- define "common.name.oruclosedlooprecovery" -}} + {{- printf "oruclosedlooprecovery" -}} +{{- end -}} + +{{- define "common.container.oruclosedlooprecovery" -}} + {{- $name := ( include "common.name.oruclosedlooprecovery" . ) -}} + {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} -- 2.16.6