@@ -87,11 +87,10 @@ func (reconciler *CloudStackClusterReconciler) Reconcile(ctx context.Context, re
87
87
// Reconcile actually reconciles the CloudStackCluster.
88
88
func (r * CloudStackClusterReconciliationRunner ) Reconcile () (res ctrl.Result , reterr error ) {
89
89
return r .RunReconciliationStages (
90
+ r .SetFailureDomainsStatusMap ,
90
91
r .CreateFailureDomains (r .ReconciliationSubject .Spec .FailureDomains ),
91
- r .CheckOwnedCRDsForReadiness (infrav1 .GroupVersion .WithKind ("CloudStackFailureDomain" )),
92
92
r .GetFailureDomains (r .FailureDomains ),
93
93
r .VerifyFailureDomainCRDs ,
94
- r .SetFailureDomains ,
95
94
r .SetReady )
96
95
}
97
96
@@ -117,10 +116,10 @@ func (r *CloudStackClusterReconciliationRunner) VerifyFailureDomainCRDs() (ctrl.
117
116
return ctrl.Result {}, nil
118
117
}
119
118
120
- // SetFailureDomains sets failure domains to be used for CAPI machine placement.
121
- func (r * CloudStackClusterReconciliationRunner ) SetFailureDomains () (ctrl.Result , error ) {
119
+ // SetFailureDomainsStatusMap sets failure domains in CloudStackCluster status to be used for CAPI machine placement.
120
+ func (r * CloudStackClusterReconciliationRunner ) SetFailureDomainsStatusMap () (ctrl.Result , error ) {
122
121
r .ReconciliationSubject .Status .FailureDomains = clusterv1.FailureDomains {}
123
- for _ , fdSpec := range r .FailureDomains . Items {
122
+ for _ , fdSpec := range r .ReconciliationSubject . Spec . FailureDomains {
124
123
if ! strings .HasSuffix (fdSpec .Name , "-" + r .CAPICluster .Name ) { // Add cluster name suffix if missing.
125
124
fdSpec .Name = fdSpec .Name + "-" + r .CAPICluster .Name
126
125
}
0 commit comments