File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -511,7 +511,13 @@ func (r *DisruptionReconciler) manageInstanceSelectorCache(instance *chaosv1beta
511511
512512 // start the cache with a cancelable context and duration, and attach it to the controller as a watch source
513513 ch := make (chan error )
514- cacheCtx , cacheCancelFunc := context .WithTimeout (context .Background (), instance .Spec .Duration .Duration ()+ * r .ExpiredDisruptionGCDelay * 2 )
514+ deletionDelay := time .Minute * 2
515+
516+ if r .ExpiredDisruptionGCDelay != nil {
517+ deletionDelay = * r .ExpiredDisruptionGCDelay * 2
518+ }
519+
520+ cacheCtx , cacheCancelFunc := context .WithTimeout (context .Background (), instance .Spec .Duration .Duration ()+ deletionDelay )
515521
516522 go func () { ch <- cache .Start (cacheCtx ) }()
517523
You can’t perform that action at this time.
0 commit comments