kubernetes / autoscaler

Autoscaling components for Kubernetes
Apache License 2.0
7.99k stars 3.94k forks source link

Fix: GCE FetchAvailableDiskTypes zones parsing #6986

Closed azylinski closed 3 months ago

azylinski commented 3 months ago

What type of PR is this?

/kind bug

What this PR does / why we need it:

The FetchAvailableDiskTypes method has wrong assumptions about gce.DiskTypeAggregatedList response format.

  1. The resp.Items[].Zone field is a URL, not a zone name.
  2. It would include regional (aggregated) data into output, whereas only zone level is needed

Which issue(s) this PR fixes:

There were no issues, as this method was recently added and was not used, yet.

Does this PR introduce a user-facing change?

NONE
x13n commented 3 months ago

/lgtm /approve

k8s-ci-robot commented 3 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: azylinski, x13n

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[cluster-autoscaler/cloudprovider/gce/OWNERS](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/cloudprovider/gce/OWNERS)~~ [x13n] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment