You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rather than using an ambiguous string to define a provider, rather have each provider as a sub-command to the create command
Expected Behaviour
Have better type safety, better discovery, and easier usage for users
Current Behaviour
Run the create command and add flags as they are needed. Different per provider
Possible Solution
Create separate commands for each provider. The files are already separated, this would just be to add the &cobra.Command{} to the top of each file, and adding the commands to the create command.
The added bonus here is that there can be provider specific help information displayed in the terminal. An excellent use of the help text would be to display what is being created... (this is only known by reading the code, or inlets-operator readme)
$ inletsctl create gcp --help
Create an exit node on Google Cloud Platform.
Note: The account associated with the access token
will need compute.firewalls.create and serviceaccount user permissions
Usage:
inletsctl create gcp \
--access-token-file $HOME/gcp-token.json \
--zone "us-central1-a" \
--project-id "awesomness"
Flags:
...
This would also allow the flags available to be specific to the provider being used rather than having to negotiate a long list where some are relevant, and others are not.
It also provides an outlet for provider specific information. In the above example, this includes access permissions needed for inletsctl needs to be successful
It would also remove 19 if checks each with a string value defined each time (maintenance overhead).
Steps to Reproduce (for bugs)
N/A
Context
I read through the code to know what each flag was being used for in the specific provider I was planning on using. Some of the flags are called out in the help, but not all.
"Do the commands with no provider called out mean it's required for all or none?"
eg: --region
"What happens if I leave one of the flags empty?"
eg: --remote-tcp
Also, there is no specific documentation for any one provider. In the demo gif, it's DigitalOcean, in the readme, there is an example for Scaleway, but again nothing inclusive
Your Environment
inlets version inlets --version
Version: 0.3.9
Docker/Kubernetes version docker version / kubectl version:
N/A
Operating System and version (e.g. Linux, Windows, MacOS):
Ubuntu Linux
Link to your project or a code example to reproduce issue:
N/A
The text was updated successfully, but these errors were encountered:
I've updated the issue with more detail in the "Possible Solution" to show how there could be provider specific help information displayed in the output.
Currently, the experience with anything other than DigitalOcean, is run it, see why it failed, fix it, run it again, repeat. This is a poor user experience.
It may also be worth noting that the k3sup project is already organized like this with the apps command.
Rather than using an ambiguous string to define a provider, rather have each provider as a sub-command to the
create
commandExpected Behaviour
Have better type safety, better discovery, and easier usage for users
Current Behaviour
Run the
create
command and add flags as they are needed. Different per providerPossible Solution
Create separate commands for each provider. The files are already separated, this would just be to add the
&cobra.Command{}
to the top of each file, and adding the commands to thecreate
command.The added bonus here is that there can be provider specific help information displayed in the terminal. An excellent use of the help text would be to display what is being created... (this is only known by reading the code, or inlets-operator readme)
This would also allow the flags available to be specific to the provider being used rather than having to negotiate a long list where some are relevant, and others are not.
It also provides an outlet for provider specific information. In the above example, this includes access permissions needed for inletsctl needs to be successful
It would also remove 19
if
checks each with a string value defined each time (maintenance overhead).Steps to Reproduce (for bugs)
N/A
Context
I read through the code to know what each flag was being used for in the specific provider I was planning on using. Some of the flags are called out in the help, but not all.
"Do the commands with no provider called out mean it's required for all or none?"
"What happens if I leave one of the flags empty?"
Also, there is no specific documentation for any one provider. In the demo gif, it's DigitalOcean, in the readme, there is an example for Scaleway, but again nothing inclusive
Your Environment
inlets --version
Version: 0.3.9
docker version
/kubectl version
:N/A
Ubuntu Linux
N/A
The text was updated successfully, but these errors were encountered: