Terraform-provider-kubernetes: Feature Request: Job Resource

Created on 16 Aug 2017  Â·  5Comments  Â·  Source: hashicorp/terraform-provider-kubernetes

If adding a "kubernetes_job" resource is in scope, I might have some time to help implement.

https://kubernetes.io/docs/api-reference/v1.6/#job-v1-batch

Most helpful comment

Hi
if the job is idempotent, it can be (re)executed as one-time provisioning for things like database initialisation.
Thanks

All 5 comments

Hi @nstogner
thanks for opening the issue.

I'm curious what benefits are you hoping to get from managing K8S jobs via Terraform? As far as I understand jobs are one-off containers that are gone once they return an exit code, which is likely a workload better suited for a different tool (to Terraform) which isn't stateful?

You are right. I had a brainfart and was thinking cron functionality was
under Job, however it is under it's own CrobJob resource which is in alpha.

On Aug 17, 2017 4:24 AM, "Radek Simko" notifications@github.com wrote:

Hi @nstogner https://github.com/nstogner
thanks for opening the issue.

I'm curious what benefits are you hoping to get from managing K8S jobs via
Terraform? As far as I understand jobs are one-off containers that are gone
once they return an exit code, which is likely a workload better suited for
a different tool (to Terraform) which isn't stateful?

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/terraform-providers/terraform-provider-kubernetes/issues/48#issuecomment-323003177,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AJzFjZxb-I1XfAQPm50Ax3aGCGW7qXEdks5sY_i7gaJpZM4O5Oof
.

No problem at all.

As mentioned in the Readme, for reasons discussed in https://github.com/terraform-providers/terraform-provider-kubernetes/pull/1#issuecomment-307940033 there are currently no plans on supporting any API that's marked as alpha, beta or generally anything that's not stable/v1.

This may change in the future as we explore ways of dealing with breaking changes on the API's side and reducing the impact on the user.

With that I will close this issue.

Thanks.

Hi
if the job is idempotent, it can be (re)executed as one-time provisioning for things like database initialisation.
Thanks

FWIW, all of this and more is supported with the fork of the default kubernetes provider. I have found the default provider to be so limited that it's mostly broken. See https://github.com/sl1pm4t/terraform-provider-kubernetes

Was this page helpful?
0 / 5 - 0 ratings