Skip to content

Commit

Permalink
Enable 3 node deployment for testing purposes (#248)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jorres committed Sep 24, 2024
1 parent b98fd73 commit 56e6f09
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions api/v1alpha1/storage_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,11 @@ func (r *Storage) ValidateCreate() error {
}

minNodesPerErasure := map[ErasureType]int32{
ErasureMirror3DC: 9,
ErasureMirror3DC: 3,
ErasureBlock42: 8,
None: 1,
}

if nodesNumber < minNodesPerErasure[r.Spec.Erasure] {
return fmt.Errorf("erasure type %v requires at least %v storage nodes", r.Spec.Erasure, minNodesPerErasure[r.Spec.Erasure])
}
Expand Down Expand Up @@ -305,10 +306,11 @@ func (r *Storage) ValidateUpdate(old runtime.Object) error {
}

minNodesPerErasure := map[ErasureType]int32{
ErasureMirror3DC: 9,
ErasureMirror3DC: 3,
ErasureBlock42: 8,
None: 1,
}

if nodesNumber < minNodesPerErasure[r.Spec.Erasure] {
return fmt.Errorf("erasure type %v requires at least %v storage nodes", r.Spec.Erasure, minNodesPerErasure[r.Spec.Erasure])
}
Expand Down

0 comments on commit 56e6f09

Please sign in to comment.