mirror of https://github.com/k3s-io/k3s
Fix how we iterate over active jobs when removing them for Replace policy
parent
63afad0d4e
commit
80ec726858
|
@ -203,8 +203,7 @@ func SyncOne(sj batch.ScheduledJob, js []batch.Job, now time.Time, jc jobControl
|
|||
return
|
||||
}
|
||||
if sj.Spec.ConcurrencyPolicy == batch.ReplaceConcurrent {
|
||||
for i := range sj.Status.Active {
|
||||
j := sj.Status.Active[i]
|
||||
for _, j := range sj.Status.Active {
|
||||
// TODO: this should be replaced with server side job deletion
|
||||
// currently this mimics JobReaper from pkg/kubectl/stop.go
|
||||
glog.V(4).Infof("Deleting job %s of %s that was still running at next scheduled start time", j.Name, nameForLog)
|
||||
|
|
Loading…
Reference in New Issue