Skip to content

Incorrect pod readiness calculation for resource metric #275

Open
@tony-bondarenko

Description

@tony-bondarenko

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions