rudr
rudr copied to clipboard
Task scaling and muanual scaler do not work well for Jobs
I am not totally sure what task scaling should do when we apply a manual scaler, but this is what it does:
$ kubectl get job,po
NAME COMPLETIONS DURATION AGE
job.batch/multi-alpine-task 1/1 of 3 2s 97s
NAME READY STATUS RESTARTS AGE
pod/multi-alpine-task-w97rk 0/1 Completed 0 97s
I was expecting it to spin up and complete three jobs. I think we may need to fix this.
https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/#job-patterns
I think that what we want is for the number of completions to be equal to the number of parallel instances. But the problem is that the parallelism
field is mutable, while the completions
field is immutable. And this means that the manual scaler cannot adjust the completions
field.