Skip to content

Commit aa2aff8

Browse files
iPraveenPariharmergify[bot]
authored andcommitted
api: add volumeGroupAttributes field to VGRContent API
This commit introduces `volumeGroupAttributes` field to `VolumeGroupReplicationContent` API. The field is intended to store key-value pairs derived from the VolumeGroupContext returned by CSI drivers in the CreateVolumeGroupResponse. Signed-off-by: Praveen M <m.praveen@ibm.com>
1 parent cf3bf96 commit aa2aff8

File tree

4 files changed

+30
-0
lines changed

4 files changed

+30
-0
lines changed

api/replication.storage/v1alpha1/volumegroupreplicationcontent_types.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,11 @@ type VolumeGroupReplicationContentSpec struct {
5757
// +kubebuilder:validation:Required
5858
VolumeGroupReplicationClassName string `json:"volumeGroupReplicationClassName"`
5959

60+
// volumeGroupAttributes holds the contextual information of the volume group.
61+
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="field is immutable"
62+
// +kubebuilder:validation:Optional
63+
VolumeGroupAttributes map[string]string `json:"volumeGroupAttributes,omitempty"`
64+
6065
// Source specifies whether the volume group is (or should be) dynamically provisioned
6166
// or already exists using the volumes listed here, and just requires a
6267
// Kubernetes object representation.

api/replication.storage/v1alpha1/zz_generated.deepcopy.go

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

config/crd/bases/replication.storage.openshift.io_volumegroupreplicationcontents.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,15 @@ spec:
6767
required:
6868
- volumeHandles
6969
type: object
70+
volumeGroupAttributes:
71+
additionalProperties:
72+
type: string
73+
description: volumeGroupAttributes holds the contextual information
74+
of the volume group.
75+
type: object
76+
x-kubernetes-validations:
77+
- message: field is immutable
78+
rule: self == oldSelf
7079
volumeGroupReplicationClassName:
7180
description: |-
7281
VolumeGroupReplicationClassName is the name of the VolumeGroupReplicationClass from

deploy/controller/crds.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1437,6 +1437,15 @@ spec:
14371437
required:
14381438
- volumeHandles
14391439
type: object
1440+
volumeGroupAttributes:
1441+
additionalProperties:
1442+
type: string
1443+
description: volumeGroupAttributes holds the contextual information
1444+
of the volume group.
1445+
type: object
1446+
x-kubernetes-validations:
1447+
- message: field is immutable
1448+
rule: self == oldSelf
14401449
volumeGroupReplicationClassName:
14411450
description: |-
14421451
VolumeGroupReplicationClassName is the name of the VolumeGroupReplicationClass from

0 commit comments

Comments
 (0)