-
Notifications
You must be signed in to change notification settings - Fork 39
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 volume group replication controller code #610
Open
Nikhil-Ladha
wants to merge
3
commits into
csi-addons:main
Choose a base branch
from
Nikhil-Ladha:add-vgr-controller-us
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,565
−163
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
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
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
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
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
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,37 @@ | ||
# VolumeGroupReplication | ||
|
||
VolumeGroupReplication is a namespaced resource that contains references to storage object to be grouped and replicated, VolumeGroupReplicationClass corresponding to the driver providing replication, VolumeGroupContent and VolumeReplication CRs. | ||
|
||
`volumeGroupReplicationClassName` is the name of the class providing group replication. | ||
|
||
`volumeReplicationClassName` is the name of the class providing the replication for volumeReplication CR. | ||
|
||
`volumeReplicationName` is the name of the volumeReplication CR created by this volumeGroupReplication CR | ||
|
||
`volumeGroupReplicationContentName` is the name of the volumeGroupReplicationConten CR created by this volumeGroupReplication CR. | ||
|
||
`replicationState` is the state of the volume being referenced. Possible values are `primary`, `secondary` and `resync`. | ||
|
||
- `primary` denotes that the volume is primary | ||
- `secondary` denotes that the volume is secondary | ||
- `resync` denotes that the volume needs to be resynced | ||
|
||
`source` contains the source of the volumeGroupReplication i.e, the selectors to match the PVC/PVs to be replicated. | ||
|
||
- `selector` is a label selector to filter the pvcs that are to be included in the group replication | ||
|
||
```yaml | ||
apiVersion: replication.storage.openshift.io/v1alpha1 | ||
kind: VolumeGroupReplication | ||
metadata: | ||
name: volumegroupreplication-sample | ||
namespace: default | ||
spec: | ||
volumeReplicationClassName: volumereplicationclass-sample | ||
volumeGroupReplicationClassName: volumegroupreplicationclass-sample | ||
replicationState: primary | ||
source: | ||
selector: | ||
matchLabels: | ||
group: replication | ||
``` |
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,24 @@ | ||
# VolumeGroupReplicationClass | ||
|
||
VolumeGroupReplicationClass is a cluster scoped resource that contains driver related configuration parameters for volume group replication. | ||
|
||
`provisioner` is name of the storage provisioner. | ||
|
||
`parameters` contains key-value pairs that are passed down to the driver. Users can add their own key-value pairs. Keys with `replication.storage.openshift.io/` prefix are reserved by operator and not passed down to the driver. | ||
|
||
## Reserved parameter keys | ||
|
||
- `replication.storage.openshift.io/group-replication-secret-name` | ||
- `replication.storage.openshift.io/group-replication-secret-namespace` | ||
|
||
```yaml | ||
apiVersion: replication.storage.openshift.io/v1alpha1 | ||
kind: VolumeGroupReplicationClass | ||
metadata: | ||
name: volumegroupreplicationclass-sample | ||
spec: | ||
provisioner: example.provisioner.io | ||
parameters: | ||
replication.storage.openshift.io/group-replication-secret-name: secret-name | ||
replication.storage.openshift.io/group-replication-secret-namespace: secret-namespace | ||
``` |
Oops, something went wrong.
Oops, something went wrong.
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.
I guess that should be "volume group"?
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.
No, becuase we are storing the volume handles in the source of the VGRContent. So, I think it should be "volumes" only.
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.
Ah, righ. Can you include an example of a VGRContent in the docs?
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.
Sure, somehow I missed it (though I had it in the back of my mind that I need to add that)