Skip to content

Map non-GKE Kubernetes resources#524

Open
Haihan-Jiang wants to merge 1 commit into
GoogleCloudPlatform:mainfrom
Haihan-Jiang:codex/non-gke-k8s-resource-mapping
Open

Map non-GKE Kubernetes resources#524
Haihan-Jiang wants to merge 1 commit into
GoogleCloudPlatform:mainfrom
Haihan-Jiang:codex/non-gke-k8s-resource-mapping

Conversation

@Haihan-Jiang
Copy link
Copy Markdown

Summary

  • detect Kubernetes monitored resources from k8s.cluster.name instead of requiring cloud.platform=gcp_kubernetes_engine
  • keep the existing container/pod/node/cluster selection based on the most specific Kubernetes attributes
  • add regression coverage for Kubernetes resources running on a non-GKE cloud platform

Fixes #265.

Testing

  • /tmp/otelpy-venv/bin/python -m pytest opentelemetry-resourcedetector-gcp/tests/test_mapping.py -q
  • /tmp/otelpy-venv/bin/tox -e py312-ci-test-resourcedetector -- tests/test_mapping.py -q
  • /tmp/otelpy-venv/bin/black opentelemetry-resourcedetector-gcp/src/opentelemetry/resourcedetector/gcp_resource_detector/_mapping.py opentelemetry-resourcedetector-gcp/tests/test_mapping.py --check --diff
  • /tmp/otelpy-venv/bin/isort opentelemetry-resourcedetector-gcp/src/opentelemetry/resourcedetector/gcp_resource_detector/_mapping.py opentelemetry-resourcedetector-gcp/tests/test_mapping.py --check-only --diff
  • git diff --check

@Haihan-Jiang Haihan-Jiang requested a review from a team as a code owner May 30, 2026 12:51
@Haihan-Jiang
Copy link
Copy Markdown
Author

This is ready for review from my side. The remaining ops-python-e2e Cloud Build checks appear to require project-side approval/run permissions; could someone take a look or trigger them when convenient?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Verify non-GKE resources map to k8s_* monitored resources

1 participant