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] introduce kubeadm detector #35450

Open
wants to merge 39 commits into
base: main
Choose a base branch
from

Conversation

odubajDT
Copy link
Contributor

@odubajDT odubajDT commented Sep 27, 2024

Description:

  • introduce kubeadm detector to detect local cluster name

Link to tracking Issue: #35116

@odubajDT odubajDT force-pushed the resourcedetection-local-cluster branch 2 times, most recently from 1bdc2fb to 3c5422f Compare September 30, 2024 06:49
@odubajDT odubajDT marked this pull request as ready for review September 30, 2024 08:05
@odubajDT odubajDT requested a review from a team as a code owner September 30, 2024 08:05
processor/resourcedetectionprocessor/README.md Outdated Show resolved Hide resolved
internal/metadataproviders/kubeadm/metadata.go Outdated Show resolved Hide resolved
processor/resourcedetectionprocessor/README.md Outdated Show resolved Hide resolved
if d.ra.K8sClusterName.Enabled {
clusterName, err := d.provider.ClusterName(ctx)
if err != nil {
return pcommon.NewResource(), "", fmt.Errorf("failed getting k8s cluster name: %w", err)
Copy link
Member

Choose a reason for hiding this comment

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

Nit, feel free to drop: I'm wondering if it would be better to future-proof this by not returning the error right away, and returning the error at the end.

If we end up adding more resource attributes the existing logic would not record the other, unrelated resource attributes, even if they could be detected and emitted successfully.

@odubajDT odubajDT force-pushed the resourcedetection-local-cluster branch from 5dbc1c7 to 99bf118 Compare October 2, 2024 07:45
@odubajDT odubajDT force-pushed the resourcedetection-local-cluster branch 2 times, most recently from 062d966 to 80bd836 Compare October 4, 2024 05:50
@odubajDT odubajDT requested a review from crobert-1 October 4, 2024 10:55
@odubajDT odubajDT force-pushed the resourcedetection-local-cluster branch from 6436f3a to 0eda211 Compare October 9, 2024 06:30
@odubajDT
Copy link
Contributor Author

@crobert-1 any other suggestions?

@odubajDT
Copy link
Contributor Author

cc @crobert-1

@odubajDT odubajDT force-pushed the resourcedetection-local-cluster branch from aa63a96 to ad7502e Compare November 6, 2024 06:09
Signed-off-by: odubajDT <[email protected]>
Signed-off-by: odubajDT <[email protected]>
Signed-off-by: odubajDT <[email protected]>
Signed-off-by: odubajDT <[email protected]>
Signed-off-by: odubajDT <[email protected]>
Signed-off-by: odubajDT <[email protected]>
Signed-off-by: odubajDT <[email protected]>
Copy link
Member

@ChrsMark ChrsMark left a comment

Choose a reason for hiding this comment

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

Left 2 nits. Otherwise LGTM.

internal/metadataproviders/kubeadm/metadata.go Outdated Show resolved Hide resolved
processor/resourcedetectionprocessor/README.md Outdated Show resolved Hide resolved
Signed-off-by: odubajDT <[email protected]>
Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@odubajDT
Copy link
Contributor Author

odubajDT commented Jan 2, 2025

@crobert-1 is this blocked by something? cc @dmitryax

@ChrsMark ChrsMark added the ready to merge Code review completed; ready to merge by maintainers label Jan 8, 2025
@odubajDT
Copy link
Contributor Author

odubajDT commented Jan 9, 2025

@crobert-1 @ChrsMark @dashpole can we merge this?

@crobert-1
Copy link
Member

@crobert-1 @ChrsMark @dashpole can we merge this?

The ready to merge label has been added to make it clear to maintainers this can be merged. If it doesn't get merged soon you can share this PR in the #otel-collector-dev CNCF slack channel and request that it would get merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal/metadataproviders processor/resourcedetection Resource detection processor ready to merge Code review completed; ready to merge by maintainers waiting-for-code-owners
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants