Commit 36562db3 authored by fabriziopandini's avatar fabriziopandini

fix kubeadm token create error

parent 108ee220
...@@ -213,8 +213,7 @@ func RunCreateToken(out io.Writer, client clientset.Interface, token string, tok ...@@ -213,8 +213,7 @@ func RunCreateToken(out io.Writer, client clientset.Interface, token string, tok
} }
// adding groups only makes sense for authentication // adding groups only makes sense for authentication
var usagesSet sets.String usagesSet := sets.NewString(usages...)
usagesSet.Insert(usages...)
if len(extraGroups) > 0 && !usagesSet.Has("authentication") { if len(extraGroups) > 0 && !usagesSet.Has("authentication") {
return fmt.Errorf("--groups cannot be specified unless --usages includes \"authentication\"") return fmt.Errorf("--groups cannot be specified unless --usages includes \"authentication\"")
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment