From ca4476da2fce7c7de3ffedefcf4eebc87c365020 Mon Sep 17 00:00:00 2001 From: Praveen M Date: Mon, 4 Nov 2024 13:39:47 +0530 Subject: [PATCH] api: add radosNamespace field to CephFsConfigSpec Ceph-CSI now supports storing CephFS OMAP data in a specified namespace defined in CephFS.radosNamespace field in ceph-csi-config ConfigMap. ref: https://github.com/ceph/ceph-csi/pull/4661. This commit introduces the same by adding the radosNamespace field to the ClientProfile.ClientProfileSpec.CephFsConfigSpec API. Signed-off-by: Praveen M --- api/v1alpha1/clientprofile_types.go | 4 ++++ config/crd/bases/csi.ceph.io_clientprofiles.yaml | 5 +++++ deploy/all-in-one/install.yaml | 5 +++++ deploy/multifile/crd.yaml | 5 +++++ .../ceph-csi-operator/api/v1alpha1/clientprofile_types.go | 4 ++++ 5 files changed, 23 insertions(+) diff --git a/api/v1alpha1/clientprofile_types.go b/api/v1alpha1/clientprofile_types.go index 707295ce..ac6919f1 100644 --- a/api/v1alpha1/clientprofile_types.go +++ b/api/v1alpha1/clientprofile_types.go @@ -31,6 +31,10 @@ type CephFsConfigSpec struct { //+kubebuilder:validation:Optional FuseMountOptions map[string]string `json:"fuseMountOptions,omitempty"` + + //+kubebuilder:validation:XValidation:rule="self == oldSelf",message="Value is immutable" + //+kubebuilder:validation:Optional + RadosNamespace string `json:"radosNamespace,omitempty"` } // RbdConfigSpec defines the desired RBD configuration diff --git a/config/crd/bases/csi.ceph.io_clientprofiles.yaml b/config/crd/bases/csi.ceph.io_clientprofiles.yaml index b15f9d2a..152adcaf 100644 --- a/config/crd/bases/csi.ceph.io_clientprofiles.yaml +++ b/config/crd/bases/csi.ceph.io_clientprofiles.yaml @@ -74,6 +74,11 @@ spec: additionalProperties: type: string type: object + radosNamespace: + type: string + x-kubernetes-validations: + - message: Value is immutable + rule: self == oldSelf subVolumeGroup: type: string type: object diff --git a/deploy/all-in-one/install.yaml b/deploy/all-in-one/install.yaml index 0e58d129..fc25cc32 100644 --- a/deploy/all-in-one/install.yaml +++ b/deploy/all-in-one/install.yaml @@ -222,6 +222,11 @@ spec: additionalProperties: type: string type: object + radosNamespace: + type: string + x-kubernetes-validations: + - message: Value is immutable + rule: self == oldSelf subVolumeGroup: type: string type: object diff --git a/deploy/multifile/crd.yaml b/deploy/multifile/crd.yaml index 3155f0a4..69c6ab2b 100644 --- a/deploy/multifile/crd.yaml +++ b/deploy/multifile/crd.yaml @@ -213,6 +213,11 @@ spec: additionalProperties: type: string type: object + radosNamespace: + type: string + x-kubernetes-validations: + - message: Value is immutable + rule: self == oldSelf subVolumeGroup: type: string type: object diff --git a/vendor/github.com/ceph/ceph-csi-operator/api/v1alpha1/clientprofile_types.go b/vendor/github.com/ceph/ceph-csi-operator/api/v1alpha1/clientprofile_types.go index 707295ce..ac6919f1 100644 --- a/vendor/github.com/ceph/ceph-csi-operator/api/v1alpha1/clientprofile_types.go +++ b/vendor/github.com/ceph/ceph-csi-operator/api/v1alpha1/clientprofile_types.go @@ -31,6 +31,10 @@ type CephFsConfigSpec struct { //+kubebuilder:validation:Optional FuseMountOptions map[string]string `json:"fuseMountOptions,omitempty"` + + //+kubebuilder:validation:XValidation:rule="self == oldSelf",message="Value is immutable" + //+kubebuilder:validation:Optional + RadosNamespace string `json:"radosNamespace,omitempty"` } // RbdConfigSpec defines the desired RBD configuration