From fc4809c553de0be7f7e88e4c0f307883c5505604 Mon Sep 17 00:00:00 2001 From: Menna Date: Wed, 17 Jun 2020 23:54:09 +0200 Subject: [PATCH] add comment on skipWaitForDeleteTimeout and update README.md --- README.md | 5 +++-- pkg/upgrade/job/job.go | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 45ca5772..414acdc5 100644 --- a/README.md +++ b/README.md @@ -129,9 +129,10 @@ spec: # deleteLocalData: true # default # ignoreDaemonSets: true # default force: true - #disableEviction: false #default + #disableEviction: false # default #disableEviction flag option is only available in kubectl v1.18 or later, to force drain pods with pod disruption budget. - + #skipWaitForDeleteTimeout : 0 # default + #skipWaitForDeleteTimeout flag option is only available in kubectl v1.18 or later, If pod DeletionTimestamp older than N seconds, skip waiting for the pod. Seconds must be greater than 0 to skip. # If `drain` is specified, the value for `cordon` is ignored. # If neither `drain` nor `cordon` are specified and the node is marked as `schedulable=false` it will not be marked as `schedulable=true` when the apply job completes. diff --git a/pkg/upgrade/job/job.go b/pkg/upgrade/job/job.go index eb634754..0fd1ed64 100644 --- a/pkg/upgrade/job/job.go +++ b/pkg/upgrade/job/job.go @@ -234,6 +234,7 @@ func New(plan *upgradeapiv1.Plan, nodeName, controllerName string) *batchv1.Job args = append(args, "--disable-eviction=true") } if drain.SkipWaitForDeleteTimeout > 0 { + //only available in kubectl version 1.18 or later args = append(args, "--skip-wait-for-delete-timeout", string(drain.SkipWaitForDeleteTimeout)) }