-
Notifications
You must be signed in to change notification settings - Fork 263
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
~/.kn/config.yaml should accept and retain camel cased configuration #414
Comments
/assign @maximilien |
OK so after about an hour or so of digging, it seems that Viper does not have support to keeping the keys in the config case sensitive. This is a know issue and problem that the Viper community have been debating for over a year. A PR was submitted earlier this year to add support to Viper to allow end user to select case sensitivity or not. There is much discussions and the PR author has kept it up to date. However, it has not been merged. This has cause some users to move on and use other config system, fork Viper to include PR, or build their own. I could not see a clear way out but I have not digged deep yet. So the question to all is what to do about this. I see three possible outcome:
I have checked that Viper does indeed keep case for values, so if the user set ➜ ~ cat ~/.kn/config.yaml
lookuppluginsinpath: true
pluginsdir: ~/.kn/plugins And when / if Viper adds case sensitivity we can turn that on then.
I'll add an item on the 10/01/2019 working group where we can hopefully decide so I can resolve this. |
After today's 10/01/2019 call we agreed to go with option 1 above ^^^ and also use dashes in the keys. So the example config above would become: ➜ ~ cat ~/.kn/config.yaml
lookup-plugins-in-path: true
plugins-dir: ~/.kn/plugins There is also interest in simplifying the names for keys (yeah). Since we have two keys and |
This solves 414 by adopting new format for config keys and thereby bypassing the need for case sensitivity in Viper. Also changed `lookupPluginsInPath` key to `lookup-plugins` and also same for the persistent flag. The PATH part is implied and can be read from help.
OK let's move all discussions to PR #428 |
This solves 414 by adopting new format for config keys and thereby bypassing the need for case sensitivity in Viper. Also changed `lookupPluginsInPath` key to `lookup-plugins` and also same for the persistent flag. The PATH part is implied and can be read from help.
This solves 414 by adopting new format for config keys and thereby bypassing the need for case sensitivity in Viper. Also changed `lookupPluginsInPath` key to `lookup-plugins` and also same for the persistent flag. The PATH part is implied and can be read from help.
…ase (knative#428) This solves 414 by adopting new format for config keys and thereby bypassing the need for case sensitivity in Viper. Also changed `lookupPluginsInPath` key to `lookup-plugins` and also same for the persistent flag. The PATH part is implied and can be read from help.
In what area(s)?
Kn configuration. Also in docs.
See PR #411 for discussions
Classifications:
What version of Knative Client?
What version of Knative Serving running on your cluster?
Expected Behavior
Configuration entries in the
~/.kn/config.yaml
file should retain their case sensitivity.Actual Behavior
Currently they seem to always be caseless, e.g.,
pluginsdir: ~/.kn/plugins
Steps to Reproduce the Problem
Start without any
~/.kn/config.yaml
and create emty filetouch ~/.kn/config.yaml
.Run
kn --help
Your
~/.kn/config.yaml
will be populated with default configurations that are caseless.The text was updated successfully, but these errors were encountered: