Skip to content

Commit

Permalink
feat: No PodDisruptionBudget for minAvailable equal server's numbers. (
Browse files Browse the repository at this point in the history
  • Loading branch information
jiuker authored Oct 7, 2023
1 parent 1b88332 commit 52bd365
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/controller/pdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ func (c *Controller) CreateOrUpdatePDB(ctx context.Context, t *v2.Tenant) (err e
if strings.TrimSpace(pool.Name) == "" {
continue
}
// No PodDisruptionBudget for minAvailable equal server's numbers.
if pool.Servers == pool.Servers/2+1 {
continue
}
if available.Available() {
// check sts status first.
ssName := t.PoolStatefulsetName(&pool)
Expand Down

0 comments on commit 52bd365

Please sign in to comment.