X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=depRicKubernetesOperator%2Finternal%2Fcontroller%2FgetServices.go;h=05247ef6a2581217888fed55aab1e81ee907189e;hb=6ab3aec83c11229354656c0fff7d047e833fa936;hp=cdf94f2c622a35d0d7eeb188fbc7286490009545;hpb=2da3438be543b637dd7201647bec48a4c06b39fb;p=ric-plt%2Fric-dep.git diff --git a/depRicKubernetesOperator/internal/controller/getServices.go b/depRicKubernetesOperator/internal/controller/getServices.go index cdf94f2..05247ef 100644 --- a/depRicKubernetesOperator/internal/controller/getServices.go +++ b/depRicKubernetesOperator/internal/controller/getServices.go @@ -90,6 +90,379 @@ func GetService() []*corev1.Service { Kind: "Service", }, } + service3 := &corev1.Service{ + ObjectMeta: metav1.ObjectMeta{ + Labels: map[string]string{ + "heritage": "Helm", + "release": "release-name", + "app": "ricplt-alarmmanager", + "chart": "alarmmanager-5.0.0", + }, + Name: "service-ricplt-alarmmanager-http", + Namespace: "ricplt", + }, + Spec: corev1.ServiceSpec{ + Ports: []corev1.ServicePort{ + + corev1.ServicePort{ + Name: "http", + Port: 8080, + Protocol: corev1.Protocol("TCP"), + TargetPort: intstr.IntOrString{ + IntVal: 8080, + }, + }, + }, + PublishNotReadyAddresses: false, + Selector: map[string]string{ + "app": "ricplt-alarmmanager", + "release": "release-name", + }, + Type: corev1.ServiceType("ClusterIP"), + }, + TypeMeta: metav1.TypeMeta{ + Kind: "Service", + APIVersion: "v1", + }, + } + + service4 := &corev1.Service{ + ObjectMeta: metav1.ObjectMeta{ + Labels: map[string]string{ + "app": "ricplt-alarmmanager", + "chart": "alarmmanager-5.0.0", + "heritage": "Helm", + "release": "release-name", + }, + Name: "service-ricplt-alarmmanager-rmr", + Namespace: "ricplt", + }, + Spec: corev1.ServiceSpec{ + Ports: []corev1.ServicePort{ + + corev1.ServicePort{ + TargetPort: intstr.IntOrString{ + StrVal: "rmrdata", + Type: intstr.Type(1), + }, + Name: "rmrdata", + Port: 4560, + Protocol: corev1.Protocol("TCP"), + }, + corev1.ServicePort{ + Name: "rmrroute", + Port: 4561, + Protocol: corev1.Protocol("TCP"), + TargetPort: intstr.IntOrString{ + StrVal: "rmrroute", + Type: intstr.Type(1), + }, + }, + }, + PublishNotReadyAddresses: false, + Selector: map[string]string{ + "app": "ricplt-alarmmanager", + "release": "release-name", + }, + Type: corev1.ServiceType("ClusterIP"), + }, + TypeMeta: metav1.TypeMeta{ + APIVersion: "v1", + Kind: "Service", + }, + } + + service5 := &corev1.Service{ + ObjectMeta: metav1.ObjectMeta{ + Labels: map[string]string{ + "app": "ricplt-appmgr", + "chart": "appmgr-3.0.0", + "heritage": "Helm", + "release": "release-name", + }, + Name: "service-ricplt-appmgr-http", + Namespace: "ricplt", + }, + Spec: corev1.ServiceSpec{ + Ports: []corev1.ServicePort{ + + corev1.ServicePort{ + Name: "http", + Port: 8080, + Protocol: corev1.Protocol("TCP"), + TargetPort: intstr.IntOrString{ + Type: intstr.Type(1), + StrVal: "http", + }, + }, + }, + PublishNotReadyAddresses: false, + Selector: map[string]string{ + "release": "release-name", + "app": "ricplt-appmgr", + }, + Type: corev1.ServiceType("ClusterIP"), + }, + TypeMeta: metav1.TypeMeta{ + APIVersion: "v1", + Kind: "Service", + }, + } + + service6 := &corev1.Service{ + ObjectMeta: metav1.ObjectMeta{ + Name: "service-ricplt-appmgr-rmr", + Namespace: "ricplt", + Labels: map[string]string{ + "chart": "appmgr-3.0.0", + "heritage": "Helm", + "release": "release-name", + "app": "ricplt-appmgr", + }, + }, + Spec: corev1.ServiceSpec{ + Ports: []corev1.ServicePort{ + + corev1.ServicePort{ + Name: "rmrroute", + Port: 4561, + Protocol: corev1.Protocol("TCP"), + TargetPort: intstr.IntOrString{ + Type: intstr.Type(1), + StrVal: "rmrroute", + }, + }, + corev1.ServicePort{ + Name: "rmrdata", + Port: 4560, + Protocol: corev1.Protocol("TCP"), + TargetPort: intstr.IntOrString{ + StrVal: "rmrdata", + Type: intstr.Type(1), + }, + }, + }, + PublishNotReadyAddresses: false, + Selector: map[string]string{ + "app": "ricplt-appmgr", + "release": "release-name", + }, + Type: corev1.ServiceType("ClusterIP"), + }, + TypeMeta: metav1.TypeMeta{ + APIVersion: "v1", + Kind: "Service", + }, + } + + + service8 := &corev1.Service{ + ObjectMeta: metav1.ObjectMeta{ + Labels: map[string]string{ + "app": "ricplt-e2mgr", + "chart": "e2mgr-3.0.0", + "heritage": "Helm", + "release": "release-name", + }, + Name: "service-ricplt-e2mgr-http", + Namespace: "ricplt", + }, + Spec: corev1.ServiceSpec{ + Ports: []corev1.ServicePort{ + + corev1.ServicePort{ + TargetPort: intstr.IntOrString{ + StrVal: "http", + Type: intstr.Type(1), + }, + Name: "http", + Port: 3800, + Protocol: corev1.Protocol("TCP"), + }, + }, + PublishNotReadyAddresses: false, + Selector: map[string]string{ + "app": "ricplt-e2mgr", + "release": "release-name", + }, + Type: corev1.ServiceType("ClusterIP"), + }, + TypeMeta: metav1.TypeMeta{ + Kind: "Service", + APIVersion: "v1", + }, + } + + service9 := &corev1.Service{ + TypeMeta: metav1.TypeMeta{ + APIVersion: "v1", + Kind: "Service", + }, + ObjectMeta: metav1.ObjectMeta{ + Labels: map[string]string{ + "app": "ricplt-e2mgr", + "chart": "e2mgr-3.0.0", + "heritage": "Helm", + "release": "release-name", + }, + Name: "service-ricplt-e2mgr-rmr", + Namespace: "ricplt", + }, + Spec: corev1.ServiceSpec{ + Selector: map[string]string{ + "app": "ricplt-e2mgr", + "release": "release-name", + }, + Type: corev1.ServiceType("ClusterIP"), + Ports: []corev1.ServicePort{ + + corev1.ServicePort{ + Protocol: corev1.Protocol("TCP"), + TargetPort: intstr.IntOrString{ + StrVal: "rmrroute", + Type: intstr.Type(1), + }, + Name: "rmrroute", + Port: 4561, + }, + corev1.ServicePort{ + Name: "rmrdata", + Port: 3801, + Protocol: corev1.Protocol("TCP"), + TargetPort: intstr.IntOrString{ + StrVal: "rmrdata", + Type: intstr.Type(1), + }, + }, + }, + PublishNotReadyAddresses: false, + }, + } + + service10 := &corev1.Service{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + "prometheus.io/path": "/metrics", + "prometheus.io/port": "8088", + "prometheus.io/scrape": "true", + }, + Labels: map[string]string{ + "heritage": "Helm", + "release": "release-name", + "app": "ricplt-e2term-alpha", + "chart": "e2term-3.0.0", + }, + Name: "service-ricplt-e2term-prometheus-alpha", + Namespace: "ricplt", + }, + Spec: corev1.ServiceSpec{ + Ports: []corev1.ServicePort{ + + corev1.ServicePort{ + Name: "prmts-alpha", + Port: 8088, + Protocol: corev1.Protocol("TCP"), + TargetPort: intstr.IntOrString{ + StrVal: "prmts-alpha", + Type: intstr.Type(1), + }, + }, + }, + PublishNotReadyAddresses: false, + Selector: map[string]string{ + "release": "release-name", + "app": "ricplt-e2term-alpha", + }, + Type: corev1.ServiceType("ClusterIP"), + }, + TypeMeta: metav1.TypeMeta{ + APIVersion: "v1", + Kind: "Service", + }, + } + + service11 := &corev1.Service{ + ObjectMeta: metav1.ObjectMeta{ + Labels: map[string]string{ + "chart": "e2term-3.0.0", + "heritage": "Helm", + "release": "release-name", + "app": "ricplt-e2term-alpha", + }, + Name: "service-ricplt-e2term-rmr-alpha", + Namespace: "ricplt", + }, + Spec: corev1.ServiceSpec{ + Ports: []corev1.ServicePort{ + + corev1.ServicePort{ + Name: "rmrroute-alpha", + Port: 4561, + Protocol: corev1.Protocol("TCP"), + TargetPort: intstr.IntOrString{ + StrVal: "rmrroute-alpha", + Type: intstr.Type(1), + }, + }, + corev1.ServicePort{ + TargetPort: intstr.IntOrString{ + StrVal: "rmrdata-alpha", + Type: intstr.Type(1), + }, + Name: "rmrdata-alpha", + Port: 38000, + Protocol: corev1.Protocol("TCP"), + }, + }, + PublishNotReadyAddresses: false, + Selector: map[string]string{ + "app": "ricplt-e2term-alpha", + "release": "release-name", + }, + Type: corev1.ServiceType("ClusterIP"), + }, + TypeMeta: metav1.TypeMeta{ + APIVersion: "v1", + Kind: "Service", + }, + } + + service12 := &corev1.Service{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: "ricplt", + Labels: map[string]string{ + "app": "ricplt-e2term-alpha", + "chart": "e2term-3.0.0", + "heritage": "Helm", + "release": "release-name", + }, + Name: "service-ricplt-e2term-sctp-alpha", + }, + Spec: corev1.ServiceSpec{ + Ports: []corev1.ServicePort{ + + corev1.ServicePort{ + Name: "sctp-alpha", + NodePort: 32222, + Port: 36422, + Protocol: corev1.Protocol("SCTP"), + TargetPort: intstr.IntOrString{ + IntVal: 36422, + }, + }, + }, + PublishNotReadyAddresses: false, + Selector: map[string]string{ + "app": "ricplt-e2term-alpha", + "release": "release-name", + }, + Type: corev1.ServiceType("NodePort"), + }, + TypeMeta: metav1.TypeMeta{ + APIVersion: "v1", + Kind: "Service", + }, + } - return []*corev1.Service{service1, service2} + return []*corev1.Service{service1, service2, service3, service4,service5,service6,service8,service9,service10,service11,service12} }