-
Notifications
You must be signed in to change notification settings - Fork 69
chore(gckms): add file support for GCKMS_CONFIG
env var
#1956
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
base: master
Are you sure you want to change the base?
Conversation
GCKMS_CONFIG
env varGCKMS_CONFIG
env var
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey! Thanks for the contribution 😎
I think it’s a good idea to refine the error logs. I wonder if we can refactor this change such that the file existence check (fs.existsSync) is only performed once. Currently, it’s being called in both branches of the if statement, which duplicates work.
44dda57
to
dc620ec
Compare
Hi @james-a-morris, I made some changes, On a sidenote: I don't think it's a good idea to load put a module in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey! Thanks for these Looks good - however this current build fails 😞
@james-a-morris I updated the branch, and now CI is passing. :) |
Adds support for file paths in the
GCKMS_CONFIG
environment variable, allowing configurations to be loaded from a file or directly from an inline JSON string. It improves error handling with clear messages for missing or empty configurations and refines the.GckmsOverride.js
logic for better maintainability. These changes enhance flexibility and simplify integration with various deployment setups.