Skip to content

Commit

Permalink
more informative events
Browse files Browse the repository at this point in the history
  • Loading branch information
davidkarlsen committed Sep 12, 2023
1 parent 71ce94d commit c222114
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/controller/migration_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ func (r *MigrationReconciler) Reconcile(ctx context.Context, req ctrl.Request) (
if hasSucceeded(existingJob) {
if jobsAreEqual {
logger.Info("Migration succeeded")
r.GetRecorder().Event(migration, corev1.EventTypeNormal, "Succeeded", fmt.Sprintf("Migration Succeeded: %s", req.NamespacedName))
r.GetRecorder().Event(migration, corev1.EventTypeNormal, "Succeeded",
fmt.Sprintf("Migration Succeeded: %s, source: %s", req.NamespacedName, migration.Spec.MigrationSource.ImageRef))
return r.ManageSuccess(ctx, migration)
} else { // migration has changed - submit new job
return r.submitMigrationJob(ctx, migration, newJob)
Expand Down

0 comments on commit c222114

Please sign in to comment.