-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
k8sobserver: only record pod endpoints for running pods #5878
k8sobserver: only record pod endpoints for running pods #5878
Conversation
This change updates the k8sobserver to only add a pod level endpoint if the Pod is currently running. This prevents a situation in which receivers consuming from the k8sobserver would continue to interact with a Pod endpoint after the Pod had completed. In the worst case this would result in misleading results as other running pods could re-use the Pod's IP address and telemetry data would be misattributed.
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.
Agree that there seem to only be bad things that can happen with these endpoints, for example when then used by the prometheus receiver, no good ones.
@anuraaga Seems to have failed on a load test, but its not clear to me how this change would impact that. Any ideas? |
Hey folks, any thoughts on this one? Would love to be able to rely on the k8sobserver for this use case. |
This PR was marked stale due to lack of activity. It will be closed in 7 days. |
Commenting to prevent this issue from being closed. |
This PR was marked stale due to lack of activity. It will be closed in 7 days. |
This is still an issue. Would love to reach a resolution here so we can leverage the K8s Observer for metrics. |
@bogdandrutu @anuraaga Just a friendly ping. Are there any outstanding questions here? Is there anything I can do on my end to push this forward? |
@jpkrohling Would you be able to merge this one? |
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.
LGTM
Description:
This change updates the k8sobserver to only add a pod level endpoint if the Pod is currently running.
This prevents a situation in which receivers consuming from the k8sobserver would continue to interact with a Pod endpoint after the Pod had completed. In the worst case this would result in misleading results as other running pods could re-use the Pod's IP address and telemetry data would be misattributed.
Specifically, we observed this issue when using the
receivercreator
to scrape prometheus endpoints from pods associated with long running jobs.Note: Should this be a configuration option? Are there ever situation in which a resource would like to track endpoints for non running pods?
Link to tracking Issue:
Testing:
Unit tests.
Documentation:
Unclear if this is necessary. But will add if needed.