-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Config service server side #5317
Comments
Related to #5312 |
I just ran into a need for this as well when doing the refactoring for #6498 Based on the references to this ticket, it seems like there are a few different wants:
If that's accurate, I'd propose moving all of the config to the server and exposing it as a rest api. We could roll everything into server.config which plugins can access on the server side, and any front end clients could leverage the API. Does that seem like a reasonable solution? |
Yeah, I'm with Matt, REST API-ify this thing. And let's do it sooner than later |
How it that going to work with the config file? Are there going to be certain settings that are read from kibana.yml and some from elasticsearch? Do we persist changes to both places? |
See #6849 |
Good questions @spalger. Perhaps we shouldn't mix the two configs. What if we created a separate Hapi plugin specifically for handling the config in ES (what's a good name for that config? Application config? User config?). Then it would be available to all the other server side plugins, it would be responsible for providing the "settings REST api", it would be separate from server.config and it would provide other plugins with a mechanism for storing config in ES without reinventing the wheel. |
I wasn't planning on merging "advanced settings" with application-specific configuration. These are two entirely different types of configuration. The former is user-provided while the latter is admin-provided. The PR I'm working on addresses advanced settings, application-specific configuration as an API is something I would advise against. |
@bevacqua I was referring more to the way server-side components will access both types of config, I assumed the API would only expose the advanced settings. BTW I would actually build the API last, there are a few more important building blocks we need first:
|
I agree that we should not merge the two configs. There are things that are more appropriate for a config file (things that shouldn't be editable by end users, or that need to be kept secret) and there are things that should be easy to change from the UI. For this the current system works well enough, we just need to move the schema/document management to the server so that plugins can extend the configuration, server code and other plugins can access that configuration, and so the configuration can be modified with an API. |
@bevacqua how's this coming along? Do we think it'll make alpha2? |
@bevacqua 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 so how do I use it? Could you add some descriptive text on the PR maybe? |
See #6849 (comment) |
@bevacqua cool! How do I access config values in server side code? |
Sweet. Looks good! |
Closed by #6849 |
Currently the config service is not available from the server, plugins need that
The text was updated successfully, but these errors were encountered: