-
Notifications
You must be signed in to change notification settings - Fork 910
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
Allow defining credentials from variable environment #49
Comments
@htaidirt, thank you for your contribution. Please find some comments below.
Currently Kedro supports deploying credentials for production via configuration environments. Default project template contains 2 of them -
Currently you can manually construct/enrich your credentials dictionary in src/<package_name>/run.py with any data, including one coming from the environment variables. In long term we consider adding templating capability for kedro configs, which may, possibly, handle environment variables, however exact specification hasn't been finalised yet. |
We have updated our docs regarding credentials in 5f4325f. So I am closing this for now, but feel free to re-open it if this is still an issue :) |
Hello,
When I clone the project, the file conf/local/credentials.yml is not present,
For this I modified run.py as follows:
This does the job for now but is it future proof ? Is there a better way to do this? |
@HugoPerrier Can you please open a new issue and cross-link to this thread in there? Otherwise we won't get much visibility on the updates in closed issues. Regarding your question: There might be a better way of handling your credentials using |
I posted my solution in Thanks for the help |
I am not sure how I can use the crendtials for CI environment, I cannot just put in the YAML in the local/ folder. |
Description
It is not clear how one can best deploy Kedro with credentials for production. A good practice in traditional applications is to put sensitive credentials using environment variables.
In Kedro, it looks like it relies only on
credentials.yml
, located somewhere except inconf/local/
folder.(PS: If I'm missing something with this, the problem is probably bad or missing documentation since I'm not able to find this information in the doc)
Context
Using environment variables will help standardize the deployment of Kedro like any app, thus reduces learning curve for developers.
Possible Implementation
Possible change could be to look for environment variables first, before looking for the content of
credentials.yml
. Changes will mainly be located inConfigLoader
class.Possible Alternatives
I create
credentials.yml
file inconfig/base/
folder, because this folder ignored by Git, but is still packaged in the Kedro Docker. This is still not good because the credentials are now located in the Docker images repository: Anyone can pull that image and get prod credentials!If this is an interesting implementation (which I think it is), I would be happy to contribute by implementing it. I first want to open the discussion about the best implementation given Kedro orientation, before making any pull request.
Regards,
The text was updated successfully, but these errors were encountered: