From bf6d7bc15815b8a00db48be4479a53298006b615 Mon Sep 17 00:00:00 2001 From: "aravind.est" Date: Sun, 18 May 2025 21:33:38 +0100 Subject: [PATCH] Add NCMP to TEIV adapter This adapter consumes cps endpoints and produces to the teiv topic. Issue-ID: NONRTRIC-1020 Change-Id: Ifdfd34bf0dd293ab46c334f77f8278c7baec4e73 Signed-off-by: aravind.est --- .../smo/topology-exposure-inventory/Chart.yaml | 5 +- .../charts/ncmp-to-teiv-adapter/.helmignore | 22 +++++++++ .../charts/ncmp-to-teiv-adapter/Chart.yaml | 22 +++++++++ .../ncmp-to-teiv-adapter/templates/configmap.yaml | 18 +++++++ .../ncmp-to-teiv-adapter/templates/deployment.yaml | 43 ++++++++++++++++ .../ncmp-to-teiv-adapter/templates/kafkauser.yaml | 18 +++++++ .../ncmp-to-teiv-adapter/templates/service.yaml | 18 +++++++ .../charts/ncmp-to-teiv-adapter/values.yaml | 57 ++++++++++++++++++++++ .../smo/topology-exposure-inventory/values.yaml | 29 +++++++++++ 9 files changed, 231 insertions(+), 1 deletion(-) create mode 100644 smo-install/oran_oom/smo/topology-exposure-inventory/charts/ncmp-to-teiv-adapter/.helmignore create mode 100644 smo-install/oran_oom/smo/topology-exposure-inventory/charts/ncmp-to-teiv-adapter/Chart.yaml create mode 100644 smo-install/oran_oom/smo/topology-exposure-inventory/charts/ncmp-to-teiv-adapter/templates/configmap.yaml create mode 100644 smo-install/oran_oom/smo/topology-exposure-inventory/charts/ncmp-to-teiv-adapter/templates/deployment.yaml create mode 100644 smo-install/oran_oom/smo/topology-exposure-inventory/charts/ncmp-to-teiv-adapter/templates/kafkauser.yaml create mode 100644 smo-install/oran_oom/smo/topology-exposure-inventory/charts/ncmp-to-teiv-adapter/templates/service.yaml create mode 100644 smo-install/oran_oom/smo/topology-exposure-inventory/charts/ncmp-to-teiv-adapter/values.yaml diff --git a/smo-install/oran_oom/smo/topology-exposure-inventory/Chart.yaml b/smo-install/oran_oom/smo/topology-exposure-inventory/Chart.yaml index 96e06646..a72b1c7b 100644 --- a/smo-install/oran_oom/smo/topology-exposure-inventory/Chart.yaml +++ b/smo-install/oran_oom/smo/topology-exposure-inventory/Chart.yaml @@ -1,5 +1,5 @@ # ============LICENSE_START=============================================== -# Copyright (C) 2024 OpenInfra Foundation Europe. All rights reserved. +# Copyright (C) 2024-2025 OpenInfra Foundation Europe. All rights reserved. # ======================================================================== # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -37,3 +37,6 @@ dependencies: version: 1.0.0 repository: "file://charts/topology-exposure-inventory" alias: topology-ingestion + - name: ncmp-to-teiv-adapter + version: 1.0.0 + repository: "file://charts/ncmp-to-teiv-adapter" \ No newline at end of file diff --git a/smo-install/oran_oom/smo/topology-exposure-inventory/charts/ncmp-to-teiv-adapter/.helmignore b/smo-install/oran_oom/smo/topology-exposure-inventory/charts/ncmp-to-teiv-adapter/.helmignore new file mode 100644 index 00000000..50af0317 --- /dev/null +++ b/smo-install/oran_oom/smo/topology-exposure-inventory/charts/ncmp-to-teiv-adapter/.helmignore @@ -0,0 +1,22 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/smo-install/oran_oom/smo/topology-exposure-inventory/charts/ncmp-to-teiv-adapter/Chart.yaml b/smo-install/oran_oom/smo/topology-exposure-inventory/charts/ncmp-to-teiv-adapter/Chart.yaml new file mode 100644 index 00000000..359f4493 --- /dev/null +++ b/smo-install/oran_oom/smo/topology-exposure-inventory/charts/ncmp-to-teiv-adapter/Chart.yaml @@ -0,0 +1,22 @@ +# ============LICENSE_START=============================================== +# Copyright (C) 2024 OpenInfra Foundation Europe. All rights reserved. +# ======================================================================== +# 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. +# ============LICENSE_END================================================= +# + +apiVersion: v1 +appVersion: "2.0.0" +description: A Helm chart for ncmp teiv adapter +name: ncmp-to-teiv-adapter +version: 1.0.0 diff --git a/smo-install/oran_oom/smo/topology-exposure-inventory/charts/ncmp-to-teiv-adapter/templates/configmap.yaml b/smo-install/oran_oom/smo/topology-exposure-inventory/charts/ncmp-to-teiv-adapter/templates/configmap.yaml new file mode 100644 index 00000000..3b61b846 --- /dev/null +++ b/smo-install/oran_oom/smo/topology-exposure-inventory/charts/ncmp-to-teiv-adapter/templates/configmap.yaml @@ -0,0 +1,18 @@ +# ============LICENSE_START=============================================== +# Copyright (C) 2024 OpenInfra Foundation Europe. All rights reserved. +# ======================================================================== +# 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. +# ============LICENSE_END================================================= +# + +{{ include "common.applicationConfigmap" . }} diff --git a/smo-install/oran_oom/smo/topology-exposure-inventory/charts/ncmp-to-teiv-adapter/templates/deployment.yaml b/smo-install/oran_oom/smo/topology-exposure-inventory/charts/ncmp-to-teiv-adapter/templates/deployment.yaml new file mode 100644 index 00000000..8684e67f --- /dev/null +++ b/smo-install/oran_oom/smo/topology-exposure-inventory/charts/ncmp-to-teiv-adapter/templates/deployment.yaml @@ -0,0 +1,43 @@ +# ============LICENSE_START=============================================== +# Copyright (C) 2024 OpenInfra Foundation Europe. All rights reserved. +# ======================================================================== +# 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. +# ============LICENSE_END================================================= +# + +kind: Deployment +apiVersion: apps/v1 +metadata: {{- include "common.resourceMetadata" . | nindent 2 }} +spec: + replicas: 1 + selector: {{- include "common.selectors" . | nindent 4 }} + template: + metadata: {{- include "common.templateMetadata" . | nindent 6 }} + spec: + hostname: {{ include "common.name" . }} + containers: + - name: {{ include "common.containername" . }} + image: {{ .Values.image.registry }}/{{ .Values.image.name }}:{{ .Values.image.tag }} + imagePullPolicy: {{ .Values.imagePullPolicy }} +{{- if .Values.global.useStrimziKafka }} + env: + - name: SPRING_KAFKA_SECURITY_PROPERTIES_SASL_JAAS_CONFIG + valueFrom: + secretKeyRef: + name: {{ include "common.name" . }}-ku + key: sasl.jaas.config +{{- end }} + volumeMounts: + - name: {{ include "common.applicationConfigMountName" . }} + mountPath: /opt/app/teiv/config + volumes: {{- include "common.applicationConfigVolume" . | nindent 8 }} diff --git a/smo-install/oran_oom/smo/topology-exposure-inventory/charts/ncmp-to-teiv-adapter/templates/kafkauser.yaml b/smo-install/oran_oom/smo/topology-exposure-inventory/charts/ncmp-to-teiv-adapter/templates/kafkauser.yaml new file mode 100644 index 00000000..6807fd5f --- /dev/null +++ b/smo-install/oran_oom/smo/topology-exposure-inventory/charts/ncmp-to-teiv-adapter/templates/kafkauser.yaml @@ -0,0 +1,18 @@ +{{/* +# Copyright © 2024 OpenInfra Foundation Europe. All rights reserved. +# +# 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. +*/}} +{{ if .Values.global.useStrimziKafka }} +{{ include "common.kafkauser" . }} +{{ end }} \ No newline at end of file diff --git a/smo-install/oran_oom/smo/topology-exposure-inventory/charts/ncmp-to-teiv-adapter/templates/service.yaml b/smo-install/oran_oom/smo/topology-exposure-inventory/charts/ncmp-to-teiv-adapter/templates/service.yaml new file mode 100644 index 00000000..581f6691 --- /dev/null +++ b/smo-install/oran_oom/smo/topology-exposure-inventory/charts/ncmp-to-teiv-adapter/templates/service.yaml @@ -0,0 +1,18 @@ +# ============LICENSE_START=============================================== +# Copyright (C) 2024 OpenInfra Foundation Europe. All rights reserved. +# ======================================================================== +# 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. +# ============LICENSE_END================================================= +# + +{{ include "common.service" . }} diff --git a/smo-install/oran_oom/smo/topology-exposure-inventory/charts/ncmp-to-teiv-adapter/values.yaml b/smo-install/oran_oom/smo/topology-exposure-inventory/charts/ncmp-to-teiv-adapter/values.yaml new file mode 100644 index 00000000..a456cc62 --- /dev/null +++ b/smo-install/oran_oom/smo/topology-exposure-inventory/charts/ncmp-to-teiv-adapter/values.yaml @@ -0,0 +1,57 @@ +# ============LICENSE_START=============================================== +# Copyright (C) 2024 OpenInfra Foundation Europe. All rights reserved. +# ======================================================================== +# 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. +# ============LICENSE_END================================================= +# + +# These values can/will be overridden from parent values.yaml + +imagePullPolicy: IfNotPresent +image: + registry: "" # Will be set from parent values.yaml + name: "" # Will be set from parent values.yaml + tag: "" # Will be set from parent values.yaml +service: + type: ClusterIP +persistence: + size: 2Gi + storageClassName: standard + +application: + spring: + application: + name: ncmp-to-teiv-adapter + kafka: + bootstrap-servers: onap-strimzi-kafka-bootstrap.onap:9092 + security: + enabled: true + protocol: SASL_PLAINTEXT + properties: + sasl.mechanism: SCRAM-SHA-512 + sasl.jaas.config: org.apache.kafka.common.security.scram.ScramLoginModule required username="" password=""; + producer: + key-serializer: org.apache.kafka.common.serialization.StringSerializer + value-serializer: io.cloudevents.kafka.CloudEventSerializer + + kafka: + topic: topology-inventory-ingestion + + send-sample-ocucp-event: false + + polling: + base-url: http://cps-core.onap:8080/ncmp/v1/ch + data-store-url: /data/ds/ncmp-datastore:passthrough-running + searches-url: /id-searches + include-descendants: false + interval: 60000 \ No newline at end of file diff --git a/smo-install/oran_oom/smo/topology-exposure-inventory/values.yaml b/smo-install/oran_oom/smo/topology-exposure-inventory/values.yaml index 61523329..2b7acfca 100644 --- a/smo-install/oran_oom/smo/topology-exposure-inventory/values.yaml +++ b/smo-install/oran_oom/smo/topology-exposure-inventory/values.yaml @@ -130,3 +130,32 @@ topology-ingestion: kafkaTopic: - name: *topologyIngestionTopic +ncmp-to-teiv-adapter: + name: ncmp-to-teiv-adapter + imagePullPolicy: IfNotPresent + image: + registry: "nexus3.o-ran-sc.org:10003" + name: o-ran-sc/smo-ncmp-to-teiv-adapter + tag: 0.0.1-SNAPSHOT + service: + type: ClusterIP + ports: + - name: http + internalPort: "8080" + targetPort: "8080" + port: 8080 + liveness: + initialDelaySeconds: 20 + periodSeconds: 10 + readiness: + initialDelaySeconds: 20 + periodSeconds: 10 + persistence: + size: 2Gi + storageClassName: standard + kafkaUser: + authenticationType: scram-sha-512 + acls: + - name: *topologyIngestionTopic + type: topic + operations: [Write] -- 2.16.6