Adding deployment for alarm manager.
[ric-plt/ric-dep.git] / depRicKubernetesOperator / internal / controller / getServices.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         "k8s.io/apimachinery/pkg/util/intstr"\r
7 )\r
8 \r
9 func GetService() []*corev1.Service {\r
10 \r
11         service1 := &corev1.Service{\r
12                 ObjectMeta: metav1.ObjectMeta{\r
13                         Labels: map[string]string{\r
14                                 "app":      "ricplt-a1mediator",\r
15                                 "chart":    "a1mediator-3.0.0",\r
16                                 "heritage": "Helm",\r
17                                 "release":  "release-name",\r
18                         },\r
19                         Name:      "service-ricplt-a1mediator-http",\r
20                         Namespace: "ricplt",\r
21                 },\r
22                 Spec: corev1.ServiceSpec{\r
23                         Type: corev1.ServiceType("ClusterIP"),\r
24                         Ports: []corev1.ServicePort{\r
25 \r
26                                 corev1.ServicePort{\r
27                                         Protocol: corev1.Protocol("TCP"),\r
28                                         TargetPort: intstr.IntOrString{\r
29                                                 StrVal: "http",\r
30                                                 Type:   intstr.Type(1),\r
31                                         },\r
32                                         Name: "http",\r
33                                         Port: 10000,\r
34                                 },\r
35                         },\r
36                         PublishNotReadyAddresses: false,\r
37                         Selector: map[string]string{\r
38                                 "app":     "ricplt-a1mediator",\r
39                                 "release": "release-name",\r
40                         },\r
41                 },\r
42                 TypeMeta: metav1.TypeMeta{\r
43                         APIVersion: "v1",\r
44                         Kind:       "Service",\r
45                 },\r
46         }\r
47 \r
48         service2 := &corev1.Service{\r
49                 ObjectMeta: metav1.ObjectMeta{\r
50                         Labels: map[string]string{\r
51                                 "release":  "release-name",\r
52                                 "app":      "ricplt-a1mediator",\r
53                                 "chart":    "a1mediator-3.0.0",\r
54                                 "heritage": "Helm",\r
55                         },\r
56                         Name:      "service-ricplt-a1mediator-rmr",\r
57                         Namespace: "ricplt",\r
58                 },\r
59                 Spec: corev1.ServiceSpec{\r
60                         PublishNotReadyAddresses: false,\r
61                         Selector: map[string]string{\r
62                                 "app":     "ricplt-a1mediator",\r
63                                 "release": "release-name",\r
64                         },\r
65                         Type: corev1.ServiceType("ClusterIP"),\r
66                         Ports: []corev1.ServicePort{\r
67 \r
68                                 corev1.ServicePort{\r
69                                         Name:     "rmrroute",\r
70                                         Port:     4561,\r
71                                         Protocol: corev1.Protocol("TCP"),\r
72                                         TargetPort: intstr.IntOrString{\r
73                                                 Type:   intstr.Type(1),\r
74                                                 StrVal: "rmrroute",\r
75                                         },\r
76                                 },\r
77                                 corev1.ServicePort{\r
78                                         Name:     "rmrdata",\r
79                                         Port:     4562,\r
80                                         Protocol: corev1.Protocol("TCP"),\r
81                                         TargetPort: intstr.IntOrString{\r
82                                                 StrVal: "rmrdata",\r
83                                                 Type:   intstr.Type(1),\r
84                                         },\r
85                                 },\r
86                         },\r
87                 },\r
88                 TypeMeta: metav1.TypeMeta{\r
89                         APIVersion: "v1",\r
90                         Kind:       "Service",\r
91                 },\r
92         }\r
93 \r
94         return []*corev1.Service{service1, service2}\r
95 }\r