diff --git a/api/v1beta1/moduletemplate_types.go b/api/v1beta1/moduletemplate_types.go index c93b5f422c..2024bd6132 100644 --- a/api/v1beta1/moduletemplate_types.go +++ b/api/v1beta1/moduletemplate_types.go @@ -48,9 +48,8 @@ type ModuleTemplateSpec struct { // Deprecated: This field is deprecated and will be removed in a future release. // +optional // +kubebuilder:deprecatedversion - // +kubebuilder:validation:Pattern:=^[a-z]+$ + // +kubebuilder:validation:Pattern:=`^$|^[a-z]{3,}$` // +kubebuilder:validation:MaxLength:=32 - // +kubebuilder:validation:MinLength:=3 Channel string `json:"channel"` // Mandatory indicates whether the module is mandatory. It is used to enforce the installation of the module with diff --git a/api/v1beta2/moduletemplate_types.go b/api/v1beta2/moduletemplate_types.go index efa6ab03f4..b03ddd5ccb 100644 --- a/api/v1beta2/moduletemplate_types.go +++ b/api/v1beta2/moduletemplate_types.go @@ -79,9 +79,8 @@ type ModuleTemplateSpec struct { // Deprecated: This field is deprecated and will be removed in a future release. // +optional // +kubebuilder:deprecatedversion - // +kubebuilder:validation:Pattern:=^[a-z]+$ + // +kubebuilder:validation:Pattern:=`^$|^[a-z]{3,}$` // +kubebuilder:validation:MaxLength:=32 - // +kubebuilder:validation:MinLength:=3 Channel string `json:"channel"` // Version identifies the version of the Module. Can be empty, or a semantic version. diff --git a/config/crd/bases/operator.kyma-project.io_moduletemplates.yaml b/config/crd/bases/operator.kyma-project.io_moduletemplates.yaml index 5e07c23502..d8cd67289c 100644 --- a/config/crd/bases/operator.kyma-project.io_moduletemplates.yaml +++ b/config/crd/bases/operator.kyma-project.io_moduletemplates.yaml @@ -51,8 +51,7 @@ spec: to a target channel. It has to be provided at any given time. Deprecated: This field is deprecated and will be removed in a future release. maxLength: 32 - minLength: 3 - pattern: ^[a-z]+$ + pattern: ^$|^[a-z]{3,}$ type: string customStateCheck: items: @@ -182,8 +181,7 @@ spec: to a target channel. It has to be provided at any given time. Deprecated: This field is deprecated and will be removed in a future release. maxLength: 32 - minLength: 3 - pattern: ^[a-z]+$ + pattern: ^$|^[a-z]{3,}$ type: string customStateCheck: description: CustomStateCheck is deprecated.