@@ -517,7 +517,8 @@ func (r *KustomizationReconciler) reconcile(
517517 originRevision ,
518518 isNewRevision ,
519519 drifted ,
520- changeSet .ToObjMetadataSet ()); err != nil {
520+ changeSet .ToObjMetadataSet (),
521+ ssautil .ExtractJobsWithTTL (objects )); err != nil {
521522
522523 if errors .Is (err , & runtimeCtrl.QueueEventSource {}) {
523524 return err
@@ -967,7 +968,8 @@ func (r *KustomizationReconciler) checkHealth(ctx context.Context,
967968 originRevision string ,
968969 isNewRevision bool ,
969970 drifted bool ,
970- objects object.ObjMetadataSet ) error {
971+ objects object.ObjMetadataSet ,
972+ jobsWithTTL object.ObjMetadataSet ) error {
971973 if len (obj .Spec .HealthChecks ) == 0 && ! obj .Spec .Wait {
972974 conditions .Delete (obj , meta .HealthyCondition )
973975 return nil
@@ -1012,9 +1014,10 @@ func (r *KustomizationReconciler) checkHealth(ctx context.Context,
10121014 // Check the health with a default timeout of 30sec shorter than the reconciliation interval.
10131015 healthCtx := runtimeCtrl .GetInterruptContext (ctx )
10141016 if err := manager .WaitForSetWithContext (healthCtx , toCheck , ssa.WaitOptions {
1015- Interval : 5 * time .Second ,
1016- Timeout : obj .GetTimeout (),
1017- FailFast : r .FailFast ,
1017+ Interval : 5 * time .Second ,
1018+ Timeout : obj .GetTimeout (),
1019+ FailFast : r .FailFast ,
1020+ JobsWithTTL : jobsWithTTL ,
10181021 }); err != nil {
10191022 if is , err := runtimeCtrl .IsObjectEnqueued (ctx ); is {
10201023 return err
0 commit comments