Skip to content

Commit

Permalink
replication: add pvcRef to volumegroupreplication
Browse files Browse the repository at this point in the history
adding the pvcRef to the volumegroupreplication
to give a representation of the pvc's which
are part of the volumegroupreplication.

Signed-off-by: Madhu Rajanna <[email protected]>
  • Loading branch information
Madhu-1 committed Jun 24, 2024
1 parent d8727ec commit e3878f5
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ limitations under the License.
package v1alpha1

import (
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

Expand Down Expand Up @@ -72,6 +73,10 @@ type VolumeGroupReplicationSource struct {
// VolumeGroupReplicationStatus defines the observed state of VolumeGroupReplication
type VolumeGroupReplicationStatus struct {
VolumeReplicationStatus `json:",inline"`
// PersistentVolumeClaimsRefList is the list of PVCs for the volume group replication.
// The maximum number of allowed PVCs in the group is 100.
// +optional
PersistentVolumeClaimsRefList []corev1.LocalObjectReference `json:"persistentVolumeClaimsRefList,omitempty"`
}

//+kubebuilder:object:root=true
Expand Down
5 changes: 5 additions & 0 deletions apis/replication.storage/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,29 @@ spec:
operator has dealt with
format: int64
type: integer
persistentVolumeClaimsRefList:
description: |-
PersistentVolumeClaimsRefList is the list of PVCs for the volume group replication.
The maximum number of allowed PVCs in the group is 100.
items:
description: |-
LocalObjectReference contains enough information to let you locate the
referenced object inside the same namespace.
properties:
name:
default: ""
description: |-
Name of the referent.
This field is effectively required, but due to backwards compatibility is
allowed to be empty. Instances of this type with an empty value here are
almost certainly wrong.
TODO: Add other useful fields. apiVersion, kind, uid?
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
type: string
type: object
x-kubernetes-map-type: atomic
type: array
state:
description: State captures the latest state of the replication operation.
type: string
Expand Down
23 changes: 23 additions & 0 deletions deploy/controller/crds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1269,6 +1269,29 @@ spec:
operator has dealt with
format: int64
type: integer
persistentVolumeClaimsRefList:
description: |-
PersistentVolumeClaimsRefList is the list of PVCs for the volume group replication.
The maximum number of allowed PVCs in the group is 100.
items:
description: |-
LocalObjectReference contains enough information to let you locate the
referenced object inside the same namespace.
properties:
name:
default: ""
description: |-
Name of the referent.
This field is effectively required, but due to backwards compatibility is
allowed to be empty. Instances of this type with an empty value here are
almost certainly wrong.
TODO: Add other useful fields. apiVersion, kind, uid?
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
type: string
type: object
x-kubernetes-map-type: atomic
type: array
state:
description: State captures the latest state of the replication operation.
type: string
Expand Down

0 comments on commit e3878f5

Please sign in to comment.