-
Notifications
You must be signed in to change notification settings - Fork 205
WIP: CVO configuration: Introduce a config provider interface #1233
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
base: main
Are you sure you want to change the base?
WIP: CVO configuration: Introduce a config provider interface #1233
Conversation
Utilize a new structure, which holds the relevant information regarding the desired CVO configuration and its status to encapsulate this information to a simple data structure.
Using the field we can avoid changing the actual logging during testing by assigning a different function to the field. We can now also verify that the handler field is being executed.
The information regarding enabled feature gates is now available sooner in the code. Utilize this information to conditionally initialize the configuration controller. The subsequent code can then easily check for existence of the configuration using a nil.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: DavidHurta 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 |
An error in the start logic will now result in the immediate shutdown of the CVO, rather than in the CVO catching the failed controller and continuing to work by ignoring the failed start.
Introduce a configuration provider interface. The goal of the interface is to abstract the underlying system of fetching the CVO configuration. Be it a Kubernetes API server, or a configuration file. For the moment, the Kubernetes API server is the sole provider. Refactor the code to adhere to the new logic. Apply a default configuration on a NotFound error (was previously noted as a TODO in the source code).
Due to recent changes, the two tests can now be safely merged together. The second test verified the overall synchronization, which is now also being exercised in the first test. The tests cases were copied or were already present.
06b6212
to
89c4930
Compare
@DavidHurta: The following tests failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
/cc |
/uncc |
I want to run a CI. I will likely break up the PR into smaller ones.