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
9 func GetService() []*corev1.Service {
\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
17 "release": "release-name",
\r
19 Name: "service-ricplt-a1mediator-http",
\r
20 Namespace: "ricplt",
\r
22 Spec: corev1.ServiceSpec{
\r
23 Type: corev1.ServiceType("ClusterIP"),
\r
24 Ports: []corev1.ServicePort{
\r
27 Protocol: corev1.Protocol("TCP"),
\r
28 TargetPort: intstr.IntOrString{
\r
30 Type: intstr.Type(1),
\r
36 PublishNotReadyAddresses: false,
\r
37 Selector: map[string]string{
\r
38 "app": "ricplt-a1mediator",
\r
39 "release": "release-name",
\r
42 TypeMeta: metav1.TypeMeta{
\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
56 Name: "service-ricplt-a1mediator-rmr",
\r
57 Namespace: "ricplt",
\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
65 Type: corev1.ServiceType("ClusterIP"),
\r
66 Ports: []corev1.ServicePort{
\r
71 Protocol: corev1.Protocol("TCP"),
\r
72 TargetPort: intstr.IntOrString{
\r
73 Type: intstr.Type(1),
\r
80 Protocol: corev1.Protocol("TCP"),
\r
81 TargetPort: intstr.IntOrString{
\r
83 Type: intstr.Type(1),
\r
88 TypeMeta: metav1.TypeMeta{
\r
94 return []*corev1.Service{service1, service2}
\r