Skip to content

Commit

Permalink
fix: remove PDB (#2338)
Browse files Browse the repository at this point in the history
remove PDB

remove PDB

Co-authored-by: jiuker <[email protected]>
  • Loading branch information
jiuker and jiuker authored Oct 16, 2024
1 parent 6cd2041 commit 0302787
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 234 deletions.
4 changes: 0 additions & 4 deletions pkg/controller/decomission.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,6 @@ func (c *Controller) checkForPoolDecommission(ctx context.Context, key string, t

// if the number of pools in the spec is less that what we know in the status, a decomission is taking place
if len(tenant.Status.Pools) > len(tenant.Spec.Pools) {
err := c.DeletePDB(ctx, tenant)
if err != nil {
return nil, err
}
// check for empty pool names
var noDecom bool
for _, pool := range tenant.Spec.Pools {
Expand Down
11 changes: 0 additions & 11 deletions pkg/controller/main-controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -1319,11 +1319,6 @@ func (c *Controller) syncHandler(key string) (Result, error) {
return WrapResult(Result{}, err)
}
if !maps.Equal(expectedSystemCfg, existingSystemCfg) {
// delete pdb to let all the statefulSet pods get deleted
err = c.DeletePDB(ctx, tenant)
if err != nil {
return Result{}, err
}
// find all existing statefulSet pods and delete them
err = c.DeletePodsByStatefulSet(ctx, existingStatefulSet)
if err != nil {
Expand Down Expand Up @@ -1385,12 +1380,6 @@ func (c *Controller) syncHandler(key string) (Result, error) {
// current state of the world
tenant, err = c.updateTenantStatus(ctx, tenant, StatusInitialized, totalAvailableReplicas)

// Create Or Update PDB for tenant
err = c.CreateOrUpdatePDB(ctx, tenant)
if err != nil {
return WrapResult(Result{}, err)
}

return WrapResult(Result{}, err)
}

Expand Down
219 changes: 0 additions & 219 deletions pkg/controller/pdb.go

This file was deleted.

0 comments on commit 0302787

Please sign in to comment.