Skip to content

Commit 4a41df4

Browse files
committed
docs: clarify condition event object state
1 parent bd596c1 commit 4a41df4

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

controllers/mondooauditconfig_controller.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,8 @@ func (r *MondooAuditConfigReconciler) Reconcile(ctx context.Context, req ctrl.Re
232232

233233
deferFuncErr = mondoo.UpdateMondooAuditStatus(deferCtx, r.Client, mondooAuditConfigCopy, mondooAuditConfig, log)
234234
if deferFuncErr == nil {
235-
// mondooAuditConfigCopy holds the original conditions; mondooAuditConfig was updated in-place.
235+
// mondooAuditConfigCopy holds the original conditions; mondooAuditConfig was updated
236+
// in-place and is used as the event object so the event references the current state.
236237
r.recordConditionEvents(mondooAuditConfig, mondooAuditConfigCopy.Status.Conditions, mondooAuditConfig.Status.Conditions)
237238
}
238239
// do not overwrite errors which happened before the defered function is called

0 commit comments

Comments
 (0)