mirror of
https://github.com/kemko/nomad.git
synced 2026-01-07 10:55:42 +03:00
fixed connect port label
This commit is contained in:
@@ -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",
|
||||
}}
|
||||
)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user