Skip to content

Commit 90ef727

Browse files
authored
Merge pull request #199 from PhanLe1010/release-1.2
[Backoport][release-1.2] Fix: PVC used by a job doesn't get resize after the pod of the job completed
2 parents 1e58ef4 + 5a9d912 commit 90ef727

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)