Skip to content

Commit 4c8cba3

Browse files
authored
fix: missing status update in code branch (#14)
1 parent 90eb2bd commit 4c8cba3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

internal/controller/compositionreference_controller.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -154,13 +154,15 @@ func (e *external) Observe(ctx context.Context, mg resource.Managed) (reconciler
154154
ResourceUpToDate: false,
155155
}, nil
156156
} else {
157+
cr.SetConditions(prv1.Available())
157158
if time.Since(timeSinceLastUpdate) > e.pollInterval {
158159
return reconciler.ExternalObservation{
159160
ResourceExists: true,
160161
ResourceUpToDate: false,
161162
}, nil
162163
}
163164
}
165+
164166
cr.SetConditions(prv1.Available())
165167
return reconciler.ExternalObservation{
166168
ResourceExists: true,
@@ -216,7 +218,7 @@ func (e *external) Update(ctx context.Context, mg resource.Managed) error {
216218
return fmt.Errorf("error with requested http resource: %w", err)
217219
}
218220

219-
e.rec.Eventf(cr, corev1.EventTypeNormal, "Completed updated", "UID '%s'", uid)
221+
e.rec.Eventf(cr, corev1.EventTypeNormal, "Completed update", "UID '%s'", uid)
220222
e.sinceLastUpdate[cr.Name+cr.Namespace] = time.Now()
221223
return nil
222224
}

0 commit comments

Comments
 (0)