Add NCMP to TEIV adapter 28/14428/1
authoraravind.est <aravindhan.a@est.tech>
Sun, 18 May 2025 20:33:38 +0000 (21:33 +0100)
committeraravind.est <aravindhan.a@est.tech>
Sun, 18 May 2025 20:34:56 +0000 (21:34 +0100)
This adapter consumes cps endpoints and produces to the teiv topic.

Issue-ID: NONRTRIC-1020
Change-Id: Ifdfd34bf0dd293ab46c334f77f8278c7baec4e73
Signed-off-by: aravind.est <aravindhan.a@est.tech>
smo-install/oran_oom/smo/topology-exposure-inventory/Chart.yaml
smo-install/oran_oom/smo/topology-exposure-inventory/charts/ncmp-to-teiv-adapter/.helmignore [new file with mode: 0644]
smo-install/oran_oom/smo/topology-exposure-inventory/charts/ncmp-to-teiv-adapter/Chart.yaml [new file with mode: 0644]
smo-install/oran_oom/smo/topology-exposure-inventory/charts/ncmp-to-teiv-adapter/templates/configmap.yaml [new file with mode: 0644]
smo-install/oran_oom/smo/topology-exposure-inventory/charts/ncmp-to-teiv-adapter/templates/deployment.yaml [new file with mode: 0644]
smo-install/oran_oom/smo/topology-exposure-inventory/charts/ncmp-to-teiv-adapter/templates/kafkauser.yaml [new file with mode: 0644]
smo-install/oran_oom/smo/topology-exposure-inventory/charts/ncmp-to-teiv-adapter/templates/service.yaml [new file with mode: 0644]
smo-install/oran_oom/smo/topology-exposure-inventory/charts/ncmp-to-teiv-adapter/values.yaml [new file with mode: 0644]
smo-install/oran_oom/smo/topology-exposure-inventory/values.yaml

index 96e0664..a72b1c7 100644 (file)
@@ -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 (file)
index 0000000..50af031
--- /dev/null
@@ -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 (file)
index 0000000..359f449
--- /dev/null
@@ -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 (file)
index 0000000..3b61b84
--- /dev/null
@@ -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 (file)
index 0000000..8684e67
--- /dev/null
@@ -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 (file)
index 0000000..6807fd5
--- /dev/null
@@ -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 (file)
index 0000000..581f669
--- /dev/null
@@ -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 (file)
index 0000000..a456cc6
--- /dev/null
@@ -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
index 6152332..2b7acfc 100644 (file)
@@ -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]