Merge pull request #52597 from smarterclayton/roundtrip_options

Automatic merge from submit-queue (batch tested with PRs 52485, 52443, 52597, 52450, 51971). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

Some kubelet flags do not accept their default values

Correct the flags and add a round trip test that ensure these do not
break again in the future.

@deads2k as observed when we tried to turn flags into args.
This commit is contained in:
Kubernetes Submit Queue
2017-09-23 18:48:55 -07:00
committed by GitHub
5 changed files with 166 additions and 3 deletions

View File

@@ -76,6 +76,10 @@ type taintsVar struct {
}
func (t taintsVar) Set(s string) error {
if len(s) == 0 {
*t.ptr = nil
return nil
}
sts := strings.Split(s, ",")
var taints []api.Taint
for _, st := range sts {
@@ -91,7 +95,7 @@ func (t taintsVar) Set(s string) error {
func (t taintsVar) String() string {
if len(*t.ptr) == 0 {
return "<nil>"
return ""
}
var taints []string
for _, taint := range *t.ptr {