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.
What happened?
ValidateApplicationFailoverdereferences the optionalDecisionConditions.TolerationSecondsfield 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
TolerationSecondsvalue 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.