Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Incorrect value for location in GKE for regional GKE clusters. #827

Copy link
Copy link
Closed
@gkevinzheng

Description

@gkevinzheng
Issue body actions

See googleapis/google-cloud-go#9083

In google/cloud/logging_v2/handlers/_monitored_resources.py, we use the value of zone for the value of the location label in GKE:

zone = retrieve_metadata_server(_ZONE_ID)
cluster_name = retrieve_metadata_server(_GKE_CLUSTER_NAME)
project = retrieve_metadata_server(_PROJECT_NAME)
resource = Resource(
type="k8s_container",
labels={
"project_id": project if project else "",
"location": zone if zone else "",
"cluster_name": cluster_name if cluster_name else "",
},
)
return resource

This is incorrect for regional GKE clusters, because the value of location should be the region where it is deployed, and is inconsistent with the value of location for other logging statements.

Metadata

Metadata

Assignees

Labels

api: loggingIssues related to the googleapis/python-logging API.Issues related to the googleapis/python-logging API.priority: p3Desirable enhancement or fix. May not be included in next release.Desirable enhancement or fix. May not be included in next release.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.