rebase master

This commit is contained in:
boenn
2021-11-25 10:34:43 +08:00
parent aff056d8a1
commit cec2aae1e5
8 changed files with 294 additions and 188 deletions

View File

@@ -442,6 +442,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 }
@@ -501,3 +507,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
}