Skip to content
This repository has been archived by the owner on Oct 3, 2023. It is now read-only.

Stop assuming zonal cluster deployment #292

Open
MontyCarter opened this issue Aug 31, 2021 · 1 comment
Open

Stop assuming zonal cluster deployment #292

MontyCarter opened this issue Aug 31, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@MontyCarter
Copy link

zone, err := metadataapi.Zone()

This code works when a GKE cluster is zonally deployed, but is incorrect when run against a regional cluster. With a regional cluster, the Location should be the region name, not the underlying zone name.

This needs to use metadataapi.InstanceAttributeValue("cluster-location") (similar to here: https://github.com/knative/pkg/blob/7d1b0f19ef717da9e0df0ce1e35e1ca81627445f/metrics/gcp_metadata.go#L44)

@dashpole dashpole added the bug Something isn't working label Aug 31, 2021
@dashpole
Copy link
Contributor

You are probably right. Using the region in regional clusters would match what GKE does for container/pod/cluster metrics.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants