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

Incorrect pod readiness calculation for resource metric #275

Open
tony-bondarenko opened this issue Mar 3, 2025 · 0 comments
Open

Incorrect pod readiness calculation for resource metric #275

tony-bondarenko opened this issue Mar 3, 2025 · 0 comments

Comments

@tony-bondarenko
Copy link

There is an issue in pod readiness condition:

ignorePod = condition.Status == corev1.ConditionFalse || pod.Status.StartTime.Add(delayOfInitialReadinessStatus).After(condition.LastTransitionTime.Time)

It checks that "pod start time" + "readiness delay" > "last ready condition transition" to include pod into calculations.
If ready state transition happened faster than readiness delay, pod will stay in ignored state forever.

More probably it should be:
condition.LastTransitionTime.Time.Add(delayOfInitialReadinessStatus).After(time.Now())

At the moment readinessDelaySeconds for resource metrics can't be used. Work around is to set it to 1.

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

No branches or pull requests

1 participant