Skip to content

Commit b438290

Browse files
authored
Fix a bug when computing the rolling restart threshold (#10)
1 parent 4efea4f commit b438290

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/handler/handler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ func (h *Handler) processNode(node v1.Node, rr chan *controllerObject) error {
190190
}
191191

192192
if h.appContext.Config.NamespacePrefixSkipInitialEviction == "" || !strings.HasPrefix(pod.Namespace, h.appContext.Config.NamespacePrefixSkipInitialEviction) {
193-
rrThresholdTime := -h.appContext.Config.ParkedNodeTTL * time.Duration(100-h.appContext.Config.RollingRestartThreshold*100) / 100
193+
rrThresholdTime := h.appContext.Config.ParkedNodeTTL * time.Duration(100-h.appContext.Config.RollingRestartThreshold*100) / 100
194194
if time.Now().UTC().Before(expiresOn.Add(-rrThresholdTime)) {
195195
err := h.evictPod(pod, deleteOptions)
196196
if err != nil {

0 commit comments

Comments
 (0)