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.
This commit is contained in:
Clayton Coleman
2017-09-16 16:19:33 -04:00
parent d48611a1da
commit 748172f94e
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 {