Skip to content

Commit 4ea1016

Browse files
committed
cluster: don't wait for bastion to mark cluster ready
bastion is not a CAPI resource, therefore we shouldn't wait for it to be ready so the cluster is marked ready.
1 parent 2899df6 commit 4ea1016

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

controllers/openstackcluster_controller.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -309,16 +309,6 @@ func (r *OpenStackClusterReconciler) reconcileNormal(ctx context.Context, scope
309309
return reconcile.Result{}, err
310310
}
311311

312-
// TODO(emilien) we should do that separately but the reconcileBastion
313-
// should happen after the cluster Ready is true
314-
result, err := r.reconcileBastion(ctx, scope, cluster, openStackCluster)
315-
if err != nil {
316-
return reconcile.Result{}, err
317-
}
318-
if result != nil {
319-
return *result, nil
320-
}
321-
322312
availabilityZones, err := computeService.GetAvailabilityZones()
323313
if err != nil {
324314
return ctrl.Result{}, err
@@ -343,6 +333,16 @@ func (r *OpenStackClusterReconciler) reconcileNormal(ctx context.Context, scope
343333
openStackCluster.Status.FailureMessage = nil
344334
openStackCluster.Status.FailureReason = nil
345335
scope.Logger().Info("Reconciled Cluster created successfully")
336+
337+
result, err := r.reconcileBastion(ctx, scope, cluster, openStackCluster)
338+
if err != nil {
339+
return reconcile.Result{}, err
340+
}
341+
if result != nil {
342+
return *result, nil
343+
}
344+
scope.Logger().Info("Reconciled Bastion created successfully")
345+
346346
return reconcile.Result{}, nil
347347
}
348348

0 commit comments

Comments
 (0)