Is there an option to wait for kubernetes job comp...
# general
i
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
@incalculable-diamond-5088 no, but @gorgeous-egg-16927 might be working on something like this
g
Yeah, we don’t have await logic implemented yet for `Job`s. It’s on my TODO list
i
@gorgeous-egg-16927 That's great! Is there an ETA when it can be released? I'll need this to finish the POC
g
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
I think next month should be fine
👍 1
g
@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
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
That’s likely true in general, but I bet it’s something we could make configurable to accommodate use cases like this.
i
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