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
pkg/k8s: fix k8s_event_lag_seconds for negative time #14313
Conversation
In some occasions the metric `k8s_event_lag_seconds` could be presented as an overflown value such as `9223372036854775807`. This commit fixes this by checking if the calculated value is less than zero by only setting this metric for positive times. Fixes: 4e29130 ("pkg/endpoint: calculate Kube API-Server lag from pod events") Signed-off-by: André Martins <andre@cilium.io>
test-me-please |
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.
Did we understand why it was negative to begin with? Shouldn't the time since always be going forward?
hit #14125 |
retest-runtime |
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 🚀
hit #14330 |
In some occasions the metric
k8s_event_lag_seconds
could be presentedas an overflown value such as
9223372036854775807
. This commit fixesthis by checking if the calculated value is less than zero by only
setting this metric for positive times.
Fixes: 4e29130 ("pkg/endpoint: calculate Kube API-Server lag from pod events")
Signed-off-by: André Martins andre@cilium.io
Fixes: #14309