-
Notifications
You must be signed in to change notification settings - Fork 126
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
Migrate the ConfigStore to use standard infrastructure. #150
Conversation
Knative has a ton of utilities for managing config storage, watching configmaps, and snapshotting those configmaps onto context during each reconciliation. This is really just a first chunk, but migrates the bulk of the config package to support the standard interfaces, use the libraries for validation, and leverage the shared configmap watching libraries. In a subsequent change, it would make the most sense to have the signer extract the config store from the context it is passed instead of having its own reference, but this change has grown overly large already. /kind cleanup
Not sure what's going on here with go-license 😞 |
This changes the signer to access the config and the logger off of context instead of squirreling them away at construction. For the configstore, this is about consistency. The reconciliation framework snapshots configurations onto context at the beginning of reconciliation so that the configuration doesn't change in the middle of reconciliation. By having the signer access the same config as the rest of the reconciler, we ensure that we don't get inconsistent views of the configuraton data. For the logger, this is about tagging. The reconciliation framework infuses the base logger with a variety of additional tagging, like the reconciliation key, which the current signer's logger doesn't have, so by switching to the logger that comes from the reconciliation context, we will get significantly richer log tagging from within the signer.
I pushed the rest of the change here as a separate commit, but need to sort out the go-license things still, which I'll probably need some pointers on. |
Thanks to @dlorenc for spotting the missing newline in |
I screwed something up, I added and removed the follow up commit here, and I want to clean that up. |
ok it should be fixed. |
Finally green 😅 |
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dlorenc 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 |
Knative has a ton of utilities for managing config storage, watching configmaps, and snapshotting those configmaps onto context during each reconciliation.
This is really just a first chunk, but migrates the bulk of the config package to support the standard interfaces, use the libraries for validation, and leverage the shared configmap watching libraries.
In a subsequent change, it would make the most sense to have the signer extract the config store from the context it is passed instead of having its own reference, but this change has grown overly large already.
/kind cleanup
cc @priyawadhwa @dlorenc