From dab11a88815942e72bef2bdef11e4a1be13bb08e Mon Sep 17 00:00:00 2001 From: jiuker <2818723467@qq.com> Date: Tue, 28 May 2024 14:48:18 +0800 Subject: [PATCH] fix: use portTlsName when tls is enable use portTlsName when tls is enable --- pkg/resources/services/service.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/resources/services/service.go b/pkg/resources/services/service.go index cd6decec876..3e5da06d394 100644 --- a/pkg/resources/services/service.go +++ b/pkg/resources/services/service.go @@ -151,7 +151,11 @@ func ServiceForBucket(t *miniov2.Tenant, bucket string) *corev1.Service { // NewHeadlessForMinIO will return a new headless Kubernetes service for a Tenant func NewHeadlessForMinIO(t *miniov2.Tenant) *corev1.Service { - minioPort := corev1.ServicePort{Port: miniov2.MinIOPort, Name: miniov2.MinIOServiceHTTPPortName} + name := miniov2.MinIOServiceHTTPPortName + if t.TLS() { + name = miniov2.MinIOServiceHTTPSPortName + } + minioPort := corev1.ServicePort{Port: miniov2.MinIOPort, Name: name} ports := []corev1.ServicePort{minioPort} if t.Spec.Features != nil && t.Spec.Features.EnableSFTP != nil && *t.Spec.Features.EnableSFTP {