Skip to content

ValidateApplicationFailover should safely handle nil TolerationSeconds #7688

Description

@A69SHUBHAM

What happened?

ValidateApplicationFailover dereferences the optional DecisionConditions.TolerationSeconds field without checking whether it is nil.

Although this field is normally defaulted by the CRD in production, the validation function itself can still be called directly (for example, in unit tests or by internal callers), making the unconditional dereference unsafe.

What did you expect to happen?

The validation should safely handle a nil TolerationSeconds value instead of relying on CRD defaulting.

Additional information

The same function already performs nil checks for other optional pointer fields such as GracePeriodSeconds, so this behavior is inconsistent with the existing validation style.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions