Closed arun-gupta closed 6 years ago
Good point. We can probably add more context to validateArgs
. How about
$ draft config set registry
Error: This command needs 2 argument(s):
$ draft config set [key] [value]
We'll need to inject some context into validateArgs
to provide that experience, but that could make it more clear on the positional arguments the command wants.
What should the [key]
and [value]
be?
The key is registry
and the value is the name of your container registry. In docker terms, it's the image prefix, e.g. for bacongobbler/example-go
it's bacongobbler
, and for myacr.azurecr.io/example-go
it's myacr.azurecr.io
. Does that help? :)
However we use draft config set
for more than just the name of the container registry, which is why I'd like to solve this in a more generic way. :)
Given this is a multipurpose command, [key]
and [value]
are reasonable.
I think we may want to consider changing up the way config works at the moment. When I run draft config
, I should be able to see a set of things I can configure. In other words, I think we should see a set of nouns. Right now, there are verbs but I don't know how to apply those verbs and what I should apply them to. After deleting draft home and running a fresh draft init
, I don't even have registry
as an option. We may want to re-think this experience.
command comment: For instance the docker repo settings is ...
$ draft config set registry $docker_username
In the $HOME/.draft a file config.toml is created.
Which is populated with the name of the registry which refers to the docker hub.
registry = "$docker_username"
I am assuming this is for the draft for automatic docker pulls.
Now what are the other parameters that the KEY:VALUE can take and their use cases will be helpful
Ranga
draft config set registry
command prints the output:What should the
key
and thevalue
be? The usage is not clear and not specified at https://github.com/Azure/draft/blob/master/docs/getting-started.md.Ideally, it should prompt the user on the needed inputs.
Identified during hacking with @michelleN at #KubeCon