On Koyeb, routes are optional. If the route is not specified, the service is only accessible from the mesh network.
The function setDefaultPortsAndRoutes of services.go forces to always have a route by doing the following:
if --route and --port are both omitted, the default route /:8000 is generated
if --port is specified once, the default route /:<port value> is generated. If --port is specified more than once, we return an error.
We should allow the following:
on service creation, allow to specify that the service should not be publicly accessible
on service update, if the service currently has a route, allow to remove it
on service update, if the service doesn't currently have a route, allow to add one
To do so, we can add a new flag --public (defaults true). When false, no default route should be generated. If --public=false is set, we should remove the routes. If --public=false is set with --routes, we should return an error.
We also need to handle the case where the service is not public, and koyeb service update xx/xx is called (without specifying the route). In this case, the route should not be generated.
On Koyeb, routes are optional. If the route is not specified, the service is only accessible from the mesh network.
The function setDefaultPortsAndRoutes of services.go forces to always have a route by doing the following:
--route
and--port
are both omitted, the default route/:8000
is generated--port
is specified once, the default route/:<port value>
is generated. If--port
is specified more than once, we return an error.We should allow the following:
To do so, we can add a new flag
--public
(defaults true). When false, no default route should be generated. If--public=false
is set, we should remove the routes. If--public=false
is set with--routes
, we should return an error.We also need to handle the case where the service is not public, and
koyeb service update xx/xx
is called (without specifying the route). In this case, the route should not be generated.