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

Add EKS cluster name detection #27408

Closed
wants to merge 30 commits into from

Conversation

crobert-1
Copy link
Member

Description:

This enhancement detects the k8s cluster name in EKS. The solution uses EC2 instance tags to determine the cluster name, which means it will only work on EC2 (as noted in documentation updates).

Link to tracking Issue:
Resolves #26794

Testing:
Manual testing in an EKS cluster when running on EC2 instances.

Documentation:
Updated README and relevant metadata

@crobert-1 crobert-1 requested a review from a team October 3, 2023 17:16
@github-actions github-actions bot added cmd/configschema configschema command cmd/otelcontribcol otelcontribcol command exporter/datadog Datadog components processor/resourcedetection Resource detection processor labels Oct 3, 2023
@crobert-1 crobert-1 added the enhancement New feature or request label Oct 3, 2023
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.

LGTM overall, but someone from AWS should take a look.

@crobert-1
Copy link
Member Author

Sorry for all of the updates here, linting is failing with OOM on the GitHub runners. I'm trying to find the best balance here of getting lint to complete successfully in the least amount of time possible.

.golangci.yml Outdated
@@ -4,7 +4,7 @@ run:
concurrency: 4

# timeout for analysis, e.g. 30s, 5m, default is 1m
timeout: 20m
timeout: 100m
Copy link
Contributor

Choose a reason for hiding this comment

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

is this still necessary?

Copy link
Member Author

@crobert-1 crobert-1 Oct 26, 2023

Choose a reason for hiding this comment

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

My apologies, I should have marked this PR as draft earlier. All of the changes you marked were a part of my testing to determine the failure point in the linting process. I'm going to revert as many of these changes as possible, and mark the review as Ready for Review when it's ready again.

Thanks for calling all of these out!

Copy link
Contributor

Choose a reason for hiding this comment

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

No apologies necessary :) happy to review when it's good to go

@dmitryax
Copy link
Member

Looks like your linter config change didn't work out. I see make -C cmd/otelcontribcol lint in the tests. The linter uses cmd/otelcontribcol as root directory

@crobert-1
Copy link
Member Author

Superseded by #28649. v1 of the aws-sdk-go library doesn't run into the linting issues, so I've decided to use that instead.

@crobert-1 crobert-1 closed this Oct 26, 2023
@crobert-1 crobert-1 deleted the eks_cluster_name branch October 26, 2023 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cmd/configschema configschema command cmd/otelcontribcol otelcontribcol command enhancement New feature or request exporter/datadog Datadog components processor/resourcedetection Resource detection processor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[processor/resourcedetection]: Add support for k8s.cluster.name where possible
6 participants