Skip to content

Commit 5db3012

Browse files
authored
[Chore] specify the capacity on calling make (#2719)
Signed-off-by: fscnick <[email protected]>
1 parent 82e2554 commit 5db3012

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ray-operator/controllers/ray/common/service.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ func BuildServeService(ctx context.Context, rayService rayv1.RayService, rayClus
211211

212212
// `portsInt` is a map of port names to port numbers, while `ports` is a list of ServicePort objects
213213
portsInt := getServicePorts(rayCluster)
214-
ports := []corev1.ServicePort{}
214+
ports := make([]corev1.ServicePort, 0, 1)
215215
for name, port := range portsInt {
216216
if name == utils.ServingPortName {
217217
svcPort := corev1.ServicePort{Name: name, Port: port}
@@ -245,7 +245,7 @@ func BuildServeService(ctx context.Context, rayService rayv1.RayService, rayClus
245245
log.Info("port with name 'serve' already added. Ignoring user provided ports for serve service")
246246
serveService.Spec.Ports = ports
247247
} else {
248-
ports := []corev1.ServicePort{}
248+
ports := make([]corev1.ServicePort, 0, 1)
249249
for _, port := range serveService.Spec.Ports {
250250
if port.Name == utils.ServingPortName {
251251
svcPort := corev1.ServicePort{Name: port.Name, Port: port.Port}

0 commit comments

Comments
 (0)