mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-10 12:32:03 +00:00
Merge pull request #121767 from mtaufen/noderestriction-comment
Add comment in noderestriction on Node-bound-tokens
This commit is contained in:
commit
06d559018c
@ -577,6 +577,12 @@ func (p *Plugin) admitServiceAccount(nodeName string, a admission.Attributes) er
|
||||
return admission.NewForbidden(a, fmt.Errorf("node requested token bound to a pod scheduled on a different node"))
|
||||
}
|
||||
|
||||
// Note: A token may only be bound to one object at a time. By requiring
|
||||
// the Pod binding, noderestriction eliminates the opportunity to spoof
|
||||
// a Node binding. Instead, kube-apiserver automatically infers and sets
|
||||
// the Node binding when it receives a Pod binding. See:
|
||||
// https://github.com/kubernetes/kubernetes/issues/121723 for more info.
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user