Qovery / qovery-cli

Qovery Command Line Interface
https://www.qovery.com
Apache License 2.0
78 stars 24 forks source link

Better context on `domain list` #249

Open intrepidvaillant opened 9 months ago

intrepidvaillant commented 9 months ago

What would you like to be added:

A better return from the qovery container domain list command. I use it with the --json flag to be able to list and use different link from that container elsewhere. But at the moment it is just returning a link, with absolutly no id and no context. A return indicating the link between port from the container and the link would be amazing. I can make some grep / sed to get the link but It's clearly not a viable idea and can break easily.

Why is this needed:

More ease and less tinkering on my end, really just a QOL functionality.

Edit:

I have tried with the --verbose flag, and the return from the API seems to be more thorough, but seems to be translated when passing a --json flag. But extracting that return is a bit tedious.

Result in the --verbose return

{
  "results": [
    {
      "url": "https://custom+default-url.from.qovery",
      "internal_port": 8010,
      "external_port": 443,
      "is_qovery_domain": true,
      "is_default": false
    },
    {
      "url": "https://default-url.from.qovery",
      "internal_port": 8020,
      "external_port": 443,
      "is_qovery_domain": true,
      "is_default": true
    }
  ]
}

Instead of

[
  {
    "domain": "custom+default-url.from.qovery",
    "id": null,
    "type": "BUILT_IN_DOMAIN",
    "validation_domain": null
  },
  {
    "domain": "default-url.from.qovery",
    "id": null,
    "type": "BUILT_IN_DOMAIN",
    "validation_domain": null
  }
]
acarranoqovery commented 6 months ago

Hi @intrepidvaillant,

this is not strictly related to the CLI but to the way custom domain are managed in Qovery.

Right now there's no strong relation between a domain and a port and it is something we have to improve, I've added this into our roadmap https://roadmap.qovery.com/p/better-manage-link-and-configuration-of-domain-port-for-an

there could be a workaround to implement on the CLI (parse the domains, pull the port info etc..) but we prefer to directly improve the information backend side