EDITD / kubetools

:nut_and_bolt: Kubetools is a tool and processes for developing and deploying microservices to Kubernetes.
MIT License
13 stars 2 forks source link

Update kubernetes api create job with non-blocking option #88

Closed eatoncns closed 3 years ago

eatoncns commented 3 years ago

Purpose of PR

Currently the create job function waits for job to complete. As part of moving crawlers to jobs in kubernetes cluster we want to be able to kick off long running job and not wait for completion.

I looked at waiting for active field in job being > 1 but this seems to be more related to pod existing than being available and running so not sure it adds much value

Closes #87

eatoncns commented 3 years ago

Does the create job function make sure the pod is available and the command was executed on it first - Is it possible to do that?

What we look at for job completion is the status for pulled job. The only relevant thing I could see there was active number of running pods but when I tested it seemed to go to 1 before pod is available

Although looking at the CLI output there is a job status of "running"... will see what that corresponds to

eatoncns commented 3 years ago

I checked the job status conditions and there is a single transition from None to type Complete when it succeeds :(