Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Min and Max validation for KafkaCluster.spec.Brokers.[].Id #924

Merged
merged 2 commits into from
Feb 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions api/v1beta1/kafkacluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down
3 changes: 3 additions & 0 deletions charts/kafka-operator/templates/crds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12456,7 +12456,10 @@ spec:
brokerConfigGroup:
type: string
id:
exclusiveMaximum: true
format: int32
maximum: 65535
minimum: 0
type: integer
readOnlyConfig:
type: string
Expand Down
3 changes: 3 additions & 0 deletions config/base/crds/kafka.banzaicloud.io_kafkaclusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12293,7 +12293,10 @@ spec:
brokerConfigGroup:
type: string
id:
exclusiveMaximum: true
format: int32
maximum: 65535
minimum: 0
type: integer
readOnlyConfig:
type: string
Expand Down