Adding configmap and services for e2mgr. 50/12150/2
authornaman.gupta <naman.gupta@samsung.com>
Fri, 1 Dec 2023 14:26:43 +0000 (19:56 +0530)
committerThoralf Czichy <thoralf.czichy@nokia.com>
Thu, 7 Dec 2023 09:30:00 +0000 (09:30 +0000)
Adding configmap and services for e2mgr.`

Change-Id: Ied115e643ea0b522dcdf41fc554959d0c624e211
Signed-off-by: naman.gupta <naman.gupta@samsung.com>
depRicKubernetesOperator/internal/controller/getConfigmap.go
depRicKubernetesOperator/internal/controller/getIngress.go
depRicKubernetesOperator/internal/controller/getServices.go

index 1eedf0b..1a4f4ba 100644 (file)
@@ -263,6 +263,112 @@ func GetConfigMap() []*corev1.ConfigMap {
                        Kind:       "ConfigMap",\r
                },\r
        }\r
+\r
+       configMap13 := &corev1.ConfigMap{\r
+               Data: map[string]string{\r
+                       "rmr_verbose": "0\n" +\r
+                               "",\r
+                       "router.txt": "newrt|start\n" +\r
+                               "rte|1080|service-ricplt-e2mgr-rmr.ricplt:3801\n" +\r
+                               "rte|1090|service-ricplt-e2term-rmr.ricplt:38000\n" +\r
+                               "rte|1100|service-ricplt-e2term-rmr.ricplt:38000\n" +\r
+                               "rte|1101|service-ricplt-e2term-rmr.ricplt:38000\n" +\r
+                               "rte|1200|service-ricplt-rsm-rmr.ricplt:4801\n" +\r
+                               "rte|1210|service-ricplt-rsm-rmr.ricplt:4801\n" +\r
+                               "rte|1220|service-ricplt-rsm-rmr.ricplt:4801\n" +\r
+                               "rte|10020|service-ricplt-e2mgr-rmr.ricplt:3801\n" +\r
+                               "rte|10060|service-ricplt-e2term-rmr.ricplt:38000\n" +\r
+                               "rte|10061|service-ricplt-e2mgr-rmr.ricplt:3801\n" +\r
+                               "rte|10062|service-ricplt-e2mgr-rmr.ricplt:3801\n" +\r
+                               "rte|10070|service-ricplt-e2term-rmr.ricplt:38000\n" +\r
+                               "rte|10071|service-ricplt-e2term-rmr.ricplt:38000\n" +\r
+                               "rte|10080|service-ricplt-e2mgr-rmr.ricplt:3801\n" +\r
+                               "rte|10360|service-ricplt-e2term-rmr.ricplt:38000\n" +\r
+                               "rte|10361|service-ricplt-e2mgr-rmr.ricplt:3801\n" +\r
+                               "rte|10362|service-ricplt-e2mgr-rmr.ricplt:3801\n" +\r
+                               "rte|10370|service-ricplt-e2mgr-rmr.ricplt:3801\n" +\r
+                               "rte|10371|service-ricplt-e2term-rmr.ricplt:38000\n" +\r
+                               "rte|12010|service-ricplt-e2term-rmr.ricplt:38000\n" +\r
+                               "rte|12020|service-ricplt-e2term-rmr.ricplt:38000\n" +\r
+                               "rte|20001|service-ricplt-a1mediator-rmr.ricplt:4562\n" +\r
+                               "newrt|end",\r
+               },\r
+               ObjectMeta: metav1.ObjectMeta{\r
+                       Name:      "configmap-ricplt-e2mgr-router-configmap",\r
+                       Namespace: "ricplt",\r
+               },\r
+               TypeMeta: metav1.TypeMeta{\r
+                       APIVersion: "v1",\r
+                       Kind:       "ConfigMap",\r
+               },\r
+       }\r
+\r
+       configMap14 := &corev1.ConfigMap{\r
+               Data: map[string]string{\r
+                       "configuration.yaml": "logging:\n" +\r
+                               "  logLevel:  \"info\"     \n" +\r
+                               "http:\n" +\r
+                               "  port: 3800\n" +\r
+                               "rmr:\n" +\r
+                               "  port: 3801\n" +\r
+                               "  maxMsgSize: 65536\n" +\r
+                               "\n" +\r
+                               "routingManager:\n" +\r
+                               "  baseUrl: \"http://service-ricplt-rtmgr-http:3800/ric/v1/handles/\"\n" +\r
+                               "notificationResponseBuffer: 100\n" +\r
+                               "bigRedButtonTimeoutSec: 5 \n" +\r
+                               "maxConnectionAttempts: 3 \n" +\r
+                               "maxRnibConnectionAttempts: 3 \n" +\r
+                               "rnibRetryIntervalMs: 10\n" +\r
+                               "keepAliveResponseTimeoutMs: 360000\n" +\r
+                               "keepAliveDelayMs: 120000\n" +\r
+                               "\n" +\r
+                               "globalRicId:\n" +\r
+                               "  ricId: \"AACCE\"\n" +\r
+                               "  mcc: \"310\"\n" +\r
+                               "  mnc: \"411\"\n" +\r
+                               "  \n" +\r
+                               "rnibWriter:\n" +\r
+                               "  stateChangeMessageChannel: \"RAN_CONNECTION_STATUS_CHANGE\"\n" +\r
+                               "  ranManipulationMessageChannel: \"RAN_MANIPULATION\"",\r
+               },\r
+               ObjectMeta: metav1.ObjectMeta{\r
+                       Name:      "configmap-ricplt-e2mgr-configuration-configmap",\r
+                       Namespace: "ricplt",\r
+               },\r
+               TypeMeta: metav1.TypeMeta{\r
+                       APIVersion: "v1",\r
+                       Kind:       "ConfigMap",\r
+               },\r
+       }\r
+\r
+       configMap15 := &corev1.ConfigMap{\r
+               Data: map[string]string{\r
+                       "logcfg": "loglevel: 3",\r
+               },\r
+               ObjectMeta: metav1.ObjectMeta{\r
+                       Name:      "configmap-ricplt-e2mgr-loglevel-configmap",\r
+                       Namespace: "ricplt",\r
+               },\r
+               TypeMeta: metav1.TypeMeta{\r
+                       APIVersion: "v1",\r
+                       Kind:       "ConfigMap",\r
+               },\r
+       }\r
+\r
+       configMap16 := &corev1.ConfigMap{\r
+               Data: map[string]string{\r
+                       "RMR_RTG_SVC": "4561",\r
+                       "RMR_SRC_ID":  "service-ricplt-e2mgr-rmr.ricplt",\r
+               },\r
+               ObjectMeta: metav1.ObjectMeta{\r
+                       Name: "configmap-ricplt-e2mgr-env",\r
+               },\r
+               TypeMeta: metav1.TypeMeta{\r
+                       APIVersion: "v1",\r
+                       Kind:       "ConfigMap",\r
+               },\r
+       }\r
        \r
-       return []*corev1.ConfigMap{configMap1, configMap2, configMap3, configMap4, configMap5, configMap6,configMap7, configMap8, configMap9}\r
+       return []*corev1.ConfigMap{configMap1, configMap2, configMap3, configMap4, configMap5, configMap6,configMap7, configMap8, configMap9, configMap10, configMap11, configMap12, configMap13, configMap14, configMap15, configMap16}\r
 }\r
index 101a430..a4d224c 100644 (file)
@@ -62,6 +62,33 @@ func GetIngress() []*unstructured.Unstructured {
                        },\r
                },\r
        }\r
-       \r
-       return []*unstructured.Unstructured{ingress1, ingress2}\r
+\r
+       ingress3 := &unstructured.Unstructured{\r
+               Object: map[string]interface{}{\r
+                       "apiVersion": "networking.k8s.io/v1beta1",\r
+                       "kind":       "Ingress",\r
+                       "metadata": map[string]interface{}{\r
+                               "name": "ingress-ricplt-e2mgr",\r
+                       },\r
+                       "spec": map[string]interface{}{\r
+                               "rules": []interface{}{\r
+                                       map[string]interface{}{\r
+                                               "http": map[string]interface{}{\r
+                                                       "paths": []interface{}{\r
+                                                               map[string]interface{}{\r
+                                                                       "backend": map[string]interface{}{\r
+                                                                               "serviceName": "service-ricplt-e2mgr-http",\r
+                                                                               "servicePort": 3800,\r
+                                                                       },\r
+                                                                       "path": "/e2mgr",\r
+                                                               },\r
+                                                       },\r
+                                               },\r
+                                       },\r
+                               },\r
+                       },\r
+               },\r
+       }\r
+\r
+       return []*unstructured.Unstructured{ingress1, ingress2,ingress3}\r
 }
\ No newline at end of file
index 8fc4004..915463d 100644 (file)
@@ -255,5 +255,89 @@ func GetService() []*corev1.Service {
                },\r
        }\r
 \r
-       return []*corev1.Service{service1, service2, service3, service4,service5,service6 }\r
+\r
+       service8 := &corev1.Service{\r
+               ObjectMeta: metav1.ObjectMeta{\r
+                       Labels: map[string]string{\r
+                               "app":      "ricplt-e2mgr",\r
+                               "chart":    "e2mgr-3.0.0",\r
+                               "heritage": "Helm",\r
+                               "release":  "release-name",\r
+                       },\r
+                       Name:      "service-ricplt-e2mgr-http",\r
+                       Namespace: "ricplt",\r
+               },\r
+               Spec: corev1.ServiceSpec{\r
+                       Ports: []corev1.ServicePort{\r
+\r
+                               corev1.ServicePort{\r
+                                       TargetPort: intstr.IntOrString{\r
+                                               StrVal: "http",\r
+                                               Type:   intstr.Type(1),\r
+                                       },\r
+                                       Name:     "http",\r
+                                       Port:     3800,\r
+                                       Protocol: corev1.Protocol("TCP"),\r
+                               },\r
+                       },\r
+                       PublishNotReadyAddresses: false,\r
+                       Selector: map[string]string{\r
+                               "app":     "ricplt-e2mgr",\r
+                               "release": "release-name",\r
+                       },\r
+                       Type: corev1.ServiceType("ClusterIP"),\r
+               },\r
+               TypeMeta: metav1.TypeMeta{\r
+                       Kind:       "Service",\r
+                       APIVersion: "v1",\r
+               },\r
+       }\r
+\r
+       service9 := &corev1.Service{\r
+               TypeMeta: metav1.TypeMeta{\r
+                       APIVersion: "v1",\r
+                       Kind:       "Service",\r
+               },\r
+               ObjectMeta: metav1.ObjectMeta{\r
+                       Labels: map[string]string{\r
+                               "app":      "ricplt-e2mgr",\r
+                               "chart":    "e2mgr-3.0.0",\r
+                               "heritage": "Helm",\r
+                               "release":  "release-name",\r
+                       },\r
+                       Name:      "service-ricplt-e2mgr-rmr",\r
+                       Namespace: "ricplt",\r
+               },\r
+               Spec: corev1.ServiceSpec{\r
+                       Selector: map[string]string{\r
+                               "app":     "ricplt-e2mgr",\r
+                               "release": "release-name",\r
+                       },\r
+                       Type: corev1.ServiceType("ClusterIP"),\r
+                       Ports: []corev1.ServicePort{\r
+\r
+                               corev1.ServicePort{\r
+                                       Protocol: corev1.Protocol("TCP"),\r
+                                       TargetPort: intstr.IntOrString{\r
+                                               StrVal: "rmrroute",\r
+                                               Type:   intstr.Type(1),\r
+                                       },\r
+                                       Name: "rmrroute",\r
+                                       Port: 4561,\r
+                               },\r
+                               corev1.ServicePort{\r
+                                       Name:     "rmrdata",\r
+                                       Port:     3801,\r
+                                       Protocol: corev1.Protocol("TCP"),\r
+                                       TargetPort: intstr.IntOrString{\r
+                                               StrVal: "rmrdata",\r
+                                               Type:   intstr.Type(1),\r
+                                       },\r
+                               },\r
+                       },\r
+                       PublishNotReadyAddresses: false,\r
+               },\r
+       }\r
+\r
+       return []*corev1.Service{service1, service2, service3, service4,service5,service6,service8,service9 }\r
 }\r