• Kubernetes Submit Queue's avatar
    Merge pull request #50933 from mattmoyer/bootstrap-token-groups · 915b772f
    Kubernetes Submit Queue authored
    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
    915b772f
Name
Last commit
Last update
..
api Loading commit data...
apimachinery/tests Loading commit data...
apis Loading commit data...
auth Loading commit data...
bootstrap/api Loading commit data...
capabilities Loading commit data...
client Loading commit data...
cloudprovider Loading commit data...
controller Loading commit data...
credentialprovider Loading commit data...
features Loading commit data...
fieldpath Loading commit data...
generated Loading commit data...
hyperkube Loading commit data...
kubeapiserver Loading commit data...
kubectl Loading commit data...
kubelet Loading commit data...
kubemark Loading commit data...
master Loading commit data...
printers Loading commit data...
probe Loading commit data...
proxy Loading commit data...
quota Loading commit data...
registry Loading commit data...
routes Loading commit data...
security Loading commit data...
securitycontext Loading commit data...
serviceaccount Loading commit data...
ssh Loading commit data...
util Loading commit data...
version Loading commit data...
volume Loading commit data...
watch Loading commit data...
BUILD Loading commit data...
OWNERS Loading commit data...