kubeshop / monokle-cli

CLI for Monokle core validation library
19 stars 3 forks source link

Possibility to override cloud endpoint #39

Closed f1ames closed 10 months ago

f1ames commented 10 months ago

This PR fixes #23. it introduced mechanics to set origin according to initial issue, https://github.com/kubeshop/monokle-cli/issues/23#issuecomment-1808310030 and https://github.com/kubeshop/monokle-cli/issues/23#issuecomment-1814178247:

login

For login command one could use --origin flag (highest priority) and also MONOKLE_ORIGIN env var (lower priority) will be read and used if set. If neither is provided, user will be prompted if he/she wants to use custom origin. Origin is preserved upon login so all commands (as long as you stay logged in) will connect to this origin.

validate and config

If user is logged in, origin set during login process is used. Still, no matter if authenticated or not, one can use --apiToken + --project + --origin to run those commands with different origin (or just --apiToken + --project to run on the same origin but with different credentials).

At the beginning I thought to take MONOKLE_ORIGIN env into account also for validate and config command runs but it really seemed like it will make it more confusing and complicated (both for the user and from the code perspective).

monokle 20231120-1


Requires https://github.com/kubeshop/monokle-core/pull/567.

Changes

Fixes

Checklist