-
Notifications
You must be signed in to change notification settings - Fork 331
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
Add composite ConfigStore to combine multiple ConfigStore
#3027
Add composite ConfigStore to combine multiple ConfigStore
#3027
Conversation
In some repositories, we used multiple ConfigStores to store feature flags, for example, in eventing kafka broker, we use the Eventing core feature flags store and the EKB feature flags store Signed-off-by: Pierangelo Di Pilato <[email protected]>
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: pierDipi The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3027 +/- ##
==========================================
- Coverage 78.75% 78.73% -0.02%
==========================================
Files 188 189 +1
Lines 11107 8873 -2234
==========================================
- Hits 8747 6986 -1761
+ Misses 2094 1621 -473
Partials 266 266 ☔ View full report in Codecov by Sentry. |
Do you see this being
being used often in different reconcilers, besides the example in the description? Trying to understand where we can re-use it. |
This can be reused everywhere we have multiple config stores (config stores being mainly configmaps), a serving example could be: config-features and config-network in the case one reconciler depends on both impl := <resource>reconciler.NewImpl(ctx, reconciler, func(impl *controller.Impl) controller.Options {
return controller.Options{
ConfigStore: reconciler.ConfigStores{s1, s2},
// ...
}
}) and then the usage would just pull the config from the context in s1 := s1package.FromContext(ctx)
... |
Not sure if we have a scenario in Serving but ok I see how this can be useful. |
/lgtm |
/unhold @dprotaso I'm merging this as I don't see objections here |
/test unit-tests |
1 similar comment
/test unit-tests |
In some repositories, we used multiple ConfigStores to store feature flags, for example, in eventing kafka broker, we use the Eventing core feature flags store and the EKB feature flags store
Changes
ConfigStore