Add helm chart for dmaapadapterservice 35/6735/2
authorRehanRaza <muhammad.rehan.raza@est.tech>
Wed, 22 Sep 2021 16:14:27 +0000 (18:14 +0200)
committerRehanRaza <muhammad.rehan.raza@est.tech>
Thu, 23 Sep 2021 12:10:20 +0000 (14:10 +0200)
Change-Id: Ifcd5aece4a4877ac976084e1afd5c0906e989e7c
Issue-ID: NONRTRIC-598
Signed-off-by: RehanRaza <muhammad.rehan.raza@est.tech>
16 files changed:
bin/deploy-nonrtric
bin/undeploy-nonrtric
nonrtric/RECIPE_EXAMPLE/example_recipe.yaml
nonrtric/helm/dmaapadapterservice/.helmignore [new file with mode: 0644]
nonrtric/helm/dmaapadapterservice/Chart.yaml [new file with mode: 0644]
nonrtric/helm/dmaapadapterservice/requirements.yaml [new file with mode: 0644]
nonrtric/helm/dmaapadapterservice/resources/config/application.yaml [new file with mode: 0644]
nonrtric/helm/dmaapadapterservice/resources/data/application_configuration.json [new file with mode: 0644]
nonrtric/helm/dmaapadapterservice/templates/configmap.yaml [new file with mode: 0644]
nonrtric/helm/dmaapadapterservice/templates/service.yaml [new file with mode: 0644]
nonrtric/helm/dmaapadapterservice/templates/statefulset.yaml [new file with mode: 0644]
nonrtric/helm/dmaapadapterservice/values.yaml [new file with mode: 0644]
nonrtric/helm/enrichmentservice/values.yaml
nonrtric/helm/nonrtric/Chart.yaml
nonrtric/helm/nonrtric/values.yaml
ric-common/Common-Template/helm/nonrtric-common/templates/_dmaapadapterservice.tpl [new file with mode: 0644]

index 02846c6..ac48e9f 100755 (executable)
@@ -106,7 +106,7 @@ rm $HELM_LOCAL_REPO/*
 helm repo remove local
 $ROOT_DIR/prepare-common-templates
 
-COMPONENTS="controlpanel a1controller a1simulator policymanagementservice enrichmentservice rappcatalogueservice nonrtricgateway"
+COMPONENTS="controlpanel a1controller a1simulator policymanagementservice enrichmentservice rappcatalogueservice nonrtricgateway dmaapadapterservice"
 for component in $COMPONENTS; do
     echo "Packaging NONRTRIC component [$component]"
     helm dep up $ROOT_DIR/../nonrtric/helm/$component
index 6ec73a4..05eac1c 100755 (executable)
@@ -18,7 +18,7 @@
 # This script to undeploy the NONRTRIC
 
 
-COMPONENTS="controlpanel a1controller a1simulator policymanagementservice enrichmentservice rappcatalogueservice nonrtricgateway"
+COMPONENTS="controlpanel a1controller a1simulator policymanagementservice enrichmentservice rappcatalogueservice nonrtricgateway dmaapadapterservice"
 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
 
index cd0c4b0..24f3a8f 100644 (file)
@@ -19,7 +19,7 @@
 #-------------------------------------------------------------------------
 
 
-# Here you can enable inclusion or exclusion of each component. A not installd component will not be installed.
+# Here you can enable inclusion or exclusion of each component. A not installed component will not be installed.
 nonrtric:
   installPms: true
   installA1controller: false
@@ -29,28 +29,29 @@ nonrtric:
   installRappcatalogueservice: false
   installNonrtricgateway: true
   installKong: false
+  installDmaapAdapterservice: true
   volume1:
     # Set the size to 0 if you do not need the volume (if you are using Dynamic Volume Provisioning)
     size: 2Gi
     storageClassName: pms-storage
-  volume2:  
+  volume2:
      # Set the size to 0 if you do not need the volume (if you are using Dynamic Volume Provisioning)
     size: 2Gi
     storageClassName: ecs-storage
-         
+
 common:
   releasePrefix: r3-dev-nonrtric
 # Do not change the namespace
   namespace:
     nonrtric: nonrtric
-  ingressClassName: kong 
+  ingressClassName: kong
 enrichmentservice:
   enrichmentservice:
     imagePullPolicy: IfNotPresent
     image:
       registry: 'nexus3.o-ran-sc.org:10004/o-ran-sc'
       name: 'nonrtric-enrichment-coordinator-service'
-      tag: 1.1.0
+      tag: 1.2.0
     service:
       allowHttp: true
       httpName: http
@@ -225,3 +226,25 @@ nonrtricgateway:
     readiness:
       initialDelaySeconds: 20
       periodSeconds: 10
+
+dmaapadapterservice:
+  dmaapadapterservice:
+    imagePullPolicy: IfNotPresent
+    image:
+      registry: 'nexus3.o-ran-sc.org:10004/o-ran-sc'
+      name: 'nonrtric-dmaap-adaptor'
+      tag: 1.0.0
+    service:
+      allowHttp: true
+      httpName: http
+      internalPort1: 9087
+      targetPort1: 8084
+      httpsName: https
+      internalPort2: 9088
+      targetPort2: 8435
+    liveness:
+      initialDelaySeconds: 20
+      periodSeconds: 10
+    readiness:
+      initialDelaySeconds: 20
+      periodSeconds: 10
diff --git a/nonrtric/helm/dmaapadapterservice/.helmignore b/nonrtric/helm/dmaapadapterservice/.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/nonrtric/helm/dmaapadapterservice/Chart.yaml b/nonrtric/helm/dmaapadapterservice/Chart.yaml
new file mode 100644 (file)
index 0000000..623ae8b
--- /dev/null
@@ -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: "1.0.0"
+description: A Helm chart for Dmaap Adapter Service
+name: dmaapadapterservice
+version: 1.0.0
diff --git a/nonrtric/helm/dmaapadapterservice/requirements.yaml b/nonrtric/helm/dmaapadapterservice/requirements.yaml
new file mode 100644 (file)
index 0000000..69b4db6
--- /dev/null
@@ -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/dmaapadapterservice/resources/config/application.yaml b/nonrtric/helm/dmaapadapterservice/resources/config/application.yaml
new file mode 100644 (file)
index 0000000..a3582fb
--- /dev/null
@@ -0,0 +1,59 @@
+################################################################################
+#   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.                                             #
+################################################################################
+
+spring:
+  profiles:
+    active: prod
+  main:
+    allow-bean-definition-overriding: true
+  aop:
+    auto: false
+management:
+  endpoints:
+    web:
+      exposure:
+        include: "loggers,logfile,health,info,metrics,threaddump,heapdump"
+
+logging:
+  level:
+    ROOT: ERROR
+    org.springframework: ERROR
+    org.springframework.data: ERROR
+    org.springframework.web.reactive.function.client.ExchangeFunctions: ERROR
+    org.oran.dmaapadapter: INFO
+  file:
+    name: /var/log/dmaap-adaptor-service/application.log
+server:
+   port : 8435
+   http-port: 8084
+   ssl:
+      key-store-type: JKS
+      key-store-password: policy_agent
+      key-store: /opt/app/dmaap-adaptor-service/etc/cert/keystore.jks
+      key-password: policy_agent
+      key-alias: policy_agent
+app:
+  webclient:
+    trust-store-used: false
+    trust-store-password: policy_agent
+    trust-store: /opt/app/dmaap-adaptor-service/etc/cert/truststore.jks
+    http.proxy-host:
+    http.proxy-port: 0
+  ecs-base-url: https://enrichmentservice:9083
+  configuration-filepath: /opt/app/dmaap-adaptor-service/data/application_configuration.json
+  dmaap-base-url: http://message-router.onap:3904
+  # The url used to adress this component. This is used as a callback url sent to other components.
+  dmaap-adapter-base-url: https://dmaapadapterservice:9088
\ No newline at end of file
diff --git a/nonrtric/helm/dmaapadapterservice/resources/data/application_configuration.json b/nonrtric/helm/dmaapadapterservice/resources/data/application_configuration.json
new file mode 100644 (file)
index 0000000..a8967d8
--- /dev/null
@@ -0,0 +1,8 @@
+{
+   "types": [
+      {
+         "id": "ExampleInformationType",
+         "dmaapTopicUrl": "/events/unauthenticated.VES_NOTIFICATION_OUTPUT/OpenDcae-c12/C12"
+      }
+   ]
+}
diff --git a/nonrtric/helm/dmaapadapterservice/templates/configmap.yaml b/nonrtric/helm/dmaapadapterservice/templates/configmap.yaml
new file mode 100644 (file)
index 0000000..9697062
--- /dev/null
@@ -0,0 +1,42 @@
+################################################################################
+#   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.dmaapadapterservice" . }}-configmap-config
+  namespace: {{ include "common.namespace.nonrtric" . }}
+  labels:
+    app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.dmaapadapterservice" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+data:
+{{ tpl (.Files.Glob "resources/config/*").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ include "common.name.dmaapadapterservice" . }}-configmap-data
+  namespace: {{ include "common.namespace.nonrtric" . }}
+  labels:
+    app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.dmaapadapterservice" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+data:
+{{ tpl (.Files.Glob "resources/data/*").AsConfig . | indent 2 }}
\ No newline at end of file
diff --git a/nonrtric/helm/dmaapadapterservice/templates/service.yaml b/nonrtric/helm/dmaapadapterservice/templates/service.yaml
new file mode 100644 (file)
index 0000000..b2f0ad6
--- /dev/null
@@ -0,0 +1,42 @@
+################################################################################
+#   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.dmaapadapterservice" . }}
+  namespace: {{ include "common.namespace.nonrtric" . }}
+  labels:
+    app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.dmaapadapterservice" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  ports:
+    {{if eq .Values.dmaapadapterservice.service.allowHttp true -}}
+    - name: {{ index .Values.dmaapadapterservice.service.httpName }}
+      port: {{ .Values.dmaapadapterservice.service.internalPort1 }}
+      targetPort: {{ .Values.dmaapadapterservice.service.targetPort1 }}
+      protocol: TCP
+    {{- end }}
+    - name: {{ index .Values.dmaapadapterservice.service.httpsName }}
+      port: {{ .Values.dmaapadapterservice.service.internalPort2 }}
+      targetPort: {{ .Values.dmaapadapterservice.service.targetPort2 }}
+      protocol: TCP
+  selector:
+    app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.dmaapadapterservice" . }}
+    release: {{ .Release.Name }}
+  type: ClusterIP
diff --git a/nonrtric/helm/dmaapadapterservice/templates/statefulset.yaml b/nonrtric/helm/dmaapadapterservice/templates/statefulset.yaml
new file mode 100644 (file)
index 0000000..5bc2979
--- /dev/null
@@ -0,0 +1,74 @@
+################################################################################
+#   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: StatefulSet
+apiVersion: apps/v1
+metadata:
+  name: {{ include "common.name.dmaapadapterservice" . }}
+  namespace: {{ include "common.namespace.nonrtric" . }}
+  generation: 1
+  labels:
+    app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.dmaapadapterservice" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+  annotations:
+    deployment.kubernetes.io/revision: '1'
+spec:
+  serviceName: {{ include "common.name.dmaapadapterservice" . }}
+  replicas: 1
+  selector:
+    matchLabels:
+      app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.dmaapadapterservice" . }}
+      release: {{ .Release.Name }}
+  template:
+    metadata:
+      labels:
+        app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.dmaapadapterservice" . }}
+        release: {{ .Release.Name }}
+    spec:
+      hostname: {{ include "common.name.dmaapadapterservice" . }}
+      containers:
+      - name: {{ include "common.container.dmaapadapterservice" . }}
+        image: {{ .Values.dmaapadapterservice.image.registry }}/{{ .Values.dmaapadapterservice.image.name }}:{{ .Values.dmaapadapterservice.image.tag }}
+        imagePullPolicy: {{ .Values.dmaapadapterservice.imagePullPolicy }}
+        ports:
+        - containerPort: {{ .Values.dmaapadapterservice.service.targetPort1 }}
+          protocol: TCP
+        - containerPort: {{ .Values.dmaapadapterservice.service.targetPort2 }}
+          protocol: TCP
+        readinessProbe:
+          tcpSocket:
+            port: {{ .Values.dmaapadapterservice.service.targetPort1 }}
+          initialDelaySeconds: {{ .Values.dmaapadapterservice.liveness.initialDelaySeconds }}
+          periodSeconds: {{ .Values.dmaapadapterservice.liveness.periodSeconds }}
+        livenessProbe:
+          tcpSocket:
+            port: {{ .Values.dmaapadapterservice.service.targetPort1 }}
+          initialDelaySeconds: {{ .Values.dmaapadapterservice.liveness.initialDelaySeconds }}
+          periodSeconds: {{ .Values.dmaapadapterservice.liveness.periodSeconds }}
+        volumeMounts:
+        - name: {{ include "common.name.dmaapadapterservice" . }}-dmaapadapter-config
+          mountPath: /opt/app/dmaap-adaptor-service/config
+        - name: {{ include "common.name.dmaapadapterservice" . }}-dmaapadapter-data
+          mountPath: /opt/app/dmaap-adaptor-service/data
+      volumes:
+        - name: {{ include "common.name.dmaapadapterservice" . }}-dmaapadapter-config
+          configMap:
+            name: {{ include "common.name.dmaapadapterservice" . }}-configmap-config
+        - name: {{ include "common.name.dmaapadapterservice" . }}-dmaapadapter-data
+          configMap:
+            name: {{ include "common.name.dmaapadapterservice" . }}-configmap-data
diff --git a/nonrtric/helm/dmaapadapterservice/values.yaml b/nonrtric/helm/dmaapadapterservice/values.yaml
new file mode 100644 (file)
index 0000000..123b2b7
--- /dev/null
@@ -0,0 +1,40 @@
+################################################################################
+#   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 Dmaap Adapter Service.
+# This is a YAML-formatted file.
+# Declare variables to be passed into your templates.
+
+dmaapadapterservice:
+  imagePullPolicy: IfNotPresent
+  image:
+    registry: "nexus3.o-ran-sc.org:10004/o-ran-sc"
+    name: "nonrtric-dmaap-adaptor"
+    tag: 1.0.0
+  service:
+    allowHttp: true
+    httpName: http
+    internalPort1: 9087
+    targetPort1: 8084
+    httpsName: https
+    internalPort2: 9088
+    targetPort2: 8435
+  liveness:
+    initialDelaySeconds: 20
+    periodSeconds: 10
+  readiness:
+    initialDelaySeconds: 20
+    periodSeconds: 10
index 8ed6dc5..32eb4a7 100644 (file)
@@ -23,7 +23,7 @@ enrichmentservice:
   image:
     registry: "nexus3.o-ran-sc.org:10004/o-ran-sc"
     name: "nonrtric-enrichment-coordinator-service"
-    tag: 1.1.0
+    tag: 1.2.0
   service:
     allowHttp: true
     httpName: http
index 86321c7..7c70488 100644 (file)
@@ -59,3 +59,8 @@ dependencies:
     version: ~1.0.0
     repository: "@local"
     condition: nonrtric.installNonrtricgateway
+
+  - name: dmaapadapterservice
+    version: ~1.0.0
+    repository: "@local"
+    condition: nonrtric.installDmaapadapterservice
index 5a13778..c7cd68b 100644 (file)
@@ -22,9 +22,10 @@ nonrtric:
   installEnrichmentservice: true
   installRappcatalogueservice: true
   installNonrtricgateway: true
+  installDmaapadapterservice: true
   volume1:
     size: 1Gi
     storageClassName: volume1
   volume2:
     size: 1Gi
-    storageClassName: volume2
+    storageClassName: volume2
\ No newline at end of file
diff --git a/ric-common/Common-Template/helm/nonrtric-common/templates/_dmaapadapterservice.tpl b/ric-common/Common-Template/helm/nonrtric-common/templates/_dmaapadapterservice.tpl
new file mode 100644 (file)
index 0000000..0d73046
--- /dev/null
@@ -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.dmaapadapterservice" -}}
+  {{- printf "dmaapadapterservice" -}}
+{{- end -}}
+
+{{- define "common.container.dmaapadapterservice" -}}
+  {{- $name := ( include "common.name.dmaapadapterservice" . ) -}}
+  {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}