Skip to content

Commit

Permalink
fix: Pod and PVCs can scale simultaneously (#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidNix authored Sep 1, 2022
1 parent bd71a38 commit a5e45b7
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions controllers/cosmosfullnode_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,20 +116,18 @@ func (r *CosmosFullNodeReconciler) Reconcile(ctx context.Context, req ctrl.Reque
}

// Reconcile pods.
requeue, err := r.podControl.Reconcile(ctx, logger, &crd)
podRequeue, err := r.podControl.Reconcile(ctx, logger, &crd)
if err != nil {
return r.resultWithErr(&crd, err)
}
if requeue {
return requeueResult, nil
}

// Reconcile pvcs.
requeue, err = r.pvcControl.Reconcile(ctx, logger, &crd)
pvcRequeue, err := r.pvcControl.Reconcile(ctx, logger, &crd)
if err != nil {
return r.resultWithErr(&crd, err)
}
if requeue {

if podRequeue || pvcRequeue {
return requeueResult, nil
}

Expand Down

0 comments on commit a5e45b7

Please # to comment.