@@ -81,7 +81,7 @@ func (r *EvictionReconciler) Reconcile(ctx context.Context, req ctrl.Request) (c
8181 return ctrl.Result {}, err
8282 }
8383
84- statusCondition := meta .FindStatusCondition (eviction .Status .Conditions , kvmv1 .ConditionTypeEviction )
84+ statusCondition := meta .FindStatusCondition (eviction .Status .Conditions , kvmv1 .ConditionTypeEvicting )
8585 if statusCondition == nil {
8686 // No status condition, so we need to add it
8787 if r .addCondition (ctx , eviction , metav1 .ConditionTrue , "Running" , kvmv1 .ConditionReasonRunning ) {
@@ -117,10 +117,10 @@ func (r *EvictionReconciler) handleRunning(ctx context.Context, eviction *kvmv1.
117117 }
118118
119119 meta .SetStatusCondition (& eviction .Status .Conditions , metav1.Condition {
120- Type : kvmv1 .ConditionTypeEviction ,
120+ Type : kvmv1 .ConditionTypeEvicting ,
121121 Status : metav1 .ConditionFalse ,
122122 Message : "eviction completed successfully" ,
123- Reason : kvmv1 .ConditionReasonSuceeded ,
123+ Reason : kvmv1 .ConditionReasonSucceeded ,
124124 })
125125
126126 eviction .Status .OutstandingRamMb = 0
@@ -148,7 +148,7 @@ func (r *EvictionReconciler) handlePreflight(ctx context.Context, eviction *kvmv
148148 // Abort eviction
149149 err = fmt .Errorf ("failed to get hypervisor %w" , err )
150150 meta .SetStatusCondition (& eviction .Status .Conditions , metav1.Condition {
151- Type : kvmv1 .ConditionTypeEviction ,
151+ Type : kvmv1 .ConditionTypeEvicting ,
152152 Status : metav1 .ConditionFalse ,
153153 Message : err .Error (),
154154 Reason : kvmv1 .ConditionReasonFailed ,
@@ -159,10 +159,10 @@ func (r *EvictionReconciler) handlePreflight(ctx context.Context, eviction *kvmv
159159 // so we are good to go
160160 msg := "eviction completed successfully due to expected case of no hypervisor"
161161 meta .SetStatusCondition (& eviction .Status .Conditions , metav1.Condition {
162- Type : kvmv1 .ConditionTypeEviction ,
162+ Type : kvmv1 .ConditionTypeEvicting ,
163163 Status : metav1 .ConditionFalse ,
164164 Message : msg ,
165- Reason : kvmv1 .ConditionReasonSuceeded ,
165+ Reason : kvmv1 .ConditionReasonSucceeded ,
166166 })
167167 eviction .Status .OutstandingRamMb = 0
168168 logger .FromContext (ctx ).Info (msg )
@@ -176,7 +176,7 @@ func (r *EvictionReconciler) handlePreflight(ctx context.Context, eviction *kvmv
176176 err = fmt .Errorf ("hypervisor name %q does not match spec %q" , currentHypervisor , hypervisorName )
177177 log .Error (err , "Hypervisor name mismatch" )
178178 meta .SetStatusCondition (& eviction .Status .Conditions , metav1.Condition {
179- Type : kvmv1 .ConditionTypeEviction ,
179+ Type : kvmv1 .ConditionTypeEvicting ,
180180 Status : metav1 .ConditionFalse ,
181181 Message : err .Error (),
182182 Reason : kvmv1 .ConditionReasonFailed ,
@@ -210,7 +210,7 @@ func (r *EvictionReconciler) handlePreflight(ctx context.Context, eviction *kvmv
210210 Type : kvmv1 .ConditionTypePreflight ,
211211 Status : metav1 .ConditionTrue ,
212212 Message : "Preflight checks passed, hypervisor is disabled and ready for eviction" ,
213- Reason : kvmv1 .ConditionReasonSuceeded ,
213+ Reason : kvmv1 .ConditionReasonSucceeded ,
214214 })
215215 return ctrl.Result {}, r .Status ().Update (ctx , eviction )
216216}
@@ -231,7 +231,7 @@ func (r *EvictionReconciler) evictNext(ctx context.Context, eviction *kvmv1.Evic
231231 Type : kvmv1 .ConditionTypeMigration ,
232232 Status : metav1 .ConditionFalse ,
233233 Message : fmt .Sprintf ("Instance %s is gone" , uuid ),
234- Reason : kvmv1 .ConditionReasonSuceeded ,
234+ Reason : kvmv1 .ConditionReasonSucceeded ,
235235 })
236236 return ctrl.Result {}, r .Status ().Update (ctx , eviction )
237237 }
@@ -272,7 +272,7 @@ func (r *EvictionReconciler) evictNext(ctx context.Context, eviction *kvmv1.Evic
272272 Type : kvmv1 .ConditionTypeMigration ,
273273 Status : metav1 .ConditionFalse ,
274274 Message : fmt .Sprintf ("Migration of instance %s finished" , vm .ID ),
275- Reason : kvmv1 .ConditionReasonSuceeded ,
275+ Reason : kvmv1 .ConditionReasonSucceeded ,
276276 })
277277
278278 // So, it is already off this one, do we need to verify it?
@@ -381,7 +381,7 @@ func (r *EvictionReconciler) enableHypervisorService(ctx context.Context, evicti
381381 Type : kvmv1 .ConditionTypeHypervisorReEnabled ,
382382 Status : metav1 .ConditionTrue ,
383383 Message : "Hypervisor is gone, no need to re-enable" ,
384- Reason : kvmv1 .ConditionReasonSuceeded ,
384+ Reason : kvmv1 .ConditionReasonSucceeded ,
385385 })
386386 } else {
387387 // update the condition to reflect the error, but do not fail the reconciliation
@@ -401,7 +401,7 @@ func (r *EvictionReconciler) enableHypervisorService(ctx context.Context, evicti
401401 Status : metav1 .ConditionTrue ,
402402 Message : fmt .Sprintf ("Hypervisor already re-enabled for reason: %s" ,
403403 hypervisor .Service .DisabledReason ),
404- Reason : kvmv1 .ConditionReasonSuceeded ,
404+ Reason : kvmv1 .ConditionReasonSucceeded ,
405405 })
406406 return r .Status ().Update (ctx , eviction )
407407 }
@@ -422,7 +422,7 @@ func (r *EvictionReconciler) enableHypervisorService(ctx context.Context, evicti
422422 Type : kvmv1 .ConditionTypeHypervisorReEnabled ,
423423 Status : metav1 .ConditionTrue ,
424424 Message : "Hypervisor re-enabled successfully" ,
425- Reason : kvmv1 .ConditionReasonSuceeded ,
425+ Reason : kvmv1 .ConditionReasonSucceeded ,
426426 })
427427 }
428428 return r .Status ().Update (ctx , eviction )
@@ -440,7 +440,7 @@ func (r *EvictionReconciler) disableHypervisor(ctx context.Context, hypervisor *
440440 Type : kvmv1 .ConditionTypeHypervisorDisabled ,
441441 Status : metav1 .ConditionTrue ,
442442 Message : fmt .Sprintf ("Hypervisor already disabled for reason %q" , disabledReason ),
443- Reason : kvmv1 .ConditionReasonSuceeded ,
443+ Reason : kvmv1 .ConditionReasonSucceeded ,
444444 })
445445 return r .Status ().Update (ctx , eviction )
446446 }
@@ -470,7 +470,7 @@ func (r *EvictionReconciler) disableHypervisor(ctx context.Context, hypervisor *
470470 Type : kvmv1 .ConditionTypeHypervisorDisabled ,
471471 Status : metav1 .ConditionTrue ,
472472 Message : "Hypervisor disabled successfully" ,
473- Reason : kvmv1 .ConditionReasonSuceeded ,
473+ Reason : kvmv1 .ConditionReasonSucceeded ,
474474 })
475475 return r .Status ().Update (ctx , eviction )
476476}
@@ -511,7 +511,7 @@ func (r *EvictionReconciler) coldMigrate(ctx context.Context, uuid string, evict
511511func (r * EvictionReconciler ) addCondition (ctx context.Context , eviction * kvmv1.Eviction ,
512512 status metav1.ConditionStatus , message string , reason string ) bool {
513513 if ! meta .SetStatusCondition (& eviction .Status .Conditions , metav1.Condition {
514- Type : kvmv1 .ConditionTypeEviction ,
514+ Type : kvmv1 .ConditionTypeEvicting ,
515515 Status : status ,
516516 Message : message ,
517517 Reason : reason ,
0 commit comments