From 489830052ad7991ce21b2e913e4912405e2f0ca0 Mon Sep 17 00:00:00 2001 From: Todd Neal Date: Thu, 9 Dec 2021 07:36:50 -0600 Subject: [PATCH] specify the port names in service/endpoint --- cmd/run.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmd/run.go b/cmd/run.go index a5905bd..7ea2f4f 100644 --- a/cmd/run.go +++ b/cmd/run.go @@ -135,6 +135,7 @@ inside the cluster as described by the configuration file.`, // and specify our new port mappings for _, port := range supplantSvc.Ports { var newPort v1.ServicePort + newPort.Name = port.Name newPort.Port = port.Port newPort.TargetPort = intstr.FromInt(int(port.LocalPort)) newPort.Protocol = svcPorts[port.Port].Protocol @@ -186,6 +187,7 @@ inside the cluster as described by the configuration file.`, for _, port := range supplantSvc.Ports { ep.Subsets[0].Ports = append(ep.Subsets[0].Ports, v1.EndpointPort{ + Name: port.Name, Port: port.LocalPort, }) }