From 52bd36501142395f5d7cd6d27c7460e2122ac62c Mon Sep 17 00:00:00 2001 From: jiuker <2818723467@qq.com> Date: Sat, 7 Oct 2023 11:10:01 +0800 Subject: [PATCH] feat: No PodDisruptionBudget for minAvailable equal server's numbers. (#1772) --- pkg/controller/pdb.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/controller/pdb.go b/pkg/controller/pdb.go index 4c97a49eea1..9abe2c64a01 100644 --- a/pkg/controller/pdb.go +++ b/pkg/controller/pdb.go @@ -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)