-
Notifications
You must be signed in to change notification settings - Fork 58
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
Upgrade ramen to latest snapshotter crd and enforce VGS name length limit #1554
Conversation
a3756dd
to
c83cf3f
Compare
- Integrated the latest CRD from external-snapshotter. - Updated dependencies and relevant configuration files. - Changed VolumeSnapshotRefList in VolumeGroupSnapshotStatus to PVCVolumeSnapshotRefList, which allows to map a VolumeSnapshot to the application PVC. Signed-off-by: Benamar Mekhissi <[email protected]>
Signed-off-by: Benamar Mekhissi <[email protected]>
This is mainly to ensure that the VRG on the primary and secondary are in sync in regards to labels and annotations Signed-off-by: Benamar Mekhissi <[email protected]>
54520e5
to
24650ae
Compare
@@ -92,4 +91,4 @@ spec: | |||
type: object | |||
served: true | |||
storage: true | |||
subresources: {} |
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.
@BenamarMk , this file is not actually changed?
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.
Ok, thanks. I'll remove it.
@@ -285,13 +292,13 @@ func (h *volumeGroupSourceHandler) RestoreVolumesFromSnapshot( | |||
|
|||
volumeSnapshot := &vsv1.VolumeSnapshot{} | |||
if err := h.Client.Get(ctx, | |||
types.NamespacedName{Name: vsRef.Name, Namespace: vsRef.Namespace}, | |||
types.NamespacedName{Name: vsName, Namespace: pvc.Namespace}, |
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.
Maybe it's better to look for volume snapshot by vs name and vs namespace? What if one day vs namespace will be different from pvc namespace?
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.
The VolumeGroupSnapshot
status looks like this:
status:
boundVolumeGroupSnapshotContentName: groupsnapcontent-66e442b9-d739-48cc-9158-a6472c3a2022
creationTime: "2024-09-13T13:05:00Z"
pvcVolumeSnapshotRefList:
- persistentVolumeClaimRef:
name: busybox-cg2-pvc1
volumeSnapshotRef:
name: snapshot-bc3b0f7a8da345fd3d423eebe43cf6023ad34b03d7ff1df3fdf227da330303e6-2024-09-13-1.5.0
- persistentVolumeClaimRef:
name: busybox-cg2-pvc2
volumeSnapshotRef:
name: snapshot-811a028ea7008016c74c082430686955ae178d56cc4f0fdc3e5394da2cc20a1f-2024-09-13-1.5.3
readyToUse: true
We have only the names in the status. The snapshot is for the PVC and we already have the PVC for it. Therefore we use the PVC namespace. The PVC namespace is the same as the VolumeGroupSnapshot
.
LGTM, requeued the unit test run before merge. |
This PR includes the following updates:
VolumeSnapshotRefList
inVolumeGroupSnapshotStatus
toPVCVolumeSnapshotRefList
, which allows to map aVolumeSnapshot
to the applicationPVC
.Fixes: 2311790