fixed connect port label

This commit is contained in:
AndrewChubatiuk
2021-02-09 15:31:48 +02:00
parent b7d1aee621
commit 4ed7323c8d
2 changed files with 5 additions and 5 deletions

View File

@@ -22,10 +22,10 @@ var (
},
}}
testConnectPorts = structs.AllocatedPorts{{
Label = "connect-proxy-redis"
Value = 3000,
To = 3000,
HostIP = "192.168.30.1",
Label: "connect-proxy-redis",
Value: 3000,
To: 3000,
HostIP: "192.168.30.1",
}}
)

View File

@@ -249,7 +249,7 @@ func groupConnectHook(job *structs.Job, g *structs.TaskGroup) error {
// create a port for the sidecar task's proxy port
portLabel := service.Connect.SidecarService.Port
if portLabel != "" {
if portLabel == "" {
portLabel = fmt.Sprintf("%s-%s", structs.ConnectProxyPrefix, service.Name)
}
injectPort(g, portLabel)