-
Notifications
You must be signed in to change notification settings - Fork 807
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
Improve configuration management; Improve the relationship between driver, controller, & cloud #1995
Improve configuration management; Improve the relationship between driver, controller, & cloud #1995
Conversation
Code Coverage Diff
|
/retest |
5ea046f
to
f1cfddd
Compare
Nit: let's separate CVE fix from rest of PR. See Fix CVE G0-2024-2687 by bumping go and /x/net dependencies |
7391ee0
to
f1cfddd
Compare
f1cfddd
to
c249057
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work on improving the driver-cloud-metadata-options relationships
CI is down:
|
/retest |
CI has been restored |
4497e74
to
a654703
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Much cleaner, wish I ramped up on this version instead :P great work!
Side note: Will need rebase on top of #2007 after it is merged |
a654703
to
e6c731a
Compare
e6c731a
to
a32b96b
Compare
a32b96b
to
5caa059
Compare
/label tide/merge-method-squash |
/retest |
1 similar comment
/retest |
…iver, controller, & cloud Signed-off-by: torredil <[email protected]>
5caa059
to
42fc084
Compare
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: AndrewSirenko 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 |
What is this PR about? / Why do we need it?
This patch is the first of two, designed to improve the architecture of the code base with the goal of promoting a more cohesive and understandable design that makes it easier to reason about the driver and make future modifications or extensions more intuitive.
More specifically, this PR improves driver configuration management, migrates the metadata service into its own separate package to encapsulate metadata related functionality, and improves the relationship between driver/controller and cloud by separating the creation of
ControllerService
from its usage.Summary of Changes
Fix relationship between cmd/main and pkg/driver
Options
struct has been moved to the driver package, consolidating all driver-related configuration options in one place.cmd
package now focuses solely on the main entry point and setting up the necessary dependencies.NewDriver
function now accepts a pointer toOptions
instead of a variadic function, making it clearer and more straightforward to create a new driver instance.Migrate metadata service
metadata_ec2.go
,metadata.go
,metadata_interface.go
,metadata_k8s.go
,metadata_test.go
, andmock_metadata.go
) from the cloud package to a new metadata package.Improve relationship between driver and cloud
newControllerService
withNewControllerService
, which now takes a cloud object and options as parameters, allowing for dependency injection and easier testing.NewMetadataFunc
andNewCloudFunc
variables as they are no longer needed with the new architecture.main.go
file to create an instance of cloud to pass intoNewDriver
.ControllerService
.Note to Reviewer
This PR intentionally disables
csi-sanity
tests temporarily now thatNewFakeDriver
func which was previously created to instantiate a fake driver utilized in the sanity tests has been removed. These sanity tests must be re-written.What testing is done?
make verify && make test