-
Notifications
You must be signed in to change notification settings - Fork 501
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
Support file-based plugin configuration in catalog with hot reload #5165
Comments
Outstanding question is how do we want to trigger reloading. Signal? Timer? |
I have a prototype implementation I'll dust off for this. Just need to write up some tests. |
For clarification, the "k8s_psat.conf" file in the example above would be HCL (version 1) correct? If we are establishing plugin loading policy, I propose that such files match whatever the server loads (HCL 1.0 at the moment). |
By convention, that's correct. And certainly what will be expected for all built-in plugins for the foreseeable future. Technically, SPIRE Core would no longer care as long as the configuration was utf-8 text based, since this data isn't parsed alongside the main HCL config. The data would be loaded from file, turned into a string, and then otherwise passed unmodified/unparsed into the plugin. So external plugin authors could do what they wanted 🤷 |
Plugin configuration today happens once, when the plugin is loaded by the catalog. The plugin configuration data is provided statically by the contents of the
plugin_data
section of the plugin config.Several use cases exist where it would be convenient to change plugin configuration at runtime (#4390).
We can support this generically in the catalog system by introducing a new
plugin_data_file
setting. This setting would be mutually exclusive withplugin_data
. It would point to a file on disk where the plugin configuration would live.For example, this is how a plugin configuration looks today:
And this is how a plugin configuration would look using this option:
And the
plugin.conf
file:Either on some interval, or in response to a signal or something, the catalog would:
The Configure RPC is already documented to indicate that implementations should be able to respond to Configure calls executed concurrently with other RPCs. Built-in plugins are all written to expect this.
The text was updated successfully, but these errors were encountered: