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/resourcedetection] Add back host.name on GKE #12355

Merged
merged 2 commits into from
Jul 22, 2022

Conversation

mx-psi
Copy link
Member

@mx-psi mx-psi commented Jul 13, 2022

Description:

Adds back the host.name attribute (coming from instance/hostname) when running on GKE.

This metadata endpoint is available on GKE nodes of any type, and it was possible to have this attribute on GKE before #10347

Link to tracking Issue: Fixes #12354

Before the detectors were unified, the `host.name` attribute could
be fetched on GKE if using the `gce` detector, so this just restores
back the ability to have this attribute.
@mx-psi mx-psi requested a review from a team July 13, 2022 10:26
Copy link
Contributor

@dashpole dashpole left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See #10486 (comment). It unfortunately isn't available on GKE when using workload identity.

@mx-psi
Copy link
Member Author

mx-psi commented Jul 13, 2022

See #10486 (comment). It unfortunately isn't available on GKE when using workload identity.

@dashpole Thanks for the link. Is it possible to identify when workload identity is being used? (Will investigate this, but maybe you know the answer right away :))

@dashpole
Copy link
Contributor

It isn't really possible for the collector to know. The GCE metadata endpoints just won't be available in that case.

@mx-psi
Copy link
Member Author

mx-psi commented Jul 22, 2022

I added a addFallible method to the builder, so that the error is only logged when GCEHostname fails and does not make the whole processor fail. Is this solution acceptable to you @dashpole?

I understand that this can be also gathered through the downward API, but our biggest issue with users is currently misconfigurations and this makes it a lot easier (and restores the behavior that existed before when not using workload identity and was removed without prior warning).

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.

[processor/resourcedetection] instance hostname missing on GKE with new detector
3 participants