mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-02 08:17:26 +00:00
Undo capture of list clusters
This commit is contained in:
parent
4a51f8a186
commit
14d2cf85a6
@ -26,19 +26,18 @@ func newClustersMetricContext(request, zone string) *metricContext {
|
||||
}
|
||||
|
||||
func (gce *GCECloud) ListClusters() ([]string, error) {
|
||||
mc := newClustersMetricContext("list", "")
|
||||
allClusters := []string{}
|
||||
|
||||
for _, zone := range gce.managedZones {
|
||||
clusters, err := gce.listClustersInZone(zone)
|
||||
if err != nil {
|
||||
return nil, mc.Observe(err)
|
||||
return nil, err
|
||||
}
|
||||
// TODO: Scoping? Do we need to qualify the cluster name?
|
||||
allClusters = append(allClusters, clusters...)
|
||||
}
|
||||
|
||||
return allClusters, mc.Observe(nil)
|
||||
return allClusters, nil
|
||||
}
|
||||
|
||||
func (gce *GCECloud) Master(clusterName string) (string, error) {
|
||||
|
Loading…
Reference in New Issue
Block a user