Skip to content

Commit

Permalink
fix: making sure LastSyncedImageScanTime is a reference
Browse files Browse the repository at this point in the history
  • Loading branch information
cvalerio-va committed Feb 17, 2025
1 parent 61e1770 commit 2da4965
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/cmd/controller/imagescan/gitcommit_job.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,9 @@ func (j *GitCommitJob) cloneAndReplace(ctx context.Context) {
if interval == nil || interval.Seconds() == 0.0 {
interval = &DefaultInterval
}
gitrepo.Status.LastSyncedImageScanTime = metav1.NewTime(time.Now())

now := metav1.NewTime(time.Now())
gitrepo.Status.LastSyncedImageScanTime = &now
// update gitrepo status
condition.Cond(fleet.ImageScanSyncCondition).SetError(&gitrepo.Status, "", nil)
err = retry.RetryOnConflict(retry.DefaultRetry, func() error {
Expand Down

0 comments on commit 2da4965

Please sign in to comment.