padder

package
v0.4.11-0rc0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 10, 2022 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const PadderLabel = "nrop-test-pad-pod"

Variables

This section is empty.

Functions

This section is empty.

Types

type Padder

type Padder struct {
	// Client defines the API client to run CRUD operations, that will be used for testing
	Client client.Client
	// contains filtered or unexported fields
}

func New

func New(cli client.Client, ns string) (*Padder, error)

New return new padder object ns is where padding pods will get deployed

func (*Padder) Clean

func (p *Padder) Clean() error

Clean can be called after test finished in order to clean all the padding pod in an easier way

func (*Padder) GetPaddedNodes

func (p *Padder) GetPaddedNodes() []string

func (*Padder) Nodes

func (p *Padder) Nodes(n int) *Padder

Nodes number of nodes to pad

func (*Padder) Pad

func (p *Padder) Pad(timeout time.Duration, options PaddingOptions) error

Pad will create guaranteed pad pods on each NUMA zone in order to align the nodes with the requested amount of available allocationTarget and wait until timeout to see if nodes got updated

func (*Padder) UntilAvailableIsResource

func (p *Padder) UntilAvailableIsResource(resName corev1.ResourceName, quantity string) *Padder

UntilAvailableIsResource will pad pods into nodes until reach the desired available allocationTarget

func (*Padder) UntilAvailableIsResourceList

func (p *Padder) UntilAvailableIsResourceList(resources corev1.ResourceList) *Padder

UntilAvailableIsResourceList is like UntilAvailableIsResource but with a complete ResourceList as a parameter

type PaddingOptions

type PaddingOptions struct {
	// LabelSelector pad nodes with a given label.
	// the number of padded nodes is still limit by padRequest.nNodes value
	LabelSelector labels.Selector
}

PaddingOptions is some configuration that modifies options for a pad request.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL