fix kubeadm token create error

This commit is contained in:
fabriziopandini 2017-09-12 23:30:14 +02:00
parent 108ee22096
commit 36562db310

View File

@ -213,8 +213,7 @@ func RunCreateToken(out io.Writer, client clientset.Interface, token string, tok
}
// adding groups only makes sense for authentication
var usagesSet sets.String
usagesSet.Insert(usages...)
usagesSet := sets.NewString(usages...)
if len(extraGroups) > 0 && !usagesSet.Has("authentication") {
return fmt.Errorf("--groups cannot be specified unless --usages includes \"authentication\"")
}