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

[GKE] Support autoscaling #8605

Closed
thecodeassassin opened this issue Sep 1, 2016 · 24 comments
Closed

[GKE] Support autoscaling #8605

thecodeassassin opened this issue Sep 1, 2016 · 24 comments

Comments

@thecodeassassin
Copy link

hey all,

Google cloud supports autoscaling for nodes which is very useful in high traffic kubernetes deployments. Could you add this feature to terraform? Currently i use local exec like this:

  # enable autoscaling
  provisioner "local-exec" {
      command = "gcloud container clusters update ${var.google_container_cluster.name} --enable-autoscaling --min-nodes=${var.min_nodes} --max-nodes=${var.max_nodes} --project='${var.project_name}'"
  }

Documentation is here
https://cloud.google.com/container-engine/docs/clusters/operations

@cblecker
Copy link
Contributor

cblecker commented Sep 1, 2016

Hey @stack72 --
I think this should be provider/google instead of provider/aws :)

@cblecker
Copy link
Contributor

cblecker commented Sep 2, 2016

@evandbrown @roberthbailey --
It appears that google.golang.org/api/container/v1 has fallen behind the public documentation (similar to how it did in googleapis/google-api-go-client#127). The API documentation (https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters.nodePools) indicates there is an autoscaling field, however https://www.googleapis.com/discovery/v1/apis/container/v1/rest doesn't specify that this field exists.

I'm guessing that if https://www.googleapis.com/discovery/v1/apis/container/v1/rest is updated, that the auto-generated google.golang.org/api/container/v1 will update, and then can be re-vendored into Terraform.

Is there a place to open an issue to get the API discovery point updated?

@roberthbailey
Copy link

https://container.googleapis.com/$discovery/rest?version=v1 shows the autoscaling field. And that link is referenced from https://cloud.google.com/container-engine/reference/rest/ as the discovery URL for the API. What led you to the googleapis.com URL?

@evandbrown
Copy link
Contributor

@cblecker I'm mobile at the moment but agree this is likely due to an old version of the vendored package. I'll get that updated tomorrow and add the necessary field to the cluster resource.

@cblecker
Copy link
Contributor

cblecker commented Sep 2, 2016

@roberthbailey: That Github issue I linked to from earlier this year pointed me at that URL: googleapis/google-api-go-client#127 .

It also appears that https://github.com/google/google-api-go-client/blob/master/api-list.json#L1334 in the google-api-go-client package points to that discovery URL. Perhaps that means it could be as simple as updating the discovery URL in the google-api-go-client?

@evandbrown: I had checked for an outdated vendor first, but the vendored version inside Terraform is the latest available at google.golang.org/api/container/v1.

@evandbrown
Copy link
Contributor

@roberthbailey @cblecker I'm working with the Go team to get the autogen library updated. When that's done, I'll revendor and add NodePool support.

@thecodeassassin thecodeassassin changed the title [GCE] Support autoscaling [GKE] Support autoscaling Sep 2, 2016
@cblecker
Copy link
Contributor

cblecker commented Oct 7, 2016

Hey @evandbrown --
Any update on this? Seems the go client library was updated, but the container API is still pointing to the outdated discovery link.

@evandbrown
Copy link
Contributor

evandbrown commented Oct 27, 2016

@thecodeassassin @cblecker I'm working on this today. Current plan it to implement this as support for the NodePool resource. Sound OK?

@cblecker
Copy link
Contributor

@evandbrown Yay! That makes total sense to me.

Did the endpoint get updated? I still don't see it exposed at https://www.googleapis.com/discovery/v1/apis/container/v1/rest, and the google-api-go-client still seems ot point to https://container.googleapis.com/%24discovery/rest?version=v1

@evandbrown
Copy link
Contributor

@cblecker Agh, I saw the client libs were regenerated 21 days ago and assumed they reflected the new types. That's not the case. I've pinged the team and will keep this thread updated. At any rate, when it's available we'll expect to implement as a NodePools field in the manifest which will have some nice features in addition to autoscaling.

@cblecker
Copy link
Contributor

Thanks for continuing to track this down, @evandbrown!

@thecodeassassin
Copy link
Author

@evandbrown Sounds good to me :) Thanks!

@cblecker
Copy link
Contributor

cblecker commented Nov 8, 2016

Hey @evandbrown --
I actually came across another situation where this feature would be useful. I don't know if the teams have made any progress, but wondering if there is an update.

Thanks again!

@evandbrown
Copy link
Contributor

@roberthbailey, any ETA on the discovery doc update?

@cblecker once that doc is updated, I'll do my best to get the client lib updated, and will push the change as soon as that's done :)

@roberthbailey
Copy link

I think the change is in progress, but I'm not sure how long it'll take before it goes live.

@cblecker
Copy link
Contributor

@evandbrown @roberthbailey any update on this? :)

@roberthbailey
Copy link

@fabioy might have an eta

@cblecker
Copy link
Contributor

cblecker commented Jan 16, 2017

@evandbrown @roberthbailey @fabioy --
Any update on this?
Where we are at from what I can see:
The google-api-go-client is currently using https://www.googleapis.com/discovery/v1/apis/container/v1/rest as it's discovery API. The last time this was updated and regenerated into the google-api-go-client library was on May 1, 2016, over 260 days ago.

There is also the https://container.googleapis.com/$discovery/rest?version=v1 endpoint that seems to be more up to date, but those updates aren't making it into https://www.googleapis.com/discovery/v1/apis/container/v1/rest.

I'm not sure what it will take to get these discovery endpoints updated, but it's really stalling out writing tools (terraform or otherwise) for GKE when the go api library is over 9 months out of date.

@roberthbailey
Copy link

@cblecker -- I've just updated the discovery doc to include the recent changes in the GKE API. The google-api-go-client should be updated soon.

@danawillow
Copy link
Contributor

All right, the go client has been updated. @cblecker were you planning on doing the dev work for this? I have it as a high priority goal of mine this quarter but if you're planning on doing it I certainly don't mind.

@cblecker
Copy link
Contributor

@danawillow I was gonna take a stab at it this weekend. If I've got a WIP, mind if I ping you next week for review? If I'm not able to carve out the time, then I have no problem handing it over :)

@danawillow
Copy link
Contributor

Works for me!

@cblecker
Copy link
Contributor

cblecker commented Feb 6, 2017

@danawillow Sorry, some stuff has come up and I haven't had a chance to get to this. If it's urgent for you, please feel free to take it over.

@danawillow danawillow self-assigned this Feb 8, 2017
@ghost
Copy link

ghost commented Apr 10, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

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

Successfully merging a pull request may close this issue.

7 participants