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

Set ByoHost status to K8sNodeBootstrapSucceeded if /run/cluster-api/bootstrap-success.complete exists #9

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading