@@ -210,6 +210,7 @@ func (r *AppWrapperReconciler) Reconcile(ctx context.Context, req ctrl.Request)
210
210
211
211
case awv1beta2 .AppWrapperResuming : // deploying components
212
212
if aw .Spec .Suspend {
213
+ r .Recorder .Event (aw , v1 .EventTypeNormal , string (awv1beta2 .AppWrapperSuspending ), "Externally suspended while in the Resuming phase" )
213
214
return ctrl.Result {}, r .transitionToPhase (ctx , copyForStatusPatch (aw ), aw , awv1beta2 .AppWrapperSuspending ) // abort deployment
214
215
}
215
216
err , fatal := r .createComponents (ctx , aw ) // NOTE: createComponents applies patches to aw.Status incrementally as resources are created
@@ -242,6 +243,7 @@ func (r *AppWrapperReconciler) Reconcile(ctx context.Context, req ctrl.Request)
242
243
case awv1beta2 .AppWrapperRunning : // components deployed
243
244
orig := copyForStatusPatch (aw )
244
245
if aw .Spec .Suspend {
246
+ r .Recorder .Event (aw , v1 .EventTypeNormal , string (awv1beta2 .AppWrapperSuspending ), "Externally suspended while in the Running phase" )
245
247
return ctrl.Result {}, r .transitionToPhase (ctx , orig , aw , awv1beta2 .AppWrapperSuspending ) // begin undeployment
246
248
}
247
249
@@ -397,6 +399,7 @@ func (r *AppWrapperReconciler) Reconcile(ctx context.Context, req ctrl.Request)
397
399
case awv1beta2 .AppWrapperResetting :
398
400
orig := copyForStatusPatch (aw )
399
401
if aw .Spec .Suspend {
402
+ r .Recorder .Event (aw , v1 .EventTypeNormal , string (awv1beta2 .AppWrapperSuspending ), "Externally suspended while in the Resetting phase" )
400
403
return ctrl.Result {}, r .transitionToPhase (ctx , orig , aw , awv1beta2 .AppWrapperSuspending ) // Suspending trumps Resetting
401
404
}
402
405
0 commit comments