Skip to content
This repository has been archived by the owner on Jun 4, 2024. It is now read-only.

Commit

Permalink
Merge pull request #9 from nebius/PLATFORMINFRA-185-fix-and-automate-…
Browse files Browse the repository at this point in the history
…clusterctl-move

Set ByoHost status to K8sNodeBootstrapSucceeded if /run/cluster-api/bootstrap-success.complete exists
  • Loading branch information
syndicut authored Mar 21, 2024
2 parents f5efcd1 + 459c288 commit 2939f39
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions agent/reconciler/host_reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,11 @@ func (r *HostReconciler) reconcileNormal(ctx context.Context, byoHost *infrastru
return ctrl.Result{}, nil
}

if _, err := os.Stat(bootstrapSentinelFile); err == nil {
logger.Info("Found sentinel file, setting BootstrapK8sNodeSucceeded condition to true")
conditions.MarkTrue(byoHost, infrastructurev1beta1.K8sNodeBootstrapSucceeded)
}

if !conditions.IsTrue(byoHost, infrastructurev1beta1.K8sNodeBootstrapSucceeded) {
bootstrapScript, err := r.getBootstrapScript(ctx, byoHost.Spec.BootstrapSecret.Name, byoHost.Spec.BootstrapSecret.Namespace)
if err != nil {
Expand Down

0 comments on commit 2939f39

Please sign in to comment.