Skip to content

Commit

Permalink
Allow machine rollout if cert reconcile fails
Browse files Browse the repository at this point in the history
Signed-off-by: killianmuldoon <kmuldoon@vmware.com>
  • Loading branch information
killianmuldoon committed May 22, 2023
1 parent 94ca9a7 commit 0a86895
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions controlplane/kubeadm/internal/controllers/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -371,11 +371,6 @@ func (r *KubeadmControlPlaneReconciler) reconcile(ctx context.Context, cluster *
return result, err
}

// Reconcile certificate expiry for machines that don't have the expiry annotation on KubeadmConfig yet.
if result, err := r.reconcileCertificateExpiries(ctx, controlPlane); err != nil || !result.IsZero() {
return result, err
}

// Control plane machines rollout due to configuration changes (e.g. upgrades) takes precedence over other operations.
needRollout := controlPlane.MachinesNeedingRollout()
switch {
Expand All @@ -392,6 +387,11 @@ func (r *KubeadmControlPlaneReconciler) reconcile(ctx context.Context, cluster *
}
}

// Reconcile certificate expiry for machines that don't have the expiry annotation on KubeadmConfig yet.
if result, err := r.reconcileCertificateExpiries(ctx, controlPlane); err != nil || !result.IsZero() {
return result, err
}

// If we've made it this far, we can assume that all ownedMachines are up to date
numMachines := len(ownedMachines)
desiredReplicas := int(*kcp.Spec.Replicas)
Expand Down

0 comments on commit 0a86895

Please sign in to comment.