Skip to content

Commit

Permalink
Merge pull request #172 from spectrocloud/PCP-3270
Browse files Browse the repository at this point in the history
Handle init configuration for takeover cluster 1st node
  • Loading branch information
snehala27 authored Jul 19, 2024
2 parents c629b08 + d4384e9 commit 86ae20e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions controlplane/kubeadm/internal/controllers/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,9 @@ func (r *KubeadmControlPlaneReconciler) reconcile(ctx context.Context, controlPl
// Create new Machine w/ init
log.Info("Initializing control plane", "Desired", desiredReplicas, "Existing", numMachines)
conditions.MarkFalse(controlPlane.KCP, controlplanev1.AvailableCondition, controlplanev1.WaitingForKubeadmInitReason, clusterv1.ConditionSeverityInfo, "")
if annotations.IsTakeOverCluster(controlPlane.Cluster.GetObjectMeta()) {
return r.scaleUpControlPlane(ctx, controlPlane)
}
return r.initializeControlPlane(ctx, controlPlane)
// We are scaling up
case numMachines < desiredReplicas && numMachines > 0:
Expand Down

0 comments on commit 86ae20e

Please sign in to comment.