Configuration file validation should evaluate environment variables
Closed this issue · 3 comments
babadofar commented
kafka-shell works fine using environment variables for bootstrap server and zookeeper, but barfs at schema_registry_url due to a validation error
To Reproduce
Use a config.yaml file like this
version: 1
enable:
history: true
save_on_exit: true
auto_complete: true
auto_suggest: true
inline_help: true
fuzzy_search: true
cluster: local
clusters:
local:
bootstrap_servers: $BOOTSTRAP_SERVER
zookeeper_connect: $ZOO_KEEPER
schema_registry_url: $SCHEMA_REGISTRY
Expected behavior
It should evalute the environment variables
Screenshots
[root@d89fde020d7f /]# kafka-shell
Invalid user configuration (clusters, local, schema_registry_url): '$SCHEMA_REGISTRY' does
not match '^https?://(.*)$'
devshawn commented
Hey, thanks for the detailed bug report. This wasn't a use case I considered heavily -- but definitely a great idea. I'll take a look at this tonight and get a fix out.
devshawn commented
Hi there, schema_registry_url
and ksql_server_url
will now accept environment variables. I've released 0.1.2
to address this.
Please let me know if there are any other configuration settings that you'd like to work with environment variables. Thanks!! :)
babadofar commented
🏆 awesome work! Thanks