Skip to content

Commit 2c50ba3

Browse files
authored
fix: Retry K0smotronControlPlane reconciliation when ControlPlaneReadyCondition is not true (#1135)
1 parent eb42778 commit 2c50ba3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

internal/controller/controlplane/k0smotron_controlplane_controller.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,11 @@ func (c *K0smotronController) computeStatus(ctx context.Context, cluster *cluste
474474

475475
// if no replicas are yet available or the desired version is not in the current state of the
476476
// control plane, the reconciliation is requeued waiting for the desired replicas to become available.
477-
if kcp.Status.UnavailableReplicas > 0 || FormatStatusVersion(kcp.Spec.Version, desiredVersion.String()) != kcp.Status.Version {
477+
// Additionally, if the ControlPlaneReadyCondition is false (e.g., due to DNS resolution failures),
478+
// we should also requeue to retry the connection.
479+
if kcp.Status.UnavailableReplicas > 0 ||
480+
FormatStatusVersion(kcp.Spec.Version, desiredVersion.String()) != kcp.Status.Version ||
481+
!conditions.IsTrue(kcp, cpv1beta1.ControlPlaneReadyCondition) {
478482
return ErrNotReady
479483
}
480484

0 commit comments

Comments
 (0)