mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-20 09:33:52 +00:00
Merge pull request #103934 from boenn/tainttoleration
De-duplicate predicate (known as filter now) logic shared in kubelet and scheduler
This commit is contained in:
@@ -443,6 +443,12 @@ func (p *PodWrapper) PreemptionPolicy(policy v1.PreemptionPolicy) *PodWrapper {
|
||||
return p
|
||||
}
|
||||
|
||||
// Overhead sets the give resourcelist to the inner pod
|
||||
func (p *PodWrapper) Overhead(rl v1.ResourceList) *PodWrapper {
|
||||
p.Spec.Overhead = rl
|
||||
return p
|
||||
}
|
||||
|
||||
// NodeWrapper wraps a Node inside.
|
||||
type NodeWrapper struct{ v1.Node }
|
||||
|
||||
@@ -502,3 +508,9 @@ func (n *NodeWrapper) Images(images map[string]int64) *NodeWrapper {
|
||||
n.Status.Images = containerImages
|
||||
return n
|
||||
}
|
||||
|
||||
// Taints applies taints to the inner node.
|
||||
func (n *NodeWrapper) Taints(taints []v1.Taint) *NodeWrapper {
|
||||
n.Spec.Taints = taints
|
||||
return n
|
||||
}
|
||||
|
Reference in New Issue
Block a user