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 TypeMeta: metav1.TypeMeta{
\r
16 ObjectMeta: metav1.ObjectMeta{
\r
17 Labels: map[string]string{
\r
18 "app": "ricplt-hw-go",
\r
19 "chart": "hw-go-1.0.0",
\r
21 "release": "release-name",
\r
23 Name: "service-ricplt-hw-go-http",
\r
24 Namespace: "ricplt",
\r
26 Spec: corev1.ServiceSpec{
\r
27 Type: corev1.ServiceType("ClusterIP"),
\r
28 Ports: []corev1.ServicePort{
\r
33 Protocol: corev1.Protocol("TCP"),
\r
34 TargetPort: intstr.IntOrString{
\r
36 Type: intstr.Type(1),
\r
40 PublishNotReadyAddresses: false,
\r
41 Selector: map[string]string{
\r
42 "app": "ricplt-hw-go",
\r
43 "release": "release-name",
\r
48 service2 := &corev1.Service{
\r
49 ObjectMeta: metav1.ObjectMeta{
\r
50 Labels: map[string]string{
\r
52 "release": "release-name",
\r
53 "app": "ricplt-hw-go",
\r
54 "chart": "hw-go-1.0.0",
\r
56 Name: "service-ricplt-hw-go-rmr",
\r
57 Namespace: "ricplt",
\r
59 Spec: corev1.ServiceSpec{
\r
60 Type: corev1.ServiceType("ClusterIP"),
\r
61 Ports: []corev1.ServicePort{
\r
65 Protocol: corev1.Protocol("TCP"),
\r
66 TargetPort: intstr.IntOrString{
\r
68 Type: intstr.Type(1),
\r
75 Protocol: corev1.Protocol("TCP"),
\r
76 TargetPort: intstr.IntOrString{
\r
77 Type: intstr.Type(1),
\r
82 PublishNotReadyAddresses: false,
\r
83 Selector: map[string]string{
\r
84 "app": "ricplt-hw-go",
\r
85 "release": "release-name",
\r
88 TypeMeta: metav1.TypeMeta{
\r
94 return []*corev1.Service{service1, service2}
\r