lawrencegripper / terraform-provider-kubernetes-yaml

[See readme - inactive] A basic terraform provider which allows generic YAML config for Kubernetes
Mozilla Public License 2.0
22 stars 14 forks source link

Compatibility with Terraform 0.12 #20

Open sebastien-prudhomme opened 5 years ago

sebastien-prudhomme commented 5 years ago

Hi,

Terraform 0.12 is now in beta and many "official" providers are now compatible with the new API.

The k8sraw provider is not yet compatible:

Error: Failed to instantiate provider "k8sraw" to obtain schema: Incompatible API version with plugin. Plugin version: 4, Client versions: [5]

Can you consider switching to the new plugin SDK so that this provider is compatible with both Terraform 0.11 ans 0.12?

lawrencegripper commented 5 years ago

Sure I'd be happy to accept a PR to add support for 0.12 API. Do you know how much work is involved?

sebastien-prudhomme commented 5 years ago

@lawrencegripper sorry i have no knowledge of go

davisford commented 5 years ago

@lawrencegripper i have made a fork, and have merged two PRs on my repo where I:

I did not send a PR upstream b/c I have to change the namespace on at least one file -- if you want to have a look you can see if you are interested in me sending a PR or not.

lawrencegripper commented 5 years ago

Amazing, yeah do please PR. I can have a play and get a release pushed out by the CI with the updated version.

Alternatively if you'd prefer to work on the fork I can update the README here show this is deprecated and point to your fork.

davisford commented 5 years ago

The only thing that is a bit of a pain is main.go contains the package namespace which is hard-coded and thus has to change for each fork. I do plan on using this in production and maintaining it for a production project we are building right now. It is part of our build process and so far has been working well. The only reason I would abandon it at this point is if the official terraform kubernetes provider adds similar support for yaml resources, but I doubt that is coming any time soon. We absolutely need this to deploy our couch infrastructure for things like the CRD, the actual cluster yaml itself, and we use it to spawn one-off jobs on the k8s cluster.

lawrencegripper commented 5 years ago

Great, I'll mark this as depreciated as you're a much better steward for it than me going forward than me.

Completely agree, in the event the official provider provides this functionality it's time to call time on this forked work.

Would you be alright to put publishing built release to github into the build pipeline? I tend to use this provider from scripts quite a bit so it's useful to grab a build for the platform and pull down built images - I'd love to be able to use your improved version!

lawrencegripper commented 5 years ago

Cool, I've updated the README with details of the fork, thanks for taking this one forward - glad the code base is useful and seeing more time and effort put into keeping it up-to-date and useful.

davisford commented 5 years ago

Would you be alright to put publishing built release to github into the build pipeline? I tend to use this provider from scripts quite a bit so it's useful to grab a build for the platform and pull down built images - I'd love to be able to use your improved version!

Let me know what you need me to do -- sorry if I lag in response. I need to fix my github alerts -- they get buried.

djsly commented 5 years ago

Should mark this as deprecated once the Forked as Valid Binary, since the standard delivery way was using the release page. Something the fork is lacking at the moment

tgermain commented 5 years ago

Hi, Thanks @davisford for your work on the updated fork ! Do you plan to release binaries for other platform (namely linux-amd64 for my use case) ? I can only see darwin-amd64 for the latest release

davisford commented 5 years ago

@tgermain I updated the release with binaries for all platforms.