Skip to content
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

Revisit configuration management to support modification via UI #929

Open
Tracked by #860
nscuro opened this issue Nov 23, 2023 · 5 comments
Open
Tracked by #860

Revisit configuration management to support modification via UI #929

nscuro opened this issue Nov 23, 2023 · 5 comments
Assignees
Labels
architecture enhancement New feature or request help wanted Extra attention is needed p2 Non-critical bugs, and features that help organizations to identify and reduce risk size/XL Higher effort spike/research Requires more research before implementation

Comments

@nscuro
Copy link
Member

nscuro commented Nov 23, 2023

Most of the configuration options for new services are currently done via application.properties or environment variables.

This is in contrast to DT 4.x, which used primarily the UI. The drawback to UI configuration is that a new instance cannot easily be deployed with the desired settings in place, but requires manual adjustments.

However, there is still a requirement to have configuration options tweakable via UI. We have to find a way to allow for both models, as apparently relying on only one doesn't cut it.

@nscuro nscuro added enhancement New feature or request p2 Non-critical bugs, and features that help organizations to identify and reduce risk architecture size/XL Higher effort spike/research Requires more research before implementation labels Nov 23, 2023
@nscuro nscuro mentioned this issue Nov 23, 2023
34 tasks
@nscuro

This comment was marked as outdated.

@nscuro

This comment was marked as outdated.

@nscuro

This comment was marked as outdated.

@nscuro
Copy link
Member Author

nscuro commented Feb 29, 2024

Given there is no way to achieve a truly consistent view of configurations for all applications in the system, without:

  • Performing excessive database queries (i.e. at least one per processed Kafka record)
  • Using a centralized solution such as ZooKeeper, etcd, Consul, that supports watches

The (hopefully final) proposal is as follows:

  • Services query the database whenever they need to read a configuration
  • For some services, these queries will be very low volume (e.g. mirror-service); Caching not strictly required, but doesn't hurt either
  • For services where we anticipate a high volume of queries (e.g. vulnerability-analyzer), we utilize local read-through caching with short expiration intervals (few seconds up to 1min)

This should allow services like the vulnerability-analyzer to continue processing multiple thousands of records per second, without hammering the database. In the worst case, the cached configuration will be stale for up to 1min, but given the other options we have, that is actually not that bad.

Queries to fetch configuration options are lightweight. The biggest factor will be network latency, which the file-based configuration approach naturally didn't have.

@nscuro nscuro self-assigned this Apr 22, 2024
@nscuro
Copy link
Member Author

nscuro commented Apr 22, 2024

On the Quarkus side of things, I'm thinking we should plug into the existing config framework: https://quarkus.io/guides/config-extending-support#custom-config-source

By the looks of it, this can also be made to support reloads at runtime, and even change notification. Looking into it more.

nscuro added a commit that referenced this issue Apr 23, 2024
This replaces manual usage of `ConfigPropertyRepository` with more Quarkus-idiomatic `@ConfigProperty` injection. It leverages the new `quarkus-config-dependencytrack` extension.

Another unforeseen benefit is that it's now possible to simply provide property overrides for tests, instead of having to persist anything in a database.

Relates to #929

Signed-off-by: nscuro <nscuro@protonmail.com>
nscuro added a commit that referenced this issue Apr 24, 2024
This replaces manual usage of `ConfigPropertyRepository` with more Quarkus-idiomatic `@ConfigProperty` injection. It leverages the new `quarkus-config-dependencytrack` extension.

Another unforeseen benefit is that it's now possible to simply provide property overrides for tests, instead of having to persist anything in a database.

Relates to #929

Signed-off-by: nscuro <nscuro@protonmail.com>
nscuro added a commit that referenced this issue Apr 24, 2024
This replaces manual usage of `ConfigPropertyRepository` with more Quarkus-idiomatic `@ConfigProperty` injection. It leverages the new `quarkus-config-dependencytrack` extension.

Another unforeseen benefit is that it's now possible to simply provide property overrides for tests, instead of having to persist anything in a database.

Relates to #929

Signed-off-by: nscuro <nscuro@protonmail.com>
nscuro added a commit that referenced this issue Apr 30, 2024
This replaces manual usage of `ConfigPropertyRepository` with more Quarkus-idiomatic `@ConfigProperty` injection. It leverages the new `quarkus-config-dependencytrack` extension.

Another unforeseen benefit is that it's now possible to simply provide property overrides for tests, instead of having to persist anything in a database.

Relates to #929

Signed-off-by: nscuro <nscuro@protonmail.com>
@VinodAnandan VinodAnandan added the help wanted Extra attention is needed label Jun 30, 2024
@nscuro nscuro added this to Hyades Oct 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
architecture enhancement New feature or request help wanted Extra attention is needed p2 Non-critical bugs, and features that help organizations to identify and reduce risk size/XL Higher effort spike/research Requires more research before implementation
Projects
Status: In Progress
Development

No branches or pull requests

2 participants