Merge explicit ports with route-allocated ports during deploy
Previously, explicit port mappings from the service definition were ignored when routes were present. Now both are included, allowing services to have stable external port bindings alongside dynamic route-allocated ports. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -134,7 +134,8 @@ func (a *Agent) deployComponent(ctx context.Context, serviceName string, cs *mcp
|
|||||||
Error: fmt.Sprintf("allocate route ports: %v", err),
|
Error: fmt.Sprintf("allocate route ports: %v", err),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
runSpec.Ports = ports
|
// Merge explicit ports from the spec with route-allocated ports.
|
||||||
|
runSpec.Ports = append(cs.GetPorts(), ports...)
|
||||||
runSpec.Env = append(runSpec.Env, env...)
|
runSpec.Env = append(runSpec.Env, env...)
|
||||||
} else {
|
} else {
|
||||||
// Legacy: use ports directly from the spec.
|
// Legacy: use ports directly from the spec.
|
||||||
|
|||||||
Reference in New Issue
Block a user