k3s/cmd
Kubernetes Submit Queue 915b772f9b Merge pull request #50933 from mattmoyer/bootstrap-token-groups
Automatic merge from submit-queue (batch tested with PRs 49861, 50933, 51380, 50688, 51305)

Add configurable groups to bootstrap tokens.

**What this PR does / why we need it**:
This change adds support for authenticating bootstrap tokens into a configurable set of extra groups in addition to `system:bootstrappers`. Previously, bootstrap tokens could only ever authenticate to the `system:bootstrappers` group.

Groups are specified as a comma-separated list in the `auth-extra-groups` key of the `bootstrap.kubernetes.io/token` Secret, and must begin with the prefix `system:bootstrapper:` (and match a validation regex that checks against our normal convention). Whether or not any extra groups are configured, `system:bootstrappers` will still be added.

This also adds a `--groups` flag for `kubeadm token create`, which sets the `auth-extra-groups` key on the resulting Secret. The default is to not set the key.

`kubeadm token list` is also updated to include a `EXTRA GROUPS` output column.

**Which issue this PR fixes**: fixes #49306

**Special notes for your reviewer**: 
The use case for this is in https://github.com/kubernetes/kubernetes/issues/49306. Comments on the feature itself are probably better over there. It will be part of how HA/self-hosting kubeadm bootstraps new master nodes (post 1.8).

**Release note**:
```release-note
Add support for configurable groups for bootstrap token authentication.
```

cc @luxas @kubernetes/sig-cluster-lifecycle-api-reviews @kubernetes/sig-auth-api-reviews 

/kind feature
2017-08-27 22:20:48 -07:00
..
clicheck Use buildozer to delete licenses() rules except under third_party/ 2017-08-11 09:32:39 -07:00
cloud-controller-manager modify an little gammer error. 2017-08-25 23:16:05 +08:00
gendocs Use buildozer to delete licenses() rules except under third_party/ 2017-08-11 09:32:39 -07:00
genkubedocs Use buildozer to delete licenses() rules except under third_party/ 2017-08-11 09:32:39 -07:00
genman Use buildozer to delete licenses() rules except under third_party/ 2017-08-11 09:32:39 -07:00
genswaggertypedocs Use buildozer to delete licenses() rules except under third_party/ 2017-08-11 09:32:39 -07:00
genutils Use buildozer to delete licenses() rules except under third_party/ 2017-08-11 09:32:39 -07:00
genyaml Use buildozer to delete licenses() rules except under third_party/ 2017-08-11 09:32:39 -07:00
gke-certificates-controller Use buildozer to delete licenses() rules except under third_party/ 2017-08-11 09:32:39 -07:00
hyperkube apiservers: add synchronous shutdown mechanism on SIGTERM+INT 2017-08-15 09:17:18 +02:00
importverifier Use buildozer to delete licenses() rules except under third_party/ 2017-08-11 09:32:39 -07:00
kube-apiserver Merge pull request #50971 from CaoShuFeng/audit_json 2017-08-25 14:01:33 -07:00
kube-controller-manager Support iscsi volume attach and detach 2017-08-26 17:23:47 -04:00
kube-proxy Use buildozer to delete licenses() rules except under third_party/ 2017-08-11 09:32:39 -07:00
kubeadm Merge pull request #50933 from mattmoyer/bootstrap-token-groups 2017-08-27 22:20:48 -07:00
kubectl Use `select` to disable building static binaries if `--cpu=darwin`. 2017-08-14 09:56:05 -07:00
kubelet Merge pull request #50031 from verult/ConnectedProbe 2017-08-26 02:05:34 -07:00
kubemark Use buildozer to delete licenses() rules except under third_party/ 2017-08-11 09:32:39 -07:00
linkcheck Use buildozer to delete licenses() rules except under third_party/ 2017-08-11 09:32:39 -07:00
BUILD Remove seemingly obsolete binaries 2017-08-18 21:01:19 -07:00
OWNERS Updated top level owners file to match new format 2017-01-19 11:29:16 -08:00