Skip to content

Commit 1fe36e8

Browse files
committed
Improvements
Signed-off-by: Elena Gershkovich <elenage@il.ibm.com>
1 parent 700800f commit 1fe36e8

8 files changed

+102
-527
lines changed

api/v1alpha1/drplacementcontrol_types.go

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -167,14 +167,8 @@ type PlacementDecision struct {
167167
ClusterNamespace string `json:"clusterNamespace,omitempty"`
168168
}
169169

170-
// ProtectedPVCsList defines a group of ProtectedPVCs
171-
type ProtectedPVCsList struct {
172-
// Name of the VolRep/PVC resource
173-
//+optional
174-
Name string `json:"name,omitempty"`
175-
176-
// All the protected pvcs
177-
ProtectedPVCs []string `json:"protectedpvcs,omitempty"`
170+
type Groups struct {
171+
Grouped []string `json:"grouped,omitempty"`
178172
}
179173

180174
// VRGResourceMeta represents the VRG resource.
@@ -197,7 +191,7 @@ type VRGResourceMeta struct {
197191

198192
// List of CGs that are protected by the VRG resource
199193
//+optional
200-
ProtectedCGs []ProtectedPVCsList `json:"protectedcgs,omitempty"`
194+
PVCGroups []Groups `json:"pvcgroups,omitempty"`
201195

202196
// ResourceVersion is a value used to identify the version of the
203197
// VRG resource object

api/v1alpha1/volumereplicationgroup_types.go

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -307,14 +307,6 @@ type ProtectedPVC struct {
307307
VolumeMode *corev1.PersistentVolumeMode `json:"volumeMode,omitempty"`
308308
}
309309

310-
// ProtectedCG defines a group of ProtectedPVCs
311-
type ProtectedCG struct {
312-
ProtectedPVC `json:",inline"`
313-
314-
// List the protected pvcs names
315-
PVCs []string `json:"protectedPVCs,omitempty"`
316-
}
317-
318310
type KubeObjectsCaptureIdentifier struct {
319311
Number int64 `json:"number"`
320312
//+nullable
@@ -333,9 +325,11 @@ type KubeObjectProtectionStatus struct {
333325
type VolumeReplicationGroupStatus struct {
334326
State State `json:"state,omitempty"`
335327

336-
// One of ProtectedPVCs or ProtectedCGs must be set
328+
// All the protected pvcs
337329
ProtectedPVCs []ProtectedPVC `json:"protectedPVCs,omitempty"`
338-
ProtectedCGs []ProtectedCG `json:"protectedCGs,omitempty"`
330+
// List of CGs that are protected by the VRG resource
331+
//+optional
332+
PVCGroups []Groups `json:"pvcgroups,omitempty"`
339333

340334
// Conditions are the list of VRG's summary conditions and their status.
341335
Conditions []metav1.Condition `json:"conditions,omitempty"`

api/v1alpha1/zz_generated.deepcopy.go

Lines changed: 26 additions & 47 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/bases/ramendr.openshift.io_drplacementcontrols.yaml

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -510,26 +510,21 @@ spec:
510510
description: Namespace is the namespace of the Kubernetes
511511
resource.
512512
type: string
513-
protectedcgs:
513+
protectedpvcs:
514+
description: List of PVCs that are protected by the VRG resource
515+
items:
516+
type: string
517+
type: array
518+
pvcgroups:
514519
description: List of CGs that are protected by the VRG resource
515520
items:
516-
description: ProtectedPVCsList defines a group of ProtectedPVCs
517521
properties:
518-
name:
519-
description: Name of the VolRep/PVC resource
520-
type: string
521-
protectedpvcs:
522-
description: All the protected pvcs
522+
grouped:
523523
items:
524524
type: string
525525
type: array
526526
type: object
527527
type: array
528-
protectedpvcs:
529-
description: List of PVCs that are protected by the VRG resource
530-
items:
531-
type: string
532-
type: array
533528
resourceVersion:
534529
description: |-
535530
ResourceVersion is a value used to identify the version of the

0 commit comments

Comments
 (0)