@@ -322,7 +322,7 @@ func (r *AppWrapperReconciler) Reconcile(ctx context.Context, req ctrl.Request)
322322
323323 // Pause before transitioning to Resuming to heuristically allow transient system problems to subside
324324 whenReset := meta .FindStatusCondition (aw .Status .Conditions , string (workloadv1beta2 .Unhealthy )).LastTransitionTime
325- pauseDuration := r .resettingPauseDuration (ctx , aw )
325+ pauseDuration := r .retryPauseDuration (ctx , aw )
326326 now := time .Now ()
327327 deadline := whenReset .Add (pauseDuration )
328328 if now .Before (deadline ) {
@@ -342,14 +342,14 @@ func (r *AppWrapperReconciler) Reconcile(ctx context.Context, req ctrl.Request)
342342 // When an appwrapper is annotated with a non-zero debugging delay,
343343 // we hold quota for the delay period and do not delete the resources of
344344 // a failed appwrapper unless Kueue preempts it by setting Suspend to true.
345- deletionDelay := r .debuggingFailureDeletionDelay (ctx , aw )
345+ deletionDelay := r .deletionOnFailureGraceDuration (ctx , aw )
346346
347347 if deletionDelay > 0 && ! aw .Spec .Suspend {
348348 meta .SetStatusCondition (& aw .Status .Conditions , metav1.Condition {
349349 Type : string (workloadv1beta2 .DeletingResources ),
350350 Status : metav1 .ConditionFalse ,
351351 Reason : "DeletionPaused" ,
352- Message : fmt .Sprintf ("%v has value %v" , workloadv1beta2 .DebuggingFailureDeletionDelayDurationAnnotation , deletionDelay ),
352+ Message : fmt .Sprintf ("%v has value %v" , workloadv1beta2 .DeletionOnFailureGracePeriodAnnotation , deletionDelay ),
353353 })
354354 whenDelayed := meta .FindStatusCondition (aw .Status .Conditions , string (workloadv1beta2 .DeletingResources )).LastTransitionTime
355355
@@ -457,8 +457,8 @@ func (r *AppWrapperReconciler) workloadStatus(ctx context.Context, aw *workloadv
457457func (r * AppWrapperReconciler ) limitDuration (desired time.Duration ) time.Duration {
458458 if desired < 0 {
459459 return 0 * time .Second
460- } else if desired > r .Config .FaultTolerance .GracePeriodCeiling {
461- return r .Config .FaultTolerance .GracePeriodCeiling
460+ } else if desired > r .Config .FaultTolerance .GracePeriodMaximum {
461+ return r .Config .FaultTolerance .GracePeriodMaximum
462462 } else {
463463 return desired
464464 }
@@ -469,7 +469,7 @@ func (r *AppWrapperReconciler) admissionGraceDuration(ctx context.Context, aw *w
469469 if duration , err := time .ParseDuration (userPeriod ); err == nil {
470470 return r .limitDuration (duration )
471471 } else {
472- log .FromContext (ctx ).Info ("Malformed warmup period annotation" , "annotation" , userPeriod , "error" , err )
472+ log .FromContext (ctx ).Info ("Malformed admission grace period annotation" , "annotation" , userPeriod , "error" , err )
473473 }
474474 }
475475 return r .limitDuration (r .Config .FaultTolerance .AdmissionGracePeriod )
@@ -480,7 +480,7 @@ func (r *AppWrapperReconciler) warmupGraceDuration(ctx context.Context, aw *work
480480 if duration , err := time .ParseDuration (userPeriod ); err == nil {
481481 return r .limitDuration (duration )
482482 } else {
483- log .FromContext (ctx ).Info ("Malformed warmup period annotation" , "annotation" , userPeriod , "error" , err )
483+ log .FromContext (ctx ).Info ("Malformed warmup grace period annotation" , "annotation" , userPeriod , "error" , err )
484484 }
485485 }
486486 return r .limitDuration (r .Config .FaultTolerance .WarmupGracePeriod )
@@ -508,50 +508,50 @@ func (r *AppWrapperReconciler) retryLimit(ctx context.Context, aw *workloadv1bet
508508 return r .Config .FaultTolerance .RetryLimit
509509}
510510
511- func (r * AppWrapperReconciler ) resettingPauseDuration (ctx context.Context , aw * workloadv1beta2.AppWrapper ) time.Duration {
512- if userPeriod , ok := aw .Annotations [workloadv1beta2 .ResetPauseDurationAnnotation ]; ok {
511+ func (r * AppWrapperReconciler ) retryPauseDuration (ctx context.Context , aw * workloadv1beta2.AppWrapper ) time.Duration {
512+ if userPeriod , ok := aw .Annotations [workloadv1beta2 .RetryPausePeriodDurationAnnotation ]; ok {
513513 if duration , err := time .ParseDuration (userPeriod ); err == nil {
514514 return r .limitDuration (duration )
515515 } else {
516- log .FromContext (ctx ).Info ("Malformed reset pause annotation" , "annotation" , userPeriod , "error" , err )
516+ log .FromContext (ctx ).Info ("Malformed retry pause annotation" , "annotation" , userPeriod , "error" , err )
517517 }
518518 }
519- return r .limitDuration (r .Config .FaultTolerance .ResetPause )
519+ return r .limitDuration (r .Config .FaultTolerance .RetryPausePeriod )
520520}
521521
522- func (r * AppWrapperReconciler ) deletionGraceDuration (ctx context.Context , aw * workloadv1beta2.AppWrapper ) time.Duration {
523- if userPeriod , ok := aw .Annotations [workloadv1beta2 .DeletionGracePeriodAnnotation ]; ok {
522+ func (r * AppWrapperReconciler ) forcefulDeletionGraceDuration (ctx context.Context , aw * workloadv1beta2.AppWrapper ) time.Duration {
523+ if userPeriod , ok := aw .Annotations [workloadv1beta2 .ForcefulDeletionGracePeriodAnnotation ]; ok {
524524 if duration , err := time .ParseDuration (userPeriod ); err == nil {
525525 return r .limitDuration (duration )
526526 } else {
527- log .FromContext (ctx ).Info ("Malformed deletion period annotation" , "annotation" , userPeriod , "error" , err )
527+ log .FromContext (ctx ).Info ("Malformed forceful deletion period annotation" , "annotation" , userPeriod , "error" , err )
528528 }
529529 }
530- return r .limitDuration (r .Config .FaultTolerance .DeletionGracePeriod )
530+ return r .limitDuration (r .Config .FaultTolerance .ForcefulDeletionGracePeriod )
531531}
532532
533- func (r * AppWrapperReconciler ) debuggingFailureDeletionDelay (ctx context.Context , aw * workloadv1beta2.AppWrapper ) time.Duration {
534- if userPeriod , ok := aw .Annotations [workloadv1beta2 .DebuggingFailureDeletionDelayDurationAnnotation ]; ok {
533+ func (r * AppWrapperReconciler ) deletionOnFailureGraceDuration (ctx context.Context , aw * workloadv1beta2.AppWrapper ) time.Duration {
534+ if userPeriod , ok := aw .Annotations [workloadv1beta2 .DeletionOnFailureGracePeriodAnnotation ]; ok {
535535 if duration , err := time .ParseDuration (userPeriod ); err == nil {
536536 return r .limitDuration (duration )
537537 } else {
538- log .FromContext (ctx ).Info ("Malformed delay deletion annotation" , "annotation" , userPeriod , "error" , err )
538+ log .FromContext (ctx ).Info ("Malformed delection on failue delay annotation" , "annotation" , userPeriod , "error" , err )
539539 }
540540 }
541541 return 0 * time .Second
542542}
543543
544544func (r * AppWrapperReconciler ) timeToLiveAfterSucceededDuration (ctx context.Context , aw * workloadv1beta2.AppWrapper ) time.Duration {
545- if userPeriod , ok := aw .Annotations [workloadv1beta2 .SuccessTTLDurationAnnotation ]; ok {
545+ if userPeriod , ok := aw .Annotations [workloadv1beta2 .SuccessTTLAnnotation ]; ok {
546546 if duration , err := time .ParseDuration (userPeriod ); err == nil {
547- if duration > 0 && duration < r .Config .FaultTolerance .SuccessTTLCeiling {
547+ if duration > 0 && duration < r .Config .FaultTolerance .SuccessTTL {
548548 return duration
549549 }
550550 } else {
551551 log .FromContext (ctx ).Info ("Malformed successTTL annotation" , "annotation" , userPeriod , "error" , err )
552552 }
553553 }
554- return r .Config .FaultTolerance .SuccessTTLCeiling
554+ return r .Config .FaultTolerance .SuccessTTL
555555}
556556
557557func clearCondition (aw * workloadv1beta2.AppWrapper , condition workloadv1beta2.AppWrapperCondition , reason string , message string ) {
0 commit comments