Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create dynamic defaults for service creation #101

Closed
brmzkw opened this issue Jul 28, 2023 · 0 comments
Closed

Create dynamic defaults for service creation #101

brmzkw opened this issue Jul 28, 2023 · 0 comments
Labels
good first issue Good for newcomers

Comments

@brmzkw
Copy link
Contributor

brmzkw commented Jul 28, 2023

The command koyeb service create myservice --app myapp creates a default port (80:http) and route (/:80).

If the port is overriden but not the route, the default route is still created and the service creation will fail:

$> koyeb service create myservice --app test --docker nginx --port 9999
❌ Error while creating the service: the Koyeb API returned an error 400: Validation error

🔎 Additional details
Field definition.routes.0.port: unknown port "80"

🏥 How to solve the issue?
Fix the request, and try again

🕦 The original error was:
400 Bad Request

To solve the issue, the route must also be overridden:

koyeb service create myservice --app test --docker nginx --port 9999 --route /:9999
INFO[0000] Service deployment in progress. Access deployment logs running: koyeb service logs fe91a7cd.

If only one of the route or the port is set, we should use it's value to compute the other flag's default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
1 participant