diff --git a/apis/dscinitialization/v1/dscinitialization_types.go b/apis/dscinitialization/v1/dscinitialization_types.go index 7d71c52c995..e9598e89743 100644 --- a/apis/dscinitialization/v1/dscinitialization_types.go +++ b/apis/dscinitialization/v1/dscinitialization_types.go @@ -32,6 +32,7 @@ import ( type DSCInitializationSpec struct { // Namespace for applications to be installed, non-configurable, default to "opendatahub" // +kubebuilder:default:=opendatahub + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="ApplicationsNamespace is immutable" // +operator-sdk:csv:customresourcedefinitions:type=spec,order=1 ApplicationsNamespace string `json:"applicationsNamespace"` // Enable monitoring on specified namespace diff --git a/bundle/manifests/dscinitialization.opendatahub.io_dscinitializations.yaml b/bundle/manifests/dscinitialization.opendatahub.io_dscinitializations.yaml index 67798e35b0e..5cb7b2a2d2f 100644 --- a/bundle/manifests/dscinitialization.opendatahub.io_dscinitializations.yaml +++ b/bundle/manifests/dscinitialization.opendatahub.io_dscinitializations.yaml @@ -57,6 +57,9 @@ spec: description: Namespace for applications to be installed, non-configurable, default to "opendatahub" type: string + x-kubernetes-validations: + - message: ApplicationsNamespace is immutable + rule: self == oldSelf devFlags: description: |- Internal development useful field to test customizations. diff --git a/config/crd/bases/dscinitialization.opendatahub.io_dscinitializations.yaml b/config/crd/bases/dscinitialization.opendatahub.io_dscinitializations.yaml index 0833b65acb0..edacd9cf82e 100644 --- a/config/crd/bases/dscinitialization.opendatahub.io_dscinitializations.yaml +++ b/config/crd/bases/dscinitialization.opendatahub.io_dscinitializations.yaml @@ -57,6 +57,9 @@ spec: description: Namespace for applications to be installed, non-configurable, default to "opendatahub" type: string + x-kubernetes-validations: + - message: ApplicationsNamespace is immutable + rule: self == oldSelf devFlags: description: |- Internal development useful field to test customizations.