mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
fix kubeadm token create error
This commit is contained in:
parent
108ee22096
commit
36562db310
@ -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\"")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user