Fix for RIC alarm flow
Change-Id: I63993075791246983adb343a9a694a710a9bee88
Signed-off-by: Lusheng Ji <lji@research.att.com>
diff --git a/helm/alarmadapter/templates/config.yaml b/helm/alarmadapter/templates/config.yaml
index 42f6ceb..532a5b9 100644
--- a/helm/alarmadapter/templates/config.yaml
+++ b/helm/alarmadapter/templates/config.yaml
@@ -1,5 +1,5 @@
#==================================================================================
-# Copyright (c) 2019 AT&T Intellectual Property.
+# Copyright (c) 2019,2020 AT&T Intellectual Property.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -16,37 +16,43 @@
apiVersion: v1
kind: ConfigMap
metadata:
- name: alarmadaptercfg
- namespace: ricplt
+ name: {{ include "common.configmapname.alarmadapter" . }}-appconfig
+ namespace: {{ include "common.namespace.platform" . }}
data:
- # FQDN and port info of rtmgr
- alarmadaptercfg: |
- "local":
- "host": ":8080"
- "logger":
- "level": 4
- "db" :
- "namespaces":
- -
- "sdl"
- -
- "rnib"
- "rmr":
- "protPort": "tcp:4560"
- "maxSize": 1024
- "numWorkers": 1
- "promAlertManager":
- "address": "elfkp-prometheus-alertmanager:9093"
- "baseUrl": "/api/v2"
- "schemes": http
- "alertInterval": 30000
- "alarmDefinitions:
- -
- "specificProblem": 1234
- "Text": "Connection to DBAAS server lost"
- -
- "specificProblem": 1235
- "Text": "Distribution of internal routing table failed due to timeout"
- -
- "specificProblem": 1236
- "Text": "E2 connection to gNB lost"
+ config-file.json: |-
+ {
+ "local": {
+ "host": ":8080"
+ },
+ "logger": {
+ "level": 4
+ },
+ "db": {
+ "namespaces": ["sdl", "rnib"]
+ },
+ "rmr": {
+ "protPort": "tcp:4560",
+ "maxSize": 1024,
+ "numWorkers": 1
+ },
+ "promAlertManager": {
+ "address": {{ .Values.alarmadapter.alertManagerAddress | quote }},
+ "baseUrl": "/api/v2",
+ "schemes": "http",
+ "alertInterval": 30000
+ },
+ "alarmDefinitions": [
+ {
+ "specificProblem": 1234,
+ "Text": "Connection to DBAAS server lost"
+ },
+ {
+ "specificProblem": 1235,
+ "Text": "Distribution of internal routing table failed due to timeout"
+ },
+ {
+ "specificProblem": 1236,
+ "Text": "E2 connection to gNB lost"
+ }
+ ]
+ }
diff --git a/helm/alarmadapter/templates/deployment.yaml b/helm/alarmadapter/templates/deployment.yaml
index 2a98220..47e8e66 100644
--- a/helm/alarmadapter/templates/deployment.yaml
+++ b/helm/alarmadapter/templates/deployment.yaml
@@ -49,18 +49,19 @@
- name: {{ include "common.containername.alarmadapter" . }}
image: {{ include "common.dockerregistry.url" $imagectx }}/{{ .Values.alarmadapter.image.name }}:{{ .Values.alarmadapter.image.tag }}
imagePullPolicy: {{ include "common.dockerregistry.pullpolicy" $pullpolicyctx }}
- command: ["/run_adapter.sh"]
#command: ["/bin/sh"]
#args: ["-c", "while true; do echo hello; sleep 10;done"]
+ command: ["/bin/sh"]
+ args: ["-c", "/alarm-adapter -f /alarmadaptercfg/config-file.json"]
envFrom:
- configMapRef:
name: {{ include "common.configmapname.alarmadapter" . }}-env
- configMapRef:
name: {{ include "common.configmapname.dbaas" . }}-appconfig
volumeMounts:
- - mountPath: /cfg
- name: config-volume
- readOnly: true
+ - mountPath: /alarmadaptercfg
+ name: appconfig-file
+ subpath: config-file.json
ports:
- name: "http"
containerPort: {{ include "common.serviceport.alarmadapter.http" . }}
@@ -69,10 +70,6 @@
- name: "rmrdata"
containerPort: {{ include "common.serviceport.alarmadapter.rmr.data" . }}
volumes:
- - name: config-volume
+ - name: appconfig-file
configMap:
- name: alarmadaptercfg
- items:
- - key: alarmadaptercfg
- path: alarmadapter-config.yaml
- mode: 0644
+ name: {{ include "common.configmapname.alarmadapter" . }}-appconfig
diff --git a/helm/alarmadapter/templates/env.yaml b/helm/alarmadapter/templates/env.yaml
index 545b266..ac1569e 100644
--- a/helm/alarmadapter/templates/env.yaml
+++ b/helm/alarmadapter/templates/env.yaml
@@ -18,6 +18,6 @@
metadata:
name: {{ include "common.configmapname.alarmadapter" . }}-env
data:
- RMR_RTG_SVC: {{ include "common.serviceport.alarmadapter.rmr.route" . | quote }}
+ RMR_RTG_SVC: {{ include "common.servicename.rtmgr.rmr" . }}:{{ include "common.serviceport.rtmgr.rmr.route" . }}
+ RMR_SEED_RT: "/uta_rtg.rt"
RMR_SRC_ID: {{ include "common.servicename.alarmadapter.rmr" . }}.{{ include "common.namespace.platform" . }}
- CFGFILE: "/cfg/alarmadapter-config.yaml"
diff --git a/helm/alarmadapter/templates/service-http.yaml b/helm/alarmadapter/templates/service-http.yaml
index 977c552..b589851 100644
--- a/helm/alarmadapter/templates/service-http.yaml
+++ b/helm/alarmadapter/templates/service-http.yaml
@@ -32,7 +32,7 @@
selector:
app: {{ include "common.namespace.platform" . }}-{{ include "common.name.alarmadapter" . }}
release: {{ .Release.Name }}
- clusterIP: None
+ type: ClusterIP
ports:
- name: http
port: {{ include "common.serviceport.alarmadapter.http" . }}
diff --git a/helm/alarmadapter/templates/service-rmr.yaml b/helm/alarmadapter/templates/service-rmr.yaml
index 1fd71c6..3cb6796 100644
--- a/helm/alarmadapter/templates/service-rmr.yaml
+++ b/helm/alarmadapter/templates/service-rmr.yaml
@@ -29,7 +29,7 @@
selector:
app: {{ include "common.namespace.platform" . }}-{{ include "common.name.alarmadapter" . }}
release: {{ .Release.Name }}
- clusterIP: None
+ type: ClusterIP
ports:
- name: rmrdata
port: {{ include "common.serviceport.alarmadapter.rmr.data" . }}