Custom Config reader for reading configs and secrets from environment variables#6
Conversation
90b30be to
6b574b4
Compare
6b574b4 to
aeb6974
Compare
|
Hi @venkatvghub I like the idea. But I was wondering if we could adhere to the pinot convention of using Also, the implementation seems to be field specific? Do all the fields respect environment variables? I think it might be confusing if one field translates the env var while the other doesn't. |
|
|
Hi @venkatvghub we could just do IMO. To support environment variables, we could start with |
Description
This PR adds a custom config reader to read configurations from environment variables.
Why is this needed
Specifically in container environments like docker and kubernetes, we might have multiple environments and also possibly want to control secrets and configurations using kubernetes secrets / configmaps. In addition, we do not want to commit these credentials into code as well. So, in essence, instead of directly file mounting the
data-sources-config.ymlas a secret, we can selectively define some of the configs like hostname, port, username, password etc as kubernetes or docker secrets.E.g.: Our default
data-sources-config.ymlmight look like this:With this PR, we can do the following:
In essence, for all the above configs, add
?$<ENVIRONMENT_VARIABLE_NAME>to ensure we can pass these as environment variablesAnd then the kubernetes deployment will look like the following:
Upgrade Notes
Does this PR prevent a zero down-time upgrade? (Assume upgrade order: Controller, Broker, Server, Minion)
backward-incompat, and complete the section below on Release Notes)Does this PR fix a zero-downtime upgrade introduced earlier?
backward-incompat, and complete the section below on Release Notes)Does this PR otherwise need attention when creating release notes? Things to consider:
release-notesand complete the section on Release Notes)Release Notes
Documentation
TODO