Merge branch 'master' into cherry 24/5624/1
authorZhe <zhehuang@research.att.com>
Wed, 10 Feb 2021 02:23:07 +0000 (21:23 -0500)
committerZhe <zhehuang@research.att.com>
Wed, 10 Feb 2021 02:23:47 +0000 (21:23 -0500)
Signed-off-by: Zhe Huang <zhehuang@research.att.com>
Change-Id: Id6b00a658734948cc1d2bdd06f17aca2ffff676c

31 files changed:
bin/deploy-nonrtric
nonrtric/RECIPE_EXAMPLE/example_recipe.yaml
nonrtric/bin/install
nonrtric/bin/uninstall
nonrtric/data/run_in_k8s/populate_data.sh
nonrtric/data/run_in_k8s/testdata/STD/policy.json [new file with mode: 0644]
nonrtric/data/run_in_k8s/testdata/STD/policy_type.json [new file with mode: 0644]
nonrtric/helm/a1simulator/templates/statefulset.yaml
nonrtric/helm/a1simulator/values.yaml
nonrtric/helm/controlpanel/resources/nginx.conf [new file with mode: 0644]
nonrtric/helm/controlpanel/templates/deployment.yaml
nonrtric/helm/controlpanel/values.yaml
nonrtric/helm/enrichmentservice/templates/service.yaml
nonrtric/helm/enrichmentservice/values.yaml
nonrtric/helm/nonrtric/requirements.yaml
nonrtric/helm/nonrtricgateway/.helmignore [new file with mode: 0644]
nonrtric/helm/nonrtricgateway/Chart.yaml [new file with mode: 0644]
nonrtric/helm/nonrtricgateway/requirements.yaml [new file with mode: 0644]
nonrtric/helm/nonrtricgateway/resources/config/application.yaml [new file with mode: 0644]
nonrtric/helm/nonrtricgateway/templates/configmap.yaml [moved from nonrtric/helm/controlpanel/resources/application.properties with 53% similarity]
nonrtric/helm/nonrtricgateway/templates/deployment.yaml [new file with mode: 0644]
nonrtric/helm/nonrtricgateway/templates/service.yaml [new file with mode: 0644]
nonrtric/helm/nonrtricgateway/values.yaml [new file with mode: 0644]
nonrtric/helm/policymanagementservice/resources/config/application.yaml
nonrtric/helm/policymanagementservice/resources/data/application_configuration.json
nonrtric/helm/policymanagementservice/templates/service.yaml
nonrtric/helm/policymanagementservice/values.yaml
nonrtric/helm/rappcatalogueservice/templates/service.yaml
nonrtric/helm/rappcatalogueservice/values.yaml
ric-common/Common-Template/helm/nonrtric-common/templates/_nonrtricgateway.tpl [new file with mode: 0644]
ric-common/Common-Template/helm/ric-common/templates/_alarmmanager.tpl [moved from ric-common/Common-Template/helm/ric-common/templates/_alarmadapter.tpl with 50% similarity]

index cad783f..dbaaea3 100755 (executable)
@@ -85,7 +85,7 @@ fi
 
 $ROOT_DIR/prepare-common-templates
 
-COMPONENTS=${LIST_OF_COMPONENTS:-"controlpanel a1controller a1simulator policymanagementservice enrichmentservice rappcatalogueservice"}
+COMPONENTS=${LIST_OF_COMPONENTS:-"controlpanel a1controller a1simulator policymanagementservice enrichmentservice rappcatalogueservice nonrtricgateway"}
 echo "Packaging NONRTRIC components [$COMPONENTS]"
 # Package common templates and serve it using Helm local repo
 HELM_LOCAL_REPO=""
index 08c8407..fc81dfa 100644 (file)
@@ -78,16 +78,17 @@ a1simulator:
     stdVersion:
       name: a1-sim-std
       replicaCount: 2
+    stdVersion2:
+      name: a1-sim-std2
+      replicaCount: 2
 
-# image registry and tag to be changed after first release of controlpanel
-# Need to check the external port Availability
 controlpanel:
   controlpanel:
     imagePullPolicy: IfNotPresent
     image:
-      registry: 'nexus3.o-ran-sc.org:10002/o-ran-sc'
+      registry: 'nexus3.o-ran-sc.org:10004/o-ran-sc'
       name: nonrtric-controlpanel
-      tag: 2.1.0
+      tag: 2.2.0
     replicaCount: 1
     service:
       allowHttp: true
@@ -111,82 +112,24 @@ policymanagementservice:
   policymanagementservice:
     imagePullPolicy: IfNotPresent
     image:
-      registry: 'nexus3.o-ran-sc.org:10002/o-ran-sc'
+      registry: 'nexus3.o-ran-sc.org:10004/o-ran-sc'
       name: nonrtric-policy-agent
-      tag: 2.1.0
+      tag: 2.2.0
     service:
       allowHttp: true
       httpName: http
       internalPort1: 9080
       targetPort1: 8081
-      externalPort1: 30093
       httpsName: https
       internalPort2: 9081
       targetPort2: 8433
-      externalPort2: 30094
     liveness:
       initialDelaySeconds: 20
       periodSeconds: 10
     readiness:
       initialDelaySeconds: 20
       periodSeconds: 10
-    ric: |
-      [
-        {
-             "name":"ric1",
-             "baseUrl":"https://a1-sim-osc-0.a1-sim:8185",
-             "controller": "controller1",
-             "managedElementIds":[
-                "kista_1",
-                "kista_2"
-             ]
-          },
-          {
-            "name":"ric2",
-            "baseUrl":"https://a1-sim-osc-1.a1-sim:8185",
-            "controller": "controller1",
-            "managedElementIds":[
-               "kista_1",
-               "kista_2"
-            ]
-          },
-          {
-            "name":"ric3",
-            "baseUrl":"https://a1-sim-std-0.a1-sim:8185",
-            "controller": "controller1",
-            "managedElementIds":[
-               "kista_1",
-               "kista_2"
-            ]
-          },
-          {
-            "name":"ric4",
-            "baseUrl":"https://a1-sim-std-1.a1-sim:8185",
-            "controller": "controller1",
-            "managedElementIds":[
-               "kista_1",
-               "kista_2"
-            ]
-          }
-      ]
-    streams_publishes: |
-      {
-        "dmaap_publisher": {
-          "type":"message_router",
-          "dmaap_info":{
-            "topic_url":"http://message-router.onap:3904/events/A1-POLICY-AGENT-WRITE"
-          }
-        }
-      }
-    streams_subscribes: |
-      {
-        "dmaap_subscriber":{
-          "type":"message_router",
-          "dmaap_info":{
-            "topic_url":"http://message-router.onap:3904/events/A1-POLICY-AGENT-READ/users/policy-agent?timeout=15000&limit=100"
-          }
-        }
-      }
+
 enrichmentservice:
   enrichmentservice:
     imagePullPolicy: IfNotPresent
@@ -199,11 +142,9 @@ enrichmentservice:
       httpName: http
       internalPort1: 9082
       targetPort1: 8083
-      externalPort1: 30095
       httpsName: https
       internalPort2: 9083
       targetPort2: 8434
-      externalPort2: 30096
     liveness:
       initialDelaySeconds: 20
       periodSeconds: 10
@@ -217,6 +158,7 @@ enrichmentservice:
       size: 2Gi
       mountPath: /dockerdata-nfs
       mountSubPath: nonrtric/enrichmentservice
+
 rappcatalogueservice:
   rappcatalogueservice:
     imagePullPolicy: IfNotPresent
@@ -229,11 +171,28 @@ rappcatalogueservice:
       httpName: http
       internalPort1: 9085
       targetPort1: 8080
-      externalPort1: 30097
       httpsName: https
       internalPort2: 9086
       targetPort2: 8433
-      externalPort2: 30098
+    liveness:
+      initialDelaySeconds: 20
+      periodSeconds: 10
+    readiness:
+      initialDelaySeconds: 20
+      periodSeconds: 10
+
+nonrtricgateway:
+  nonrtricgateway:
+    imagePullPolicy: IfNotPresent
+    image:
+      registry: 'nexus3.o-ran-sc.org:10004/o-ran-sc'
+      name: nonrtric-gateway
+      tag: 0.0.1
+    service:
+      httpName: http
+      internalPort1: 9090
+      targetPort1: 9090
+      externalPort1: 30093
     liveness:
       initialDelaySeconds: 20
       periodSeconds: 10
index dbaff47..608556d 100755 (executable)
@@ -52,7 +52,7 @@ NAMESPACE_BLOCK=$(cat $OVERRIDEYAML | awk '/^  namespace:/{getline; while ($0 ~
 NONRTRIC_NAMESPACE=$(echo "$NAMESPACE_BLOCK" | awk '/^ *nonrtric:/{print $2}')
 RELEASE_PREFIX=$(echo "$COMMON_BLOCK" | awk '/^ *releasePrefix:/{print $2}')
 PARENT_CHART=$(cat $OVERRIDEYAML | awk '/^ *component:/{print $2}')
-COMPONENTS=${LIST_OF_COMPONENTS:-"controlpanel a1controller a1simulator policymanagementservice enrichmentservice nonrtric rappcatalogueservice"}
+COMPONENTS=${LIST_OF_COMPONENTS:-"controlpanel a1controller a1simulator policymanagementservice enrichmentservice nonrtric rappcatalogueservice nonrtricgateway"}
 echo "Chart name- $PARENT_CHART"
 
 if ! kubectl get ns ${NONRTRIC_NAMESPACE:-nonrtric}> /dev/null 2>&1; then
@@ -72,7 +72,7 @@ helm dep up $DIR/../helm/$PARENT_CHART
 HELM_NAME_OPT=""
 if [ -z $IS_HELM3 ];then
    HELM_NAME_OPT="--name"
-fi     
+fi
 
-helm install $DIR/../helm/"${PARENT_CHART}" -f $OVERRIDEYAML --namespace "${NONRTRIC_NAMESPACE:-nonrtric}" ${HELM_NAME_OPT} "${RELEASE_PREFIX}"
+helm install -f $OVERRIDEYAML --namespace "${NONRTRIC_NAMESPACE:-nonrtric}" ${HELM_NAME_OPT} "${RELEASE_PREFIX}" $DIR/../helm/"${PARENT_CHART}"
 
index 27eefa5..d0549f5 100755 (executable)
@@ -16,7 +16,7 @@
 ################################################################################
 
 
-COMPONENTS="controlpanel a1controller a1simulator policymanagementservice enrichmentservice rappcatalogueservice"
+COMPONENTS="controlpanel a1controller a1simulator policymanagementservice enrichmentservice rappcatalogueservice nonrtricgateway"
 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 69cd28c..d3e3f8b 100755 (executable)
@@ -23,6 +23,8 @@
 # one service in policy agent
 # five policies in a1-sim-OSC_0
 # one policy in a1-sim-STD_0
+# one policy type in a1-sim-STD2_0
+# one policy in a1-sim-STD2_0
 
 policy_agent_host="policymanagementservice"
 policy_agent_port="9080"
@@ -34,6 +36,10 @@ a1_sim_std_0_host="a1-sim-std-0.a1-sim"
 a1_sim_std_0_port="8085"
 a1_sim_std_1_host="a1-sim-std-1.a1-sim"
 a1_sim_std_1_port="8085"
+a1_sim_std2_0_host="a1-sim-std2-0.a1-sim"
+a1_sim_std2_0_port="8085"
+a1_sim_std2_1_host="a1-sim-std2-1.a1-sim"
+a1_sim_std2_1_port="8085"
 httpx=http
 
 echo "policy agent status:"
@@ -56,6 +62,14 @@ echo "ric4 version:"
 curl -skw " %{http_code}" $httpx://$a1_sim_std_1_host:$a1_sim_std_1_port/counter/interface
 echo -e "\n"
 
+echo "ric5 version:"
+curl -skw " %{http_code}" $httpx://$a1_sim_std2_0_host:$a1_sim_std_0_port/counter/interface
+echo -e "\n"
+
+echo "ric6 version:"
+curl -skw " %{http_code}" $httpx://$a1_sim_std2_1_host:$a1_sim_std_1_port/counter/interface
+echo -e "\n"
+
 echo "create policy type 1 to ric1:"
 curl -X PUT -skw " %{http_code}" $httpx://$a1_sim_osc_0_host:$a1_sim_osc_0_port/policytype?id=1 -H Content-Type:application/json --data-binary @testdata/OSC/policy_type.json
 echo -e "\n"
@@ -64,12 +78,20 @@ echo "create policy type 1 to ric2:"
 curl -X PUT -skw " %{http_code}" $httpx://$a1_sim_osc_1_host:$a1_sim_osc_1_port/policytype?id=1 -H Content-Type:application/json --data-binary @testdata/OSC/policy_type.json
 echo -e "\n"
 
+echo "create policy type 2 to STD2 ric5:"
+curl -X PUT -skw " %{http_code}" $httpx://$a1_sim_std2_0_host:$a1_sim_std2_0_port/policytype?id=2 -H Content-Type:application/json --data-binary @testdata/STD/policy_type.json
+echo -e "\n"
+
+echo "create policy type 2 to STD2 ric6:"
+curl -X PUT -skw " %{http_code}" $httpx://$a1_sim_std2_1_host:$a1_sim_std2_1_port/policytype?id=2 -H Content-Type:application/json --data-binary @testdata/STD/policy_type.json
+echo -e "\n"
+
 for i in {1..12}; do
        echo "policy types from policy agent:"
     curlString="curl -skw %{http_code} $httpx://$policy_agent_host:$policy_agent_port/policy_types"
     res=$($curlString)
     echo "$res"
-    expect="[\"\",\"1\"]200"
+    expect="[\"\",\"1\",\"2\"]200"
     if [ "$res" == "$expect" ]; then
         echo -e "\n"
         break;
@@ -102,6 +124,10 @@ echo "create policy 2004 to ric1 with type1 and service1 via policy agent:"
 curl -k -X PUT -sw " %{http_code}" -H accept:application/json -H Content-Type:application/json "$httpx://$policy_agent_host:$policy_agent_port/policy?id=2004&ric=ric1&service=service1&type=1" --data '{"scope": {"ueId": "ue3100","qosId": "qos3100"},"qosObjective": {"priorityLevel": 3104}}'
 echo -e "\n"
 
+echo "create policy 2200 to ric5 with type1 and service1 via policy agent:"
+curl -k -X PUT -sw " %{http_code}" -H accept:application/json -H Content-Type:application/json "$httpx://$policy_agent_host:$policy_agent_port/v2/policies" --data-binary @testdata/STD/policy.json
+echo -e "\n"
+
 echo "policy numbers from ric1:"
 curl -skw " %{http_code}" $httpx://$a1_sim_osc_0_host:$a1_sim_osc_0_port/counter/num_instances
 echo -e "\n"
@@ -120,4 +146,4 @@ echo -e "\n"
 
 echo "policy id 2100 from policy agent:"
 curl -k -X GET -sw " %{http_code}" $httpx://$policy_agent_host:$policy_agent_port/policy?id=2100
-echo -e "\n"
\ No newline at end of file
+echo -e "\n"
diff --git a/nonrtric/data/run_in_k8s/testdata/STD/policy.json b/nonrtric/data/run_in_k8s/testdata/STD/policy.json
new file mode 100644 (file)
index 0000000..de158bd
--- /dev/null
@@ -0,0 +1,15 @@
+{
+  "ric_id": "ric5",
+  "policy_id": "2100",
+  "service_id": "service1",
+  "policy_data": {
+    "scope": {
+      "ueId": "ue3100",
+      "qosId": "qos3100"
+    },
+    "qosObjective": {
+      "priorityLevel": 3100
+    }
+  },
+  "policytype_id": "2"
+}
diff --git a/nonrtric/data/run_in_k8s/testdata/STD/policy_type.json b/nonrtric/data/run_in_k8s/testdata/STD/policy_type.json
new file mode 100644 (file)
index 0000000..931498c
--- /dev/null
@@ -0,0 +1,56 @@
+{
+    "policySchema": {
+      "$schema": "http://json-schema.org/draft-07/schema#",
+      "title": "STD_QOS_0_2_0",
+      "description": "STD QOS policy type",
+      "type": "object",
+      "properties": {
+        "scope": {
+          "type": "object",
+          "properties": {
+            "ueId": {
+              "type": "string"
+            },
+            "qosId": {
+              "type": "string"
+            }
+          },
+          "additionalProperties": false,
+          "required": [
+            "ueId",
+            "qosId"
+          ]
+        },
+        "qosObjectives": {
+          "type": "object",
+          "properties": {
+            "priorityLevel": {
+              "type": "number"
+            }
+          },
+          "additionalProperties": false,
+          "required": [
+            "priorityLevel"
+          ]
+        }
+      }
+    },
+    "statusSchema": {
+      "$schema": "http://json-schema.org/draft-07/schema#",
+      "title": "STD_QOS_0.2.0",
+      "description": "STD QOS policy type status",
+      "type": "object",
+      "properties": {
+        "enforceStatus": {
+          "type": "string"
+        },
+        "enforceReason": {
+          "type": "string"
+        },
+        "additionalProperties": false,
+        "required": [
+          "enforceStatus"
+        ]
+      }
+    }
+  }
\ No newline at end of file
index 63019cd..939f3a3 100644 (file)
@@ -117,4 +117,56 @@ spec:
         - name: A1_VERSION
           value: STD_1.1.3
         - name: ALLOW_HTTP
-          value: {{ .Values.a1simulator.service.allowHttp | quote}}
\ No newline at end of file
+          value: {{ .Values.a1simulator.service.allowHttp | quote}}
+---
+kind: StatefulSet
+apiVersion: apps/v1
+metadata:
+  name: {{ .Values.a1simulator.stdVersion2.name }}
+  namespace: {{ include "common.namespace.nonrtric" . }}
+  generation: 1
+  labels:
+    app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.a1simulator" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+  annotations:
+    deployment.kubernetes.io/revision: '1'
+spec:
+  replicas: {{ .Values.a1simulator.stdVersion2.replicaCount }}
+  selector:
+    matchLabels:
+      app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.a1simulator" . }}
+      release: {{ .Release.Name }}
+  serviceName: {{ .Values.a1simulator.name }}
+  template:
+    metadata:
+      labels:
+        app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.a1simulator" . }}
+        release: {{ .Release.Name }}
+    spec:
+      hostname: {{ include "common.name.a1simulator" . }}
+      containers:
+      - name: {{ include "common.containername.a1simulator" . }}
+        image: {{ .Values.a1simulator.image.registry }}/{{ .Values.a1simulator.image.name }}:{{ .Values.a1simulator.image.tag }}
+        imagePullPolicy: {{ .Values.a1simulator.imagePullPolicy }}
+        ports:
+        - containerPort: {{ .Values.a1simulator.service.targetPort1 }}
+          protocol: TCP
+        - containerPort: {{ .Values.a1simulator.service.targetPort2 }}
+          protocol: TCP
+        readinessProbe:
+          tcpSocket:
+            port: {{ .Values.a1simulator.service.targetPort1 }}
+          initialDelaySeconds: {{ .Values.a1simulator.readiness.initialDelaySeconds }}
+          periodSeconds: {{ .Values.a1simulator.readiness.periodSeconds }}
+        livenessProbe:
+          tcpSocket:
+            port: {{ .Values.a1simulator.service.targetPort1 }}
+          initialDelaySeconds: {{ .Values.a1simulator.liveness.initialDelaySeconds }}
+          periodSeconds: {{ .Values.a1simulator.liveness.periodSeconds }}
+        env:
+        - name: A1_VERSION
+          value: STD_2.0.0
+        - name: ALLOW_HTTP
+          value: {{ .Values.a1simulator.service.allowHttp | quote}}
index 8546874..9836bf2 100644 (file)
@@ -45,3 +45,7 @@ a1simulator:
   stdVersion:
     name: a1-sim-std
     replicaCount: 2
+  stdVersion2:
+    name: a1-sim-std2
+    replicaCount: 2
+
diff --git a/nonrtric/helm/controlpanel/resources/nginx.conf b/nonrtric/helm/controlpanel/resources/nginx.conf
new file mode 100644 (file)
index 0000000..e7f807f
--- /dev/null
@@ -0,0 +1,25 @@
+events{}
+
+http {
+    include /etc/nginx/mime.types;
+
+    upstream backend {
+        server  nonrtricgateway:9090;
+    }
+
+    server {
+        listen 8080;
+        server_name localhost;
+        root /usr/share/nginx/html;
+        index index.html;
+        location /a1-policy/ {
+            proxy_pass  http://backend;
+        }
+        location /ei-producer/ {
+            proxy_pass  http://backend;
+        }
+        location / {
+            try_files $uri $uri/ /index.html;
+        }
+    }
+}
\ No newline at end of file
index 0d08ea4..eb8fcce 100644 (file)
@@ -51,8 +51,8 @@ spec:
             protocol: TCP
           volumeMounts:
             - name: configmap
-              mountPath: /maven/application.properties
-              subPath: application.properties
+              mountPath: /etc/nginx/nginx.conf
+              subPath: nginx.conf
               readOnly: true
           readinessProbe:
             tcpSocket:
index a842ec4..ce9acbc 100644 (file)
@@ -21,9 +21,9 @@
 controlpanel:
   imagePullPolicy: IfNotPresent
   image:
-    registry: 'nexus3.o-ran-sc.org:10002/o-ran-sc'
+    registry: 'nexus3.o-ran-sc.org:10004/o-ran-sc'
     name: nonrtric-controlpanel
-    tag: 2.1.0
+    tag: 2.2.0
   replicaCount: 1
   service:
     allowHttp: true
index 2fb216d..0b2a110 100644 (file)
@@ -30,15 +30,13 @@ spec:
     - name: {{ index .Values.enrichmentservice.service.httpName }}
       port: {{ .Values.enrichmentservice.service.internalPort1 }}
       targetPort: {{ .Values.enrichmentservice.service.targetPort1 }}
-      nodePort: {{ .Values.enrichmentservice.service.externalPort1 }}
       protocol: TCP
     {{- end }}
     - name: {{ index .Values.enrichmentservice.service.httpsName }}
       port: {{ .Values.enrichmentservice.service.internalPort2 }}
       targetPort: {{ .Values.enrichmentservice.service.targetPort2 }}
-      nodePort: {{ .Values.enrichmentservice.service.externalPort2 }}
       protocol: TCP
   selector:
     app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.enrichmentservice" . }}
     release: {{ .Release.Name }}
-  type: NodePort
+  type: ClusterIP
index b64e3ac..7e1ed19 100644 (file)
@@ -29,11 +29,9 @@ enrichmentservice:
     httpName: http
     internalPort1: 9082
     targetPort1: 8083
-    externalPort1: 30095
     httpsName: https
     internalPort2: 9083
     targetPort2: 8434
-    externalPort2: 30096
   liveness:
     initialDelaySeconds: 20
     periodSeconds: 10
index 138f67c..2a9e512 100644 (file)
@@ -36,4 +36,7 @@ dependencies:
   - name: rappcatalogueservice
     version: ~1.0.0
     repository: "@local"
+  - name: nonrtricgateway
+    version: ~1.0.0
+    repository: "@local"
 
diff --git a/nonrtric/helm/nonrtricgateway/.helmignore b/nonrtric/helm/nonrtricgateway/.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/nonrtricgateway/Chart.yaml b/nonrtric/helm/nonrtricgateway/Chart.yaml
new file mode 100644 (file)
index 0000000..c989221
--- /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: "0.0.1"
+description: A Helm chart for Nonrtric Gateway
+name: nonrtricgateway
+version: 1.0.0
diff --git a/nonrtric/helm/nonrtricgateway/requirements.yaml b/nonrtric/helm/nonrtricgateway/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/nonrtricgateway/resources/config/application.yaml b/nonrtric/helm/nonrtricgateway/resources/config/application.yaml
new file mode 100644 (file)
index 0000000..1a6c1bf
--- /dev/null
@@ -0,0 +1,52 @@
+################################################################################
+#   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.                                             #
+################################################################################
+
+server:
+  port: 9090
+spring:
+  cloud:
+    gateway:
+      httpclient:
+        ssl:
+          useInsecureTrustManager: true
+        wiretap: true
+      httpserver:
+        wiretap: true
+      routes:
+      - id: a1-policy
+        uri: https://policymanagementservice:9081
+        predicates:
+        - Path=/a1-policy/**
+      - id: ei-producer
+        uri: https://enrichmentservice:9083
+        predicates:
+        - Path=/ei-producer/**
+management:
+  endpoint:
+    gateway:
+      enabled: true
+  endpoints:
+    web:
+      exposure:
+        include: "gateway,loggers,logfile,health,info,metrics,threaddump,heapdump"
+logging:
+  level:
+    ROOT: ERROR
+    org.springframework: ERROR
+    org.springframework.cloud.gateway: INFO
+    reactor.netty: INFO
+  file:
+    name: /var/log/nonrtric-gateway/application.log
\ No newline at end of file
@@ -1,5 +1,5 @@
 ################################################################################
-#   Copyright (c) 2020 Nordix Foundation.                                      #
+#   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.           #
 #   See the License for the specific language governing permissions and        #
 #   limitations under the License.                                             #
 ################################################################################
-server.port = 8082
-server.ssl.key-store-type = PKCS12
-server.ssl.key-store-password = ericsson_kwdjfhw
-server.ssl.key-store =  classpath:keystore.jks
-server.ssl.key-password = ericsson_kwdjfhw
-server.http.port = 8080
-# https api
-policycontroller.url.prefix = https://policymanagementservice:9081
-# http api
-#policycontroller.url.prefix = http://policymanagementservice:9080
-userfile = users.json
-portalapi.decryptor = org.oransc.portal.nonrtric.controlpanel.portalapi.PortalSdkDecryptorAes
-portalapi.usercookie = UserId
-portalapi.security = false
-portalapi.appname = Non-RT RIC Control Panel
-portalapi.username = Default
-portalapi.password = password
 
-# URL for enrichment coordinator service
-# enrichmentcontroller.url.prefix = https://enrichment-service-container:8434
-enrichmentcontroller.url.prefix = http://enrichment-service-container:8083/ei-producer/v1
 
-# Mimic slow endpoints by defining sleep period, in milliseconds
-mock.config.delay = 0
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ include "common.name.nonrtricgateway" . }}-configmap
+  namespace: {{ include "common.namespace.nonrtric" . }}
+  labels:
+    app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.nonrtricgateway" . }}
+    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/nonrtricgateway/templates/deployment.yaml b/nonrtric/helm/nonrtricgateway/templates/deployment.yaml
new file mode 100644 (file)
index 0000000..bd742a9
--- /dev/null
@@ -0,0 +1,66 @@
+################################################################################
+#   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.nonrtricgateway" . }}
+  namespace: {{ include "common.namespace.nonrtric" . }}
+  generation: 1
+  labels:
+    app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.nonrtricgateway" . }}
+    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.nonrtricgateway" . }}
+      release: {{ .Release.Name }}
+  template:
+    metadata:
+      labels:
+        app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.nonrtricgateway" . }}
+        release: {{ .Release.Name }}
+    spec:
+      hostname: {{ include "common.name.nonrtricgateway" . }}
+      containers:
+      - name: {{ include "common.container.nonrtricgateway" . }}
+        image: {{ .Values.nonrtricgateway.image.registry }}/{{ .Values.nonrtricgateway.image.name }}:{{ .Values.nonrtricgateway.image.tag }}
+        imagePullPolicy: {{ .Values.nonrtricgateway.imagePullPolicy }}
+        ports:
+        - containerPort: {{ .Values.nonrtricgateway.service.targetPort1 }}
+          protocol: TCP
+        readinessProbe:
+          tcpSocket:
+            port: {{ .Values.nonrtricgateway.service.targetPort1 }}
+          initialDelaySeconds: {{ .Values.nonrtricgateway.liveness.initialDelaySeconds }}
+          periodSeconds: {{ .Values.nonrtricgateway.liveness.periodSeconds }}
+        livenessProbe:
+          tcpSocket:
+            port: {{ .Values.nonrtricgateway.service.targetPort1 }}
+          initialDelaySeconds: {{ .Values.nonrtricgateway.liveness.initialDelaySeconds }}
+          periodSeconds: {{ .Values.nonrtricgateway.liveness.periodSeconds }}
+        volumeMounts:
+        - name: {{ include "common.name.nonrtricgateway" . }}-config
+          mountPath: /opt/app/nonrtric-gateway/config
+      volumes:
+        - name: {{ include "common.name.nonrtricgateway" . }}-config
+          configMap:
+            name: {{ include "common.name.nonrtricgateway" . }}-configmap
\ No newline at end of file
diff --git a/nonrtric/helm/nonrtricgateway/templates/service.yaml b/nonrtric/helm/nonrtricgateway/templates/service.yaml
new file mode 100644 (file)
index 0000000..085c0e6
--- /dev/null
@@ -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.nonrtricgateway" . }}
+  namespace: {{ include "common.namespace.nonrtric" . }}
+  labels:
+    app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.nonrtricgateway" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  ports:
+    - name: {{ index .Values.nonrtricgateway.service.httpName }}
+      port: {{ .Values.nonrtricgateway.service.internalPort1 }}
+      targetPort: {{ .Values.nonrtricgateway.service.targetPort1 }}
+      nodePort: {{ .Values.nonrtricgateway.service.externalPort1 }}
+      protocol: TCP
+  selector:
+    app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.nonrtricgateway" . }}
+    release: {{ .Release.Name }}
+  type: NodePort
diff --git a/nonrtric/helm/nonrtricgateway/values.yaml b/nonrtric/helm/nonrtricgateway/values.yaml
new file mode 100644 (file)
index 0000000..0009dfa
--- /dev/null
@@ -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.                                             #
+################################################################################
+
+# Default values for Gateway application.
+# This is a YAML-formatted file.
+# Declare variables to be passed into your templates.
+
+nonrtricgateway:
+  imagePullPolicy: IfNotPresent
+  image:
+    registry: 'nexus3.o-ran-sc.org:10004/o-ran-sc'
+    name: nonrtric-gateway
+    tag: 0.0.1
+  service:
+    httpName: http
+    internalPort1: 9090
+    targetPort1: 9090
+    externalPort1: 30093
+  liveness:
+    initialDelaySeconds: 20
+    periodSeconds: 10
+  readiness:
+    initialDelaySeconds: 20
+    periodSeconds: 10
\ No newline at end of file
index cff6abf..dae3fce 100644 (file)
@@ -35,7 +35,7 @@ logging:
     org.springframework: ERROR
     org.springframework.data: ERROR
     org.springframework.web.reactive.function.client.ExchangeFunctions: ERROR
-    org.oransc.policyagent: INFO
+    org.onap.ccsdk.oran.a1policymanagementservice: INFO    
   file: /var/log/policy-agent/application.log
 
 server:
index 41b9300..8c446fa 100644 (file)
@@ -1,8 +1,84 @@
 {
     "config":{
-      "controller": {{ .Values.policymanagementservice.controllers  | indent 12 }},
-      "ric": {{ .Values.policymanagementservice.ric  | indent 12 }},
-      "streams_publishes": {{ .Values.policymanagementservice.streams_publishes  | indent 12 }},
-      "streams_subscribes": {{ .Values.policymanagementservice.streams_subscribes  | indent 12 }}
+      "controller": [
+         {
+            "name": "controller1",
+            "baseUrl": "https://a1controller:8383",
+            "userName": "admin",
+            "password": "Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U"
+         }
+      ],
+      "ric": [
+        {
+             "name":"ric1",
+             "baseUrl":"https://a1-sim-osc-0.a1-sim:8185",
+             "controller": "controller1",
+             "managedElementIds":[
+                "kista_1",
+                "kista_2"
+             ]
+          },
+          {
+            "name":"ric2",
+            "baseUrl":"https://a1-sim-osc-1.a1-sim:8185",
+            "controller": "controller1",
+            "managedElementIds":[
+               "kista_1",
+               "kista_2"
+            ]
+          },
+          {
+            "name":"ric3",
+            "baseUrl":"https://a1-sim-std-0.a1-sim:8185",
+            "controller": "controller1",
+            "managedElementIds":[
+               "kista_1",
+               "kista_2"
+            ]
+          },
+          {
+            "name":"ric4",
+            "baseUrl":"https://a1-sim-std-1.a1-sim:8185",
+            "controller": "controller1",
+            "managedElementIds":[
+               "kista_1",
+               "kista_2"
+            ]
+          },
+          {
+            "name":"ric5",
+            "baseUrl":"https://a1-sim-std2-0.a1-sim:8185",
+            "controller": "controller1",
+            "managedElementIds":[
+               "kista_1",
+               "kista_2"
+            ]
+          },
+          {
+            "name":"ric6",
+            "baseUrl":"https://a1-sim-std2-1.a1-sim:8185",
+            "controller": "controller1",
+            "managedElementIds":[
+               "kista_1",
+               "kista_2"
+            ]
+          }
+      ],
+      "streams_publishes": {
+        "dmaap_publisher": {
+          "type":"message_router",
+          "dmaap_info":{
+            "topic_url":"http://message-router.onap:3904/events/A1-POLICY-AGENT-WRITE"
+          }
+        }
+      },
+      "streams_subscribes": {
+        "dmaap_subscriber":{
+          "type":"message_router",
+          "dmaap_info":{
+            "topic_url":"http://message-router.onap:3904/events/A1-POLICY-AGENT-READ/users/policy-agent?timeout=15000&limit=100"
+          }
+        }
+      }
     }
 }
index 2358692..6d820e2 100644 (file)
@@ -30,15 +30,13 @@ spec:
     - name: {{ index .Values.policymanagementservice.service.httpName }}
       port: {{ .Values.policymanagementservice.service.internalPort1 }}
       targetPort: {{ .Values.policymanagementservice.service.targetPort1 }}
-      nodePort: {{ .Values.policymanagementservice.service.externalPort1 }}
       protocol: TCP
     {{- end }}
     - name: {{ index .Values.policymanagementservice.service.httpsName }}
       port: {{ .Values.policymanagementservice.service.internalPort2 }}
       targetPort: {{ .Values.policymanagementservice.service.targetPort2 }}
-      nodePort: {{ .Values.policymanagementservice.service.externalPort2 }}
       protocol: TCP
   selector:
     app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.policymanagementservice" . }}
     release: {{ .Release.Name }}
-  type: NodePort
+  type: ClusterIP
index 3e6cc52..f10aabd 100644 (file)
 policymanagementservice:
   imagePullPolicy: IfNotPresent
   image:
-    registry: 'nexus3.o-ran-sc.org:10002/o-ran-sc'
+    registry: 'nexus3.o-ran-sc.org:10004/o-ran-sc'
     name: nonrtric-policy-agent
-    tag: 2.1.0
+    tag: 2.2.0
   service:
     allowHttp: true
     httpName: http
     internalPort1: 9080
     targetPort1: 8081
-    externalPort1: 30093
     httpsName: https
     internalPort2: 9081
     targetPort2: 8433
-    externalPort2: 30094
   liveness:
     initialDelaySeconds: 20
     periodSeconds: 10
   readiness:
     initialDelaySeconds: 20
-    periodSeconds: 10
-  controllers: |
-    [
-         {
-            "name": "controller1",
-            "baseUrl": "https://a1controller:8383",
-            "userName": "admin",
-            "password": "Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U"
-         }
-    ]
-  ric: |
-    [
-          {
-             "name":"ric1",
-             "baseUrl":"https://a1-sim-osc-0.a1-sim:8185",
-             "controller": "controller1",
-             "managedElementIds":[
-                "kista_1",
-                "kista_2"
-             ]
-          },
-          {
-            "name":"ric2",
-            "baseUrl":"https://a1-sim-osc-1.a1-sim:8185",
-            "controller": "controller1",
-            "managedElementIds":[
-               "kista_1",
-               "kista_2"
-            ]
-          },
-          {
-            "name":"ric3",
-            "baseUrl":"https://a1-sim-std-0.a1-sim:8185",
-            "controller": "controller1",
-            "managedElementIds":[
-               "kista_1",
-               "kista_2"
-            ]
-          },
-          {
-            "name":"ric4",
-            "baseUrl":"https://a1-sim-std-1.a1-sim:8185",
-            "controller": "controller1",
-            "managedElementIds":[
-               "kista_1",
-               "kista_2"
-            ]
-          }
-    ]
-  streams_publishes: |
-    {
-          "dmaap_publisher":{
-             "type":"message_router",
-             "dmaap_info":{
-                "topic_url":"http://message-router:3904/events/A1-POLICY-AGENT-WRITE"
-             }
-          }
-    }
-  streams_subscribes: |
-    {
-          "dmaap_subscriber":{
-             "type":"message_router",
-             "dmaap_info":{
-                "topic_url":"http://message-router:3904/events/A1-POLICY-AGENT-READ/users/policy-agent?timeout=15000&limit=100"
-             }
-          }
-    }
-
+    periodSeconds: 10
\ No newline at end of file
index 2aae7d6..2c056eb 100644 (file)
@@ -30,15 +30,13 @@ spec:
     - name: {{ index .Values.rappcatalogueservice.service.httpName }}
       port: {{ .Values.rappcatalogueservice.service.internalPort1 }}
       targetPort: {{ .Values.rappcatalogueservice.service.targetPort1 }}
-      nodePort: {{ .Values.rappcatalogueservice.service.externalPort1 }}
       protocol: TCP
     {{- end }}
     - name: {{ index .Values.rappcatalogueservice.service.httpsName }}
       port: {{ .Values.rappcatalogueservice.service.internalPort2 }}
       targetPort: {{ .Values.rappcatalogueservice.service.targetPort2 }}
-      nodePort: {{ .Values.rappcatalogueservice.service.externalPort2 }}
       protocol: TCP
   selector:
     app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.rappcatalogueservice" . }}
     release: {{ .Release.Name }}
-  type: NodePort
+  type: ClusterIP
index e21d2c5..34af14d 100644 (file)
@@ -29,11 +29,9 @@ rappcatalogueservice:
     httpName: http
     internalPort1: 9080
     targetPort1: 8080
-    externalPort1: 30093
     httpsName: https
     internalPort2: 9081
     targetPort2: 8433
-    externalPort2: 30094
   liveness:
     initialDelaySeconds: 20
     periodSeconds: 10
diff --git a/ric-common/Common-Template/helm/nonrtric-common/templates/_nonrtricgateway.tpl b/ric-common/Common-Template/helm/nonrtric-common/templates/_nonrtricgateway.tpl
new file mode 100644 (file)
index 0000000..0d1435f
--- /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.nonrtricgateway" -}}
+  {{- printf "nonrtricgateway" -}}
+{{- end -}}
+
+{{- define "common.container.nonrtricgateway" -}}
+  {{- $name := ( include "common.name.nonrtricgateway" . ) -}}
+  {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
 #   limitations under the License.                                             #
 ################################################################################
 
-{{- define "common.name.alarmadapter" -}}
-  {{- printf "alarmadapter" -}}
+{{- define "common.name.alarmmanager" -}}
+  {{- printf "alarmmanager" -}}
 {{- end -}}
 
-{{- define "common.fullname.alarmadapter" -}}
-  {{- $name := ( include "common.name.alarmadapter" . ) -}}
+{{- define "common.fullname.alarmmanager" -}}
+  {{- $name := ( include "common.name.alarmmanager" . ) -}}
   {{- $namespace := ( include "common.namespace.platform" . ) -}}
   {{- printf "%s-%s" $namespace $name | trunc 63 | trimSuffix "-" -}}
 {{- end -}}
 
-{{- define "common.configmapname.alarmadapter" -}}
-  {{- $name := ( include "common.fullname.alarmadapter" . ) -}}
+{{- define "common.configmapname.alarmmanager" -}}
+  {{- $name := ( include "common.fullname.alarmmanager" . ) -}}
   {{- printf "configmap-%s" $name | trunc 63 | trimSuffix "-" -}}
 {{- end -}}
 
-{{- define "common.deploymentname.alarmadapter" -}}
-  {{- $name := ( include "common.fullname.alarmadapter" . ) -}}
+{{- define "common.deploymentname.alarmmanager" -}}
+  {{- $name := ( include "common.fullname.alarmmanager" . ) -}}
   {{- printf "deployment-%s" $name | trunc 63 | trimSuffix "-" -}}
 {{- end -}}
 
-{{- define "common.containername.alarmadapter" -}}
-  {{- $name := ( include "common.fullname.alarmadapter" . ) -}}
+{{- define "common.containername.alarmmanager" -}}
+  {{- $name := ( include "common.fullname.alarmmanager" . ) -}}
   {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}}
 {{- end -}}
 
-{{- define "common.serviceaccountname.alarmadapter" -}}
-  {{- $name := ( include "common.fullname.alarmadapter" . ) -}}
+{{- define "common.serviceaccountname.alarmmanager" -}}
+  {{- $name := ( include "common.fullname.alarmmanager" . ) -}}
   {{- printf "svcacct-%s" $name | trunc 63 | trimSuffix "-" -}}
 {{- end -}}
 
-{{- define "common.ingressname.alarmadapter" -}}
-  {{- $name := ( include "common.fullname.alarmadapter" . ) -}}
+{{- define "common.ingressname.alarmmanager" -}}
+  {{- $name := ( include "common.fullname.alarmmanager" . ) -}}
   {{- printf "ingress-%s" $name | trunc 63 | trimSuffix "-" -}}
 {{- end -}}
+{{- define "common.kongpath.ric.alarmmanager" -}}/alarmmanager{{- end -}}
 
-{{- define "common.servicename.alarmadapter.rmr" -}}
-  {{- $name := ( include "common.fullname.alarmadapter" . ) -}}
+{{- define "common.servicename.alarmmanager.rmr" -}}
+  {{- $name := ( include "common.fullname.alarmmanager" . ) -}}
   {{- printf "service-%s-rmr" $name | trunc 63 | trimSuffix "-" -}}
 {{- end -}}
 
-{{- define "common.servicename.alarmadapter.http" -}}
-  {{- $name := ( include "common.fullname.alarmadapter" . ) -}}
+{{- define "common.servicename.alarmmanager.http" -}}
+  {{- $name := ( include "common.fullname.alarmmanager" . ) -}}
   {{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}}
 {{- end -}}
 
-{{- define "common.serviceport.alarmadapter.rmr.data" -}}4560{{- end -}}
-{{- define "common.serviceport.alarmadapter.rmr.route" -}}4561{{- end -}}
-{{- define "common.serviceport.alarmadapter.http" -}}8080{{- end -}}
+{{- define "common.servicename.alarmmanager.rest" -}}
+  {{- $name := ( include "common.fullname.alarmmanager" . ) -}}
+  {{- printf "service-%s-rest" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.pvname.alarmmanager" -}}
+  {{- $name := ( include "common.fullname.alarmmanager" . ) -}}
+  {{- printf "pv-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.pvcname.alarmmanager" -}}
+  {{- $name := ( include "common.fullname.alarmmanager" . ) -}}
+  {{- printf "pvc-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.serviceport.alarmmanager.rmr.data" -}}4560{{- end -}}
+{{- define "common.serviceport.alarmmanager.rmr.route" -}}4561{{- end -}}
+{{- define "common.serviceport.alarmmanager.http" -}}8080{{- end -}}
+{{- define "common.serviceport.alarmmanager.rest" -}}8088{{- end -}}