Skip to content

Commit

Permalink
Comment default behaviour of GracePeriodSeconds
Browse files Browse the repository at this point in the history
It took me a while to spot this subtlety.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
  • Loading branch information
bboreham committed Nov 23, 2020
1 parent 540e41c commit 7c764c8
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions staging/src/k8s.io/kubectl/pkg/drain/drain.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,15 @@ const (

// Helper contains the parameters to control the behaviour of drainer
type Helper struct {
Ctx context.Context
Client kubernetes.Interface
Force bool
GracePeriodSeconds int
Ctx context.Context
Client kubernetes.Interface
Force bool

// GracePeriodSeconds is how long to wait for a pod to terminate.
// IMPORTANT: 0 means "delete immediately"; set to a negative value
// to use the pod's terminationGracePeriodSeconds.
GracePeriodSeconds int

IgnoreAllDaemonSets bool
Timeout time.Duration
DeleteEmptyDirData bool
Expand Down

0 comments on commit 7c764c8

Please sign in to comment.