diff --git a/api/v1beta1/kafkacluster_types.go b/api/v1beta1/kafkacluster_types.go index e8aa72bc8..b031e0e86 100644 --- a/api/v1beta1/kafkacluster_types.go +++ b/api/v1beta1/kafkacluster_types.go @@ -153,6 +153,9 @@ type DisruptionBudgetWithStrategy struct { // Broker defines the broker basic configuration type Broker struct { + // +kubebuilder:validation:Minimum=0 + // +kubebuilder:validation:Maximum=65535 + // +kubebuilder:validation:ExclusiveMaximum=true Id int32 `json:"id"` BrokerConfigGroup string `json:"brokerConfigGroup,omitempty"` ReadOnlyConfig string `json:"readOnlyConfig,omitempty"` diff --git a/charts/kafka-operator/templates/crds.yaml b/charts/kafka-operator/templates/crds.yaml index 6b4746ecf..c6df9aaca 100644 --- a/charts/kafka-operator/templates/crds.yaml +++ b/charts/kafka-operator/templates/crds.yaml @@ -12456,7 +12456,10 @@ spec: brokerConfigGroup: type: string id: + exclusiveMaximum: true format: int32 + maximum: 65535 + minimum: 0 type: integer readOnlyConfig: type: string diff --git a/config/base/crds/kafka.banzaicloud.io_kafkaclusters.yaml b/config/base/crds/kafka.banzaicloud.io_kafkaclusters.yaml index 8316fb02d..388e403a4 100644 --- a/config/base/crds/kafka.banzaicloud.io_kafkaclusters.yaml +++ b/config/base/crds/kafka.banzaicloud.io_kafkaclusters.yaml @@ -12293,7 +12293,10 @@ spec: brokerConfigGroup: type: string id: + exclusiveMaximum: true format: int32 + maximum: 65535 + minimum: 0 type: integer readOnlyConfig: type: string