mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-03 19:58:17 +00:00
Merge pull request #52362 from fabriziopandini/kubeadm436
Automatic merge from submit-queue (batch tested with PRs 51601, 52153, 52364, 52362, 52342) fix kubeadm token create error **What this PR does / why we need it**: fix kubeadm token create error **Which issue this PR fixes** [#436](https://github.com/kubernetes/kubeadm/issues/436) **Special notes for your reviewer**: CC @luxas
This commit is contained in:
@@ -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\"")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user