Skip to content

Commit

Permalink
Merge pull request #29388 from kinarashah/25rc
Browse files Browse the repository at this point in the history
[release/v2.5] set default value for ignoreDaemonSets
  • Loading branch information
kinarashah committed Oct 6, 2020
2 parents 72d1332 + a9ae128 commit 65f3525
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -236,11 +236,17 @@ func (d *nodeDrain) getKubeConfig() (*clientcmdapi.Config, error) {
}

func getFlags(input *v32.NodeDrainInput) []string {
var ignoreDaemonSets bool
if input.IgnoreDaemonSets == nil {
ignoreDaemonSets = true
} else {
ignoreDaemonSets = *input.IgnoreDaemonSets
}
return []string{
fmt.Sprintf("--delete-local-data=%v", input.DeleteLocalData),
fmt.Sprintf("--force=%v", input.Force),
fmt.Sprintf("--grace-period=%v", input.GracePeriod),
fmt.Sprintf("--ignore-daemonsets=%v", *input.IgnoreDaemonSets),
fmt.Sprintf("--ignore-daemonsets=%v", ignoreDaemonSets),
fmt.Sprintf("--timeout=%s", convert.ToString(input.Timeout)+"s")}
}

Expand Down

0 comments on commit 65f3525

Please sign in to comment.