Skip to content

Commit 2cc43b8

Browse files
authored
fix: removing paused condition as soon as possible (#333)
Signed-off-by: Dario Tranchitella <dario@tranchitella.eu>
1 parent ee8dd9e commit 2cc43b8

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

controllers/kamajicontrolplane_controller.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,8 @@ func (r *KamajiControlPlaneReconciler) Reconcile(ctx context.Context, req ctrl.R
129129
// Extracting conditions, used to update the KamajiControlPlane ones upon the end of the reconciliation.
130130
conditions := kcp.Status.Conditions
131131

132+
meta.RemoveStatusCondition(&conditions, string(kcpv1alpha2.PausedConditionType))
133+
132134
defer func() {
133135
deferErr := r.updateKamajiControlPlaneStatus(ctx, &kcp, func() {
134136
kcp.Status.Conditions = conditions
@@ -363,8 +365,6 @@ func (r *KamajiControlPlaneReconciler) Reconcile(ctx context.Context, req ctrl.R
363365
ObservedGeneration: kcp.Generation,
364366
})
365367

366-
meta.RemoveStatusCondition(&conditions, string(kcpv1alpha2.PausedConditionType))
367-
368368
if err != nil {
369369
if errors.Is(err, ErrEnqueueBack) {
370370
log.Info(err.Error())

0 commit comments

Comments
 (0)