From b8a7cb7563a2af8ce3a245b690c54f818a8f0a22 Mon Sep 17 00:00:00 2001 From: Malay Kumar Parida Date: Wed, 26 Feb 2025 19:59:15 +0530 Subject: [PATCH] Add API field for poolSpec parameters of non-resilient cephBlockPools Signed-off-by: Malay Kumar Parida --- api/v1/storagecluster_types.go | 7 +++++-- api/v1/zz_generated.deepcopy.go | 7 +++++++ config/crd/bases/ocs.openshift.io_storageclusters.yaml | 8 ++++++++ .../crds/ocs/ocs.openshift.io_storageclusters.yaml | 8 ++++++++ deploy/ocs-operator/manifests/storagecluster.crd.yaml | 8 ++++++++ .../ocs-operator/api/v4/v1/storagecluster_types.go | 7 +++++-- .../ocs-operator/api/v4/v1/zz_generated.deepcopy.go | 7 +++++++ .../ocs-operator/api/v4/v1/storagecluster_types.go | 7 +++++-- .../ocs-operator/api/v4/v1/zz_generated.deepcopy.go | 7 +++++++ 9 files changed, 60 insertions(+), 6 deletions(-) diff --git a/api/v1/storagecluster_types.go b/api/v1/storagecluster_types.go index d6076cb4fa..97eb2e64ae 100644 --- a/api/v1/storagecluster_types.go +++ b/api/v1/storagecluster_types.go @@ -258,8 +258,11 @@ type ManageCephNonResilientPools struct { // +kubebuilder:validation:MaxLength=253 // +kubebuilder:validation:Pattern=^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ StorageClassName string `json:"storageClassName,omitempty"` - // ReconcileStrategy and other related fields are not used for now - // They can be added once the feature goes to GA + // Parameters is a list of properties to enable on the non-resilient cephBlockPools + // +kubebuilder:pruning:PreserveUnknownFields + // +optional + // +nullable + Parameters map[string]string `json:"parameters,omitempty"` } // ManageCephFilesystems defines how to reconcile CephFilesystems diff --git a/api/v1/zz_generated.deepcopy.go b/api/v1/zz_generated.deepcopy.go index 029756fab8..9196ce5479 100644 --- a/api/v1/zz_generated.deepcopy.go +++ b/api/v1/zz_generated.deepcopy.go @@ -348,6 +348,13 @@ func (in *ManageCephNonResilientPools) DeepCopyInto(out *ManageCephNonResilientP *out = *in in.Resources.DeepCopyInto(&out.Resources) in.VolumeClaimTemplate.DeepCopyInto(&out.VolumeClaimTemplate) + if in.Parameters != nil { + in, out := &in.Parameters, &out.Parameters + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManageCephNonResilientPools. diff --git a/config/crd/bases/ocs.openshift.io_storageclusters.yaml b/config/crd/bases/ocs.openshift.io_storageclusters.yaml index dca04c53dd..4411f1e7c8 100644 --- a/config/crd/bases/ocs.openshift.io_storageclusters.yaml +++ b/config/crd/bases/ocs.openshift.io_storageclusters.yaml @@ -1902,6 +1902,14 @@ spec: type: integer enable: type: boolean + parameters: + additionalProperties: + type: string + description: Parameters is a list of properties to enable + on the non-resilient cephBlockPools + nullable: true + type: object + x-kubernetes-preserve-unknown-fields: true resources: description: ResourceRequirements (requests/limits) for the devices diff --git a/deploy/csv-templates/crds/ocs/ocs.openshift.io_storageclusters.yaml b/deploy/csv-templates/crds/ocs/ocs.openshift.io_storageclusters.yaml index dca04c53dd..4411f1e7c8 100644 --- a/deploy/csv-templates/crds/ocs/ocs.openshift.io_storageclusters.yaml +++ b/deploy/csv-templates/crds/ocs/ocs.openshift.io_storageclusters.yaml @@ -1902,6 +1902,14 @@ spec: type: integer enable: type: boolean + parameters: + additionalProperties: + type: string + description: Parameters is a list of properties to enable + on the non-resilient cephBlockPools + nullable: true + type: object + x-kubernetes-preserve-unknown-fields: true resources: description: ResourceRequirements (requests/limits) for the devices diff --git a/deploy/ocs-operator/manifests/storagecluster.crd.yaml b/deploy/ocs-operator/manifests/storagecluster.crd.yaml index dca04c53dd..4411f1e7c8 100644 --- a/deploy/ocs-operator/manifests/storagecluster.crd.yaml +++ b/deploy/ocs-operator/manifests/storagecluster.crd.yaml @@ -1902,6 +1902,14 @@ spec: type: integer enable: type: boolean + parameters: + additionalProperties: + type: string + description: Parameters is a list of properties to enable + on the non-resilient cephBlockPools + nullable: true + type: object + x-kubernetes-preserve-unknown-fields: true resources: description: ResourceRequirements (requests/limits) for the devices diff --git a/metrics/vendor/github.com/red-hat-storage/ocs-operator/api/v4/v1/storagecluster_types.go b/metrics/vendor/github.com/red-hat-storage/ocs-operator/api/v4/v1/storagecluster_types.go index d6076cb4fa..97eb2e64ae 100644 --- a/metrics/vendor/github.com/red-hat-storage/ocs-operator/api/v4/v1/storagecluster_types.go +++ b/metrics/vendor/github.com/red-hat-storage/ocs-operator/api/v4/v1/storagecluster_types.go @@ -258,8 +258,11 @@ type ManageCephNonResilientPools struct { // +kubebuilder:validation:MaxLength=253 // +kubebuilder:validation:Pattern=^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ StorageClassName string `json:"storageClassName,omitempty"` - // ReconcileStrategy and other related fields are not used for now - // They can be added once the feature goes to GA + // Parameters is a list of properties to enable on the non-resilient cephBlockPools + // +kubebuilder:pruning:PreserveUnknownFields + // +optional + // +nullable + Parameters map[string]string `json:"parameters,omitempty"` } // ManageCephFilesystems defines how to reconcile CephFilesystems diff --git a/metrics/vendor/github.com/red-hat-storage/ocs-operator/api/v4/v1/zz_generated.deepcopy.go b/metrics/vendor/github.com/red-hat-storage/ocs-operator/api/v4/v1/zz_generated.deepcopy.go index 029756fab8..9196ce5479 100644 --- a/metrics/vendor/github.com/red-hat-storage/ocs-operator/api/v4/v1/zz_generated.deepcopy.go +++ b/metrics/vendor/github.com/red-hat-storage/ocs-operator/api/v4/v1/zz_generated.deepcopy.go @@ -348,6 +348,13 @@ func (in *ManageCephNonResilientPools) DeepCopyInto(out *ManageCephNonResilientP *out = *in in.Resources.DeepCopyInto(&out.Resources) in.VolumeClaimTemplate.DeepCopyInto(&out.VolumeClaimTemplate) + if in.Parameters != nil { + in, out := &in.Parameters, &out.Parameters + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManageCephNonResilientPools. diff --git a/vendor/github.com/red-hat-storage/ocs-operator/api/v4/v1/storagecluster_types.go b/vendor/github.com/red-hat-storage/ocs-operator/api/v4/v1/storagecluster_types.go index d6076cb4fa..97eb2e64ae 100644 --- a/vendor/github.com/red-hat-storage/ocs-operator/api/v4/v1/storagecluster_types.go +++ b/vendor/github.com/red-hat-storage/ocs-operator/api/v4/v1/storagecluster_types.go @@ -258,8 +258,11 @@ type ManageCephNonResilientPools struct { // +kubebuilder:validation:MaxLength=253 // +kubebuilder:validation:Pattern=^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ StorageClassName string `json:"storageClassName,omitempty"` - // ReconcileStrategy and other related fields are not used for now - // They can be added once the feature goes to GA + // Parameters is a list of properties to enable on the non-resilient cephBlockPools + // +kubebuilder:pruning:PreserveUnknownFields + // +optional + // +nullable + Parameters map[string]string `json:"parameters,omitempty"` } // ManageCephFilesystems defines how to reconcile CephFilesystems diff --git a/vendor/github.com/red-hat-storage/ocs-operator/api/v4/v1/zz_generated.deepcopy.go b/vendor/github.com/red-hat-storage/ocs-operator/api/v4/v1/zz_generated.deepcopy.go index 029756fab8..9196ce5479 100644 --- a/vendor/github.com/red-hat-storage/ocs-operator/api/v4/v1/zz_generated.deepcopy.go +++ b/vendor/github.com/red-hat-storage/ocs-operator/api/v4/v1/zz_generated.deepcopy.go @@ -348,6 +348,13 @@ func (in *ManageCephNonResilientPools) DeepCopyInto(out *ManageCephNonResilientP *out = *in in.Resources.DeepCopyInto(&out.Resources) in.VolumeClaimTemplate.DeepCopyInto(&out.VolumeClaimTemplate) + if in.Parameters != nil { + in, out := &in.Parameters, &out.Parameters + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManageCephNonResilientPools.