-
-
Notifications
You must be signed in to change notification settings - Fork 139
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
Load values from files if the file exist #412
Comments
Is FileContentFlag what you want? |
To your second point, Kong doesn't support dynamic config. It's crossed my mind a few times, but I think it is outside the scope of Kong. That said, I think you could make it work with a mapper of some sort. |
No. I would want something like:
And then if
Closest I have found is this example of using env-file. In this case it kinda works like above: if the file contains
I think it might be easier to do simply do I think that calling |
So I am thinking about managing secrets. One way to manage them is to have them stored to a file and then program reads it from a file. I am thinking that it would be nice if Kong supported first-class support for that pattern. So like there is
env
which can be read for a value, it could also befile
pointing to a file path. And if that file path exists, the value is read from the file (and of course values could be tried in order, like first file, then env, then config, then CLI, I am not sure what is current order, but file would be in there somewhere).Some thoughts:
file
should be only a filename and then directory should be provided in some other way (maybe through Kong var or by having another flag which tells the directory, like the config flag currently loads config).The text was updated successfully, but these errors were encountered: