feat: bind config with cobra flags to override the conf#274
Conversation
Pull Request Test Coverage Report for Build 2113048272
💛 - Coveralls |
|
@sravankorumilli by default, salt is flattening the config keys with dot Instead of dot I’m proposing the changes for salt config to have ability to replace the flag name delimiter, like we have on EnvKeyReplacer wdyt? |
|
add feature to salt package for overriding config via flags raystack/salt#30 |
sravankorumilli
left a comment
There was a problem hiding this comment.
What is the scope of this PR? Is it handled everywhere?
|
|
||
| cmd.Flags().StringVarP(&projectName, "project", "p", projectName, "Name of the optimus project") // TODO: fix overriding conf via args | ||
| cmd.Flags().StringVar(&optimusHost, "host", optimusHost, "Optimus service endpoint url") // TODO: fix overriding conf via args | ||
| cmd.Flags().StringP("project-name", "p", defaultProjectName, "Name of the optimus project") |
There was a problem hiding this comment.
this change needs a corresponding change in the entrypoint.sh where ever it is referred when the optimus binary is upgraded in the plugins.
There was a problem hiding this comment.
noted, after we bump the optimus version, we can later update the flag name in endpoint.sh for each plugins
All command that use flags to override the config should be impacted @sravankorumilli |
c87fc04 to
ae989a3
Compare
|
summarizing our discussions: |
-delimiter instead of.delimiter (--project-name instead of --project.name)TODO next (can be done in separate PR):
--projectto--project-nameon entrypoint.sh for each plugins