https://pulumi.com logo
i

incalculable-diamond-5088

02/22/2019, 10:38 PM
Is there an option to wait for kubernetes job completion? The use case is provisioning a rails environment - I'd like to run a rails db migration before deploying the rest of the containers
c

creamy-potato-29402

02/22/2019, 10:39 PM
@incalculable-diamond-5088 no, but @gorgeous-egg-16927 might be working on something like this
g

gorgeous-egg-16927

02/22/2019, 10:41 PM
Yeah, we don’t have await logic implemented yet for `Job`s. It’s on my TODO list
i

incalculable-diamond-5088

02/22/2019, 10:42 PM
@gorgeous-egg-16927 That's great! Is there an ETA when it can be released? I'll need this to finish the POC
g

gorgeous-egg-16927

02/22/2019, 10:45 PM
Hmm, it shouldn’t be that hard to implement, but I’ve got a few other things on my plate right now. How urgent is it for you? Current plan would be sometime in the next month most likely.
i

incalculable-diamond-5088

02/22/2019, 10:46 PM
I think next month should be fine
👍 1
g

gorgeous-egg-16927

02/22/2019, 10:51 PM
@incalculable-diamond-5088 Would you mind opening an issue with your use case and how you’d like it to work? https://github.com/pulumi/pulumi-kubernetes/issues/new Specifically, is this a one-time Job, or would it need to run on every update, etc. I haven’t thought through the details yet, but Job is a bit of an odd resource.
c

creamy-potato-29402

02/22/2019, 10:57 PM
Yeah, it’s weird.
When I was at Heptio this was something joe and I argued about a lot. Joe’s position was that
Job
semantics can’t be known a priori and therefore should never be awaited.
So it goes.
g

gorgeous-egg-16927

02/22/2019, 10:59 PM
That’s likely true in general, but I bet it’s something we could make configurable to accommodate use cases like this.
i

incalculable-diamond-5088

02/22/2019, 11:10 PM
Yeah... db migrations are generally a weird case, but having it nicely wrapped in pulumi will help a lot. Actually, it can be done just by running a pod to completion but jobs are more convenient here
Here's the ticket: https://github.com/pulumi/pulumi-kubernetes/issues/449. Thanks guys for the rapid responses!
👍 1