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

[receiver/k8sobjects] initial commit #14699

Merged
merged 25 commits into from
Oct 26, 2022
Merged

[receiver/k8sobjects] initial commit #14699

merged 25 commits into from
Oct 26, 2022

Conversation

hvaghani221
Copy link
Member

Description:
Adding a receiver to collect(pull/watch) Kubernetes Objects

Link to tracking Issue:
#14185

Testing:
Added unit tests with mocked dynamic client and discovery client

Documentation:

@hvaghani221 hvaghani221 marked this pull request as ready for review October 7, 2022 09:10
@hvaghani221 hvaghani221 requested review from a team, mx-psi and dmitryax and removed request for mx-psi October 7, 2022 09:10
@hvaghani221 hvaghani221 requested review from povilasv and dmitryax and removed request for dmitryax and povilasv October 12, 2022 04:57
Copy link
Member

@dmitryax dmitryax left a comment

Choose a reason for hiding this comment

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

Just one nit. Otherwise LGTM

receiver/k8sobjectsreceiver/config.go Show resolved Hide resolved
.github/CODEOWNERS Outdated Show resolved Hide resolved
@hvaghani221
Copy link
Member Author

hvaghani221 commented Oct 13, 2022

According to current logic, it will dynamically find GroupVersion for the given resource, but it is possible that other Groups also have resources with the same name. It will create a conflict. For example, both v1 and events.k8s.io/v1 have events resource.

I need to add an API Group config to specify the group in case of a conflict.

harshit-splunk added 2 commits October 13, 2022 18:56
@dmitryax
Copy link
Member

dmitryax commented Oct 14, 2022

what Kubernetes version are you using?

I use v1.24.3 on GKE with the same config but auth_type: serviceAccount

@hvaghani221
Copy link
Member Author

@dmitryax for events, it is using the events.k8s.io group. So, you need to add it in the ClusterRole.

Maybe we can handle this error better.

@hvaghani221 hvaghani221 requested review from dmitryax and povilasv and removed request for dmitryax and povilasv October 17, 2022 12:06
@hvaghani221
Copy link
Member Author

@dmitryax is there any pending action item for me?

Copy link
Member

@dmitryax dmitryax left a comment

Choose a reason for hiding this comment

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

Thanks for implementing it. It's good as an initial version. Any further work can be done separately

@dmitryax dmitryax merged commit 6dd6f83 into open-telemetry:main Oct 26, 2022
mx-psi added a commit that referenced this pull request Oct 26, 2022
@mx-psi
Copy link
Member

mx-psi commented Oct 26, 2022

It looks like this PR broke tests on main, even if it passed here. I opened #15663 to revert it; unless the solution is quick I think we should revert so that we can proceed with today's release

shalper2 pushed a commit to shalper2/opentelemetry-collector-contrib that referenced this pull request Dec 6, 2022
Initial version of a receiver to collect(pull/watch) Kubernetes Objects
@plantfansam plantfansam mentioned this pull request Jul 21, 2023
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.

5 participants