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