Skip to content

Commit

Permalink
Merge pull request #200 from PhanLe1010/release-1.3
Browse files Browse the repository at this point in the history
[Backport][release-1.3] Fix: PVC used by a job doesn't get resize after the pod of the job completed
  • Loading branch information
k8s-ci-robot committed Apr 1, 2022
2 parents 7c0d0a2 + 251e56c commit 42c3ce2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,11 @@ func (ctrl *resizeController) updatePod(oldObj, newObj interface{}) {
return
}

ctrl.usedPVCs.addPod(pod)
if isPodTerminated(pod) {
ctrl.usedPVCs.removePod(pod)
} else {
ctrl.usedPVCs.addPod(pod)
}
}

func (ctrl *resizeController) updatePVC(oldObj, newObj interface{}) {
Expand Down

0 comments on commit 42c3ce2

Please sign in to comment.