Adding configmaps for A1 mediator. 27/12127/2
authornaman.gupta <naman.gupta@samsung.com>
Mon, 27 Nov 2023 09:20:28 +0000 (14:50 +0530)
committerThoralf Czichy <thoralf.czichy@nokia.com>
Thu, 7 Dec 2023 09:18:12 +0000 (09:18 +0000)
Adding configmaps for A1 mediator.

Change-Id: Ie4144555d108b458b11d45f89e1cf6ef68a34e59
Signed-off-by: naman.gupta <naman.gupta@samsung.com>
depRicKubernetesOperator/internal/controller/getConfigmap.go [new file with mode: 0644]

diff --git a/depRicKubernetesOperator/internal/controller/getConfigmap.go b/depRicKubernetesOperator/internal/controller/getConfigmap.go
new file mode 100644 (file)
index 0000000..05f1bbc
--- /dev/null
@@ -0,0 +1,54 @@
+package controller\r
+\r
+import (\r
+       corev1 "k8s.io/api/core/v1"\r
+       metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"\r
+)\r
+\r
+func GetConfigMap() []*corev1.ConfigMap {\r
+\r
+       configMap1 := &corev1.ConfigMap{\r
+               ObjectMeta: metav1.ObjectMeta{\r
+                       Name: "configmap-ricplt-a1mediator-a1conf",\r
+               },\r
+               TypeMeta: metav1.TypeMeta{\r
+                       APIVersion: "v1",\r
+                       Kind:       "ConfigMap",\r
+               },\r
+               Data: map[string]string{\r
+                       "local.rt": "newrt|start\n" +\r
+                               "# Warning! this is not a functioning table because the subscription manager and route manager are now involved in a1 flows\n" +\r
+                               "# 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
+                               "# there is a single message type for all messages a1 sends out now, subid is the other necessary piece of info\n" +\r
+                               "# there are two message types a1 listens for; 20011 (instance response) and 20012 (query)\n" +\r
+                               "# xapps likely use rts to reply with 20012 so the routing entry isn't needed for that in most cases\n" +\r
+                               "mse|20010|SUBID|service-ricxapp-admctrl-rmr.ricxapp:4563\n" +\r
+                               "rte|20011|service-ricplt-a1mediator-rmr.ricplt:4562\n" +\r
+                               "rte|20012|service-ricplt-a1mediator-rmr.ricplt:4562\n" +\r
+                               "newrt|end\n" +\r
+                               "",\r
+                       "loglevel.txt": "log-level:",\r
+               },\r
+       }\r
+\r
+       configMap2 := &corev1.ConfigMap{\r
+               Data: map[string]string{\r
+                       "CONFIG_MAP_NAME":             "/opt/route/loglevel.txt",\r
+                       "INSTANCE_DELETE_NO_RESP_TTL": "5",\r
+                       "INSTANCE_DELETE_RESP_TTL":    "10",\r
+                       "PYTHONUNBUFFERED":            "1",\r
+                       "RMR_RTG_SVC":                 "4561",\r
+                       "RMR_SRC_ID":                  "service-ricplt-a1mediator-rmr.ricplt",\r
+                       "A1_RMR_RETRY_TIMES":          "20",\r
+               },\r
+               ObjectMeta: metav1.ObjectMeta{\r
+                       Name: "configmap-ricplt-a1mediator-env",\r
+               },\r
+               TypeMeta: metav1.TypeMeta{\r
+                       APIVersion: "v1",\r
+                       Kind:       "ConfigMap",\r
+               },\r
+       }\r
+\r
+       return []*corev1.ConfigMap{configMap1, configMap2}\r
+}\r