Skip to content

Commit

Permalink
Bugfix: Pool name should not be empty (#2158)
Browse files Browse the repository at this point in the history
Starting v5.0.15 Pool Name is required, but the CRD used allow empty `spec.pools.*.name` field
  • Loading branch information
pjuarezd authored Jun 12, 2024
1 parent 7a2834c commit a016247
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions helm/operator/templates/minio.min.io_tenants.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3069,6 +3069,7 @@ spec:
type: string
type: object
name:
minLength: 1
type: string
nodeSelector:
additionalProperties:
Expand Down
3 changes: 2 additions & 1 deletion pkg/apis/minio.min.io/v2/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,8 @@ type CustomCertificateConfig struct {
// See the https://min.io/docs/minio/kubernetes/upstream/operations/install-deploy-manage/deploy-minio-tenant.html#procedure-command-line[MinIO Operator CRD] reference for the `pools` object for examples and more complete documentation. +
type Pool struct {
// *Required*
//
// +kubebuilder:validation:Required
// +kubebuilder:validation:MinLength=1
// Specify the name of the pool. The Operator automatically generates the pool name if this field is omitted.
Name string `json:"name"`
// *Required*
Expand Down
1 change: 1 addition & 0 deletions resources/base/crds/minio.min.io_tenants.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3069,6 +3069,7 @@ spec:
type: string
type: object
name:
minLength: 1
type: string
nodeSelector:
additionalProperties:
Expand Down

0 comments on commit a016247

Please sign in to comment.