Adding configmaps for A1 mediator.
[ric-plt/ric-dep.git] / depRicKubernetesOperator / internal / controller / getConfigmap.go
1 package controller\r
2 \r
3 import (\r
4         corev1 "k8s.io/api/core/v1"\r
5         metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"\r
6 )\r
7 \r
8 func GetConfigMap() []*corev1.ConfigMap {\r
9 \r
10         configMap1 := &corev1.ConfigMap{\r
11                 ObjectMeta: metav1.ObjectMeta{\r
12                         Name: "configmap-ricplt-a1mediator-a1conf",\r
13                 },\r
14                 TypeMeta: metav1.TypeMeta{\r
15                         APIVersion: "v1",\r
16                         Kind:       "ConfigMap",\r
17                 },\r
18                 Data: map[string]string{\r
19                         "local.rt": "newrt|start\n" +\r
20                                 "# Warning! this is not a functioning table because the subscription manager and route manager are now involved in a1 flows\n" +\r
21                                 "# the real routing table requires subscription ids as routing is now done over sub ids, but this isn't known until xapp deploy time, it's a dynamic process triggered by the xapp manager\n" +\r
22                                 "# there is a single message type for all messages a1 sends out now, subid is the other necessary piece of info\n" +\r
23                                 "# there are two message types a1 listens for; 20011 (instance response) and 20012 (query)\n" +\r
24                                 "# xapps likely use rts to reply with 20012 so the routing entry isn't needed for that in most cases\n" +\r
25                                 "mse|20010|SUBID|service-ricxapp-admctrl-rmr.ricxapp:4563\n" +\r
26                                 "rte|20011|service-ricplt-a1mediator-rmr.ricplt:4562\n" +\r
27                                 "rte|20012|service-ricplt-a1mediator-rmr.ricplt:4562\n" +\r
28                                 "newrt|end\n" +\r
29                                 "",\r
30                         "loglevel.txt": "log-level:",\r
31                 },\r
32         }\r
33 \r
34         configMap2 := &corev1.ConfigMap{\r
35                 Data: map[string]string{\r
36                         "CONFIG_MAP_NAME":             "/opt/route/loglevel.txt",\r
37                         "INSTANCE_DELETE_NO_RESP_TTL": "5",\r
38                         "INSTANCE_DELETE_RESP_TTL":    "10",\r
39                         "PYTHONUNBUFFERED":            "1",\r
40                         "RMR_RTG_SVC":                 "4561",\r
41                         "RMR_SRC_ID":                  "service-ricplt-a1mediator-rmr.ricplt",\r
42                         "A1_RMR_RETRY_TIMES":          "20",\r
43                 },\r
44                 ObjectMeta: metav1.ObjectMeta{\r
45                         Name: "configmap-ricplt-a1mediator-env",\r
46                 },\r
47                 TypeMeta: metav1.TypeMeta{\r
48                         APIVersion: "v1",\r
49                         Kind:       "ConfigMap",\r
50                 },\r
51         }\r
52 \r
53         return []*corev1.ConfigMap{configMap1, configMap2}\r
54 }\r