-
Notifications
You must be signed in to change notification settings - Fork 40
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
Design doc #2
Merged
Merged
Design doc #2
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
# lvm-operator | ||
Operator that manages Topolvm | ||
|
||
# Contents | ||
- [docs/design](doc/design/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Operator design | ||
|
||
# Controllers and their managed resources | ||
|
||
|
||
- **lvmcluster-controller:** Running in the operator deployment, it will create all resources that are don't require information from the node. When applicable, the health of the underlying resource is updated in the LVMCluster status and errors are also exposed as events. Overall success also passed on as an event.: | ||
- vgmanager daemonset | ||
- this will require | ||
- lvmd daemonset | ||
- CSIDriver CR | ||
- CSI Driver Controller Deployment (controller is the name of the csi-component) | ||
- CSI Driver Daemonset | ||
- needs an initContainer to block until lvmd config file is read | ||
- StorageClass (TBD) | ||
- **The vg-manager:** A daemonset with one instance per selected node, will create all resources that require knowledge from the node. Errors and PVs being added to a volumegroup will be passed on as events. | ||
- volumegroups | ||
- lvmd config file | ||
|
||
|
||
|
||
Each unit of reconciliation should implement the reconcileUnit interface. | ||
This will be run by the controller, and errors and success will be propogated to the status and events. | ||
This interface is defined in [lvmcluster_controller.go](../../controllers/lvmcluster_controller.go) | ||
|
||
``` | ||
type reconcileUnit interface { | ||
|
||
// getName should return a camelCase name of this unit of reconciliation | ||
getName() string | ||
|
||
// ensureCreated should check the resources managed by this unit | ||
ensureCreated(*LVMClusterReconciler, lvmv1alpha1.LVMCluster) error | ||
|
||
// ensureDeleted should wait for the resources to be cleaned up | ||
ensureDeleted(*LVMClusterReconciler, lvmv1alpha1.LVMCluster) error | ||
|
||
// updateStatus should optionally update the CR's status about the health of the managed resource | ||
// each unit will have updateStatus called induvidually so | ||
// avoid status fields like lastHeartbeatTime and have a | ||
// status that changes only when the operands change. | ||
updateStatus(*LVMClusterReconciler, lvmv1alpha1.LVMCluster) error | ||
} | ||
``` |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This will be a separate pod, not part of the operator deployment.
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.
This is referring to the mian reconcile loop in the operator deployment. This is not referring to the CSI driver component topolvmcluster-controller.