Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deployment #101

Merged
merged 1 commit into from Oct 15, 2018
Merged

Deployment #101

merged 1 commit into from Oct 15, 2018

Conversation

nickschuch
Copy link
Contributor

Deployments have now become stable as a part of release v1.9.0

This pull request is a few things:

  • Asking if you this project is now interesting in accepting the kubernetes_deployment resource now that 1.9.0 has landed.
  • If I am on the right path with this approach. I still have quite a bit of polish to put on this so wanted to ask early.

This is my first contribution to the Terraform community so would love to hear any feedback you want to give!

I am also very interested in also contributing the "DaemonSet" resource!

I used dep to bump the client libraries up to "release-1.9.0". Would you be interested in switching to Dep or is there some guidance I could get on bumping with go-vendor?

@sl1pm4t
Copy link
Contributor

sl1pm4t commented Dec 17, 2017

@nickschuch - just a heads up, most of the (previously beta) workload resources have already been developed and are available in various community forks of this provider.
I've collected most/all of them up in the custom branch of my fork and added some resources myself, so I recommend you check it out before spending too much developing them from scratch.
It has DaemonSet, Deployment, StatefulSet, Ingress etc.

Some of them still need documentation and acceptance tests, but are otherwise fully functional. We've been using the Deployment in our production environment for a few months.

I'll also start sending PR's across to this repo now that these resources are GA.

@nickschuch
Copy link
Contributor Author

No worries, looking at the fork I can see a few things:

  • Schema is missing a bunch of fields
  • Modeled off the replica, which we will want it to use more "Deployment" style logic to wait for when its finished. (That code can be found in the kubelet).

Would you be open to a collaboration?

@sl1pm4t
Copy link
Contributor

sl1pm4t commented Dec 18, 2017

@nickschuch - yes happy to Collaborate.
Are you able to update the vendored Kubernetes client packages using govendor, which seems to be the preferred vendoring tool of Hashicorp / Terraform.
I'll then send a PR for the kubernetes_deployment resource in my fork, and we can beat it into shape.

@nickschuch
Copy link
Contributor Author

No worries! Ill get govendor another crack today and report back.

@dmathieu
Copy link

dmathieu commented Jan 4, 2018

@nickschuch do you need help finishing this PR?

@nickschuch
Copy link
Contributor Author

Hey hey! That would be great. I will be back onto my regular schedule programming next week :)

@moritzheiber
Copy link

Can we get this baby on the road? 🙂

@travisjeffery
Copy link

travisjeffery commented Jan 29, 2018

I've wrote a version for us at Confluent we've had shipped in prod for months now. I'll ship it this week. Gotta add tests and docs.

@nickschuch
Copy link
Contributor Author

Yup, I have one here as well https://github.com/previousnext/terraform-provider-k8s (has a bunch of missing APIs).

I will revisit this issue this week.

@acobaugh
Copy link

acobaugh commented Feb 5, 2018

@sl1pm4t I'm also willing to help test, as I desperately need the deployment resource. I'm making do with your fork, but I've already found a bug (can't set strategy type to "Recreate"). Let me know what I can do to help or file issues.

@joshperry
Copy link

I'm happy to pitch in as well. Can we come to an agreement on a fork to pursue so that I'm not wasting cycles? I did about a 1/3 impl before I saw this PR, so I'm somewhat fresh with the codebase.

@pdecat
Copy link
Contributor

pdecat commented Feb 13, 2018

Hi @nickschuch,

I used dep to bump the client libraries up to "release-1.9.0". Would you be interested in switching to Dep or is there some guidance I could get on bumping with go-vendor?

I was looking into doing the same and found out the upgrade from client-go v4 to v5+ is not that easy.
Nice work!

What would you think about submitting a separate PR to upgrade the client libs with only those two commits?

https://github.com/nickschuch/terraform-provider-kubernetes/commit/c7dcbf2abb2aa8ced4b2c88fa7f9b8458aaf061d
https://github.com/nickschuch/terraform-provider-kubernetes/commit/aaff7e9c1dcbd73f716e77aff784886fda0538a8

Apparently, an additional make fmt is required to fix the build.

Edit: I spoke too fast as building the provider with those updates is currently broken.
The google provider depends on several revisions of the google.golang.org/api project subpackages. However, dep only allows constraints on the root of projects so those different dependencies cannot be resolved correctly.
I guess moving to dep won't be implemented in the short term by terraform providers because of this.

I've put together PR #117 to upgrade k8s libs to 1.9 with govendor reusing https://github.com/nickschuch/terraform-provider-kubernetes/commit/aaff7e9c1dcbd73f716e77aff784886fda0538a8

@djhaskin987
Copy link

Just wanted to ask if there's anything I can do to help with this PR . I'm a huge fan of getting this done

@austinkelleher
Copy link

@radeksimko What is it going to take to get this merged? This PR has been open for 2.5 months and really is crucial to using the Kubernetes Terraform provider for many applications.

@bassrock
Copy link
Contributor

bassrock commented Mar 8, 2018

@austinkelleher Look at https://github.com/sl1pm4t/terraform-provider-kubernetes it has deployments and more and is constantly maintained with these upstream changes.

@austinkelleher
Copy link

@bassrock I'm currently using that, but I'd really like to see deployments becoming a part of core terrafor-provider-kubernetes. There's no reason why a fork should have to be maintained at this point. The original argument for not allowing these changes into the core provider plugin was because Kubernetes deployments were in a beta API. Now this feature is out of beta and is a part of the v1 API version.

/cc @radeksimko

@george-oakling
Copy link

Yes, please, make it to mainline :)

@peterver
Copy link

peterver commented May 4, 2018

using the custom one as well at the moment, but would love seeing this in mainline as well :)

@costimuraru
Copy link

👍 would love to see this merged

@jaceq
Copy link

jaceq commented Sep 27, 2018

Any update here?

@alexsomesan
Copy link
Member

@nickschuch We've recently merged an update of the K8S client libraries to 1.10.
Would you be able to rebase this PR and remove the dep vendoring commit (you'll be able to make use of the newly merged client libraries).
We plan to switch dependency management to Go modules quite soon.

@nickschuch
Copy link
Contributor Author

Thanks @alexsomesan ! I'll sort it out today!

@ghost ghost added the size/XL label Oct 12, 2018
@nickschuch
Copy link
Contributor Author

Rebased!

How shall I proceed?

@alexsomesan
Copy link
Member

@nickschuch Looks good. Do you have anymore changes you'd like to add to this PR?

Otherwise I would say we merge it and work on acceptance tests, which are missing. Normally we'd not merge a PR without any kind of tests, but since this has been sitting for so long and we'd like to get the ball rolling again with the K8S provider I feel we can work on tests next and merge it now.

@nickschuch
Copy link
Contributor Author

That sounds great @alexsomesan !

@alexsomesan alexsomesan merged commit 4246a6e into hashicorp:master Oct 15, 2018
@zimbatm
Copy link
Contributor

zimbatm commented Oct 15, 2018

OMG. Kubernetes Deployments in terraform!

@Starefossen
Copy link

Now we only need to get #73 merged and then we can have a party 🎉 Keep up the good work everyone ❤️

@adrianlop
Copy link

hey guys,

looks like docs weren't updated: https://www.terraform.io/docs/providers/kubernetes/
but there's a new release of the kubernetes provider, so I guess the Deployment resource is available?

can anyone confirm please?
thank you in advance!

@alexsomesan
Copy link
Member

@adrianlop This is true. Issue was caused by me not being familiar with the website deployment process.
I'm in the middle of fixing it.

@alexsomesan
Copy link
Member

Done. Deployment docs are here: https://www.terraform.io/docs/providers/kubernetes/r/deployment.html

@adrianlop
Copy link

that was fast mate @alexsomesan thank you very much!!

@andyvanosdale
Copy link
Contributor

I'm looking at the update portion. Once it has updated the deployment, it seems it calls waitForDesiredReplicasFunc rather than waitForDeploymentReplicasFunc. Was this desired? I'm getting an issue where the replicationcontroller is not created and the apply fails.

@alexsomesan
Copy link
Member

@enozero Let me take a look...

@andyvanosdale
Copy link
Contributor

Thanks, @alexsomesan! I filed #210 to track.

@hashicorp hashicorp locked and limited conversation to collaborators Apr 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet