Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

processor/resourcedetectionprocessor: add fall back method for GKE host name detection #15716

Closed
gbbr opened this issue Oct 31, 2022 · 7 comments · Fixed by #20514
Closed

processor/resourcedetectionprocessor: add fall back method for GKE host name detection #15716

gbbr opened this issue Oct 31, 2022 · 7 comments · Fixed by #20514
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request processor/resourcedetection Resource detection processor

Comments

@gbbr
Copy link
Member

gbbr commented Oct 31, 2022

Is your feature request related to a problem? Please describe.

When using Workload Identity in GKE, the host name resolution will fail, resulting in an empty host name attribute.

Describe the solution you'd like

Under normal circumstances, this call returns the instance name. When not available, one could fall back to obtaining the Kubernetes node name from the Kubernetes API (with k8s.io/client-go). The Kubernetes node name is also equal to the instance name.

@gbbr gbbr added enhancement New feature or request needs triage New item requiring triage labels Oct 31, 2022
@mx-psi mx-psi added the processor/resourcedetection Resource detection processor label Oct 31, 2022
@github-actions
Copy link
Contributor

Pinging code owners: @jrcamp @Aneurysm9 @dashpole. See Adding Labels via Comments if you do not have permissions to add labels yourself.

@mx-psi
Copy link
Member

mx-psi commented Oct 31, 2022

@dashpole We want your feedback on this. On GKE, instance/name seems to always return the Kubernetes node name. It would be useful to us (Datadog) if this also worked when running under Workload identity, in which case one would have to get it from either the downward API or querying the Kubernetes API server. Is this something the gcp detector should do? If so, how should it do it?

@dashpole
Copy link
Contributor

Generally, I'd like the gcp detector to only retrieve information from gcp-specific metadata sources.

It should not query the Kubernetes API Server. It is already possible to use the downward API today with the env detector to add host.name if you want.

@fatsheep9146 fatsheep9146 removed the needs triage New item requiring triage label Oct 31, 2022
@mx-psi
Copy link
Member

mx-psi commented Oct 31, 2022

That's fair, I understand. Even if we don't do it automatically, I think it would still be helpful to at least document the limitation on Workload identity and suggest using the env detector on the processor's README. Does that make sense?

@dashpole
Copy link
Contributor

dashpole commented Nov 1, 2022

I fully support improving documentation :)

@github-actions
Copy link
Contributor

github-actions bot commented Jan 2, 2023

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@github-actions github-actions bot added the Stale label Jan 2, 2023
@mx-psi mx-psi removed the Stale label Jan 3, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Mar 6, 2023

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request processor/resourcedetection Resource detection processor
Projects
None yet
4 participants