mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 20:53:33 +00:00
Merge pull request #92883 from jingxu97/July/listzones
Fix ListZonesInRegion() after client BasePath change
This commit is contained in:
commit
cbb779e9b6
@ -20,6 +20,7 @@ package gce
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
compute "google.golang.org/api/compute/v1"
|
||||
@ -79,7 +80,9 @@ func (g *Cloud) ListZonesInRegion(region string) ([]*compute.Zone, error) {
|
||||
defer cancel()
|
||||
|
||||
mc := newZonesMetricContext("list", region)
|
||||
list, err := g.c.Zones().List(ctx, filter.Regexp("region", g.getRegionLink(region)))
|
||||
// Use regex match instead of an exact regional link constructed from getRegionalLink below.
|
||||
// See comments in issue kubernetes/kubernetes#87905
|
||||
list, err := g.c.Zones().List(ctx, filter.Regexp("region", fmt.Sprintf(".*/regions/%s", region)))
|
||||
if err != nil {
|
||||
return nil, mc.Observe(err)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user