-
Notifications
You must be signed in to change notification settings - Fork 452
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
[FIX]: adds case to handle kubeletstats reciever to ignore endpoint #558
[FIX]: adds case to handle kubeletstats reciever to ignore endpoint #558
Conversation
@VineethReddy02, could you please review this one as you are familiar with this code? |
pkg/collector/parser/receiver.go
Outdated
@@ -100,6 +100,11 @@ func singlePortFromConfigEndpoint(logger logr.Logger, name string, config map[in | |||
case name == "tcplog" || name == "udplog": | |||
endpoint = getAddressFromConfig(logger, name, listenAddressKey, config) | |||
|
|||
// in case of kubeletstats reciever, the endpoint is ignored | |||
case name == "kubeletstats": | |||
endpoint = nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All you have to do is return nil
here. No use of nil
assignment. Also, add unit tests for the same.
Add detailed comment for future reference on this special case:
// ignore kubeletstats receiver as it holds the field key endpoint, and it
// is a scraper, we only expose endpoint through k8s service objects for
// receivers that aren't scrapers.
case name == "kubeletstats":
return nil
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot @VineethReddy02 and @jpkrohling for your review and suggestions, really learned so much through this process! Have added a commit with your suggestions, do let me know for any other changes, thanks a lot again for all the help 😄
@mritunjaysharma394 can you re-iterate on the suggested changes? |
Hi @VineethReddy02 , thanks a lot for the review and suggestions, I will complete the suggested changes by tomorrow, sorry for the delay due to exams! |
541d587
to
8f61c06
Compare
Signed-off-by: Mritunjay Sharma <[email protected]>
Signed-off-by: Mritunjay Sharma <[email protected]>
Signed-off-by: Mritunjay Sharma <[email protected]>
8f61c06
to
8d47f26
Compare
…pen-telemetry#558) * adds case to handle kubeletstats receiver to ignore endpoint
This PR is an attempt to fix #527 to ignore certain kubeletstats receivers when deriving service from config
Signed-off-by: Mritunjay Sharma [email protected]