Skip to content

Commit

Permalink
fix: No PodDisruptionBudget for single pod
Browse files Browse the repository at this point in the history
  • Loading branch information
jiuker committed Sep 12, 2023
1 parent 09c2011 commit 3b2836e
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 @@ -96,6 +96,10 @@ func (c *Controller) CreateOrUpdatePDB(ctx context.Context, t *v2.Tenant) (err e
return nil
}
}
// No PodDisruptionBudget for single pod
if pool.Servers == 1 {
return nil
}
var pdbI client.Object
if available.V1Available() {
pdbI = &v1.PodDisruptionBudget{}
Expand Down

0 comments on commit 3b2836e

Please sign in to comment.