Skip to content

Commit 42c3ce2

Browse files
authored
Merge pull request #200 from PhanLe1010/release-1.3
[Backport][release-1.3] Fix: PVC used by a job doesn't get resize after the pod of the job completed
2 parents 7c0d0a2 + 251e56c commit 42c3ce2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pkg/controller/controller.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,11 @@ func (ctrl *resizeController) updatePod(oldObj, newObj interface{}) {
161161
return
162162
}
163163

164-
ctrl.usedPVCs.addPod(pod)
164+
if isPodTerminated(pod) {
165+
ctrl.usedPVCs.removePod(pod)
166+
} else {
167+
ctrl.usedPVCs.addPod(pod)
168+
}
165169
}
166170

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

0 commit comments

Comments
 (0)