From 3143e8d97eb1fb116e3e5a60872223dba6a6e73b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=80=86=E6=B5=81=E8=80=8C=E4=B8=8A?= <62740231+DokiDoki1103@users.noreply.github.com> Date: Tue, 16 Jan 2024 15:58:25 +0800 Subject: [PATCH] fix: service name (#211) --- controllers/handler/mq.go | 4 ++-- controllers/handler/webcli.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/controllers/handler/mq.go b/controllers/handler/mq.go index 0b68ce01..889b857e 100644 --- a/controllers/handler/mq.go +++ b/controllers/handler/mq.go @@ -134,14 +134,14 @@ func (m *mq) deployment() client.Object { func (m *mq) service() client.Object { return &corev1.Service{ ObjectMeta: metav1.ObjectMeta{ - Name: NodeName, + Name: MQName, Namespace: m.component.Namespace, Labels: m.labels, }, Spec: corev1.ServiceSpec{ Ports: []corev1.ServicePort{ { - Name: NodeName, + Name: MQName, Port: 6300, TargetPort: intstr.FromInt(6300), }, diff --git a/controllers/handler/webcli.go b/controllers/handler/webcli.go index 54838afe..a1c10c06 100644 --- a/controllers/handler/webcli.go +++ b/controllers/handler/webcli.go @@ -135,14 +135,14 @@ func (w *webcli) deployment() client.Object { func (w *webcli) service() client.Object { return &corev1.Service{ ObjectMeta: metav1.ObjectMeta{ - Name: WorkerName, + Name: WebCliName, Namespace: w.component.Namespace, Labels: w.labels, }, Spec: corev1.ServiceSpec{ Ports: []corev1.ServicePort{ { - Name: WorkerName, + Name: WebCliName, Port: 7171, TargetPort: intstr.FromInt(7171), },