topologyaware

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CPU            = policy.CPU
	Memory         = policy.Memory
	AmountAbsent   = policy.AmountAbsent
	AmountQuantity = policy.AmountQuantity
	AmountCPUSet   = policy.AmountCPUSet
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Amount

type Amount = policy.Amount

type AmountKind

type AmountKind = policy.AmountKind

type CPUPriority added in v0.5.0

type CPUPriority string
const (
	PriorityHigh   CPUPriority = "high"
	PriorityNormal CPUPriority = "normal"
	PriorityLow    CPUPriority = "low"
	PriorityNone   CPUPriority = "none"
)

func (CPUPriority) Value added in v0.5.0

type Config

type Config struct {
	// PinCPU controls whether the policy pins containers to allocated CPUs.
	// +kubebuilder:default=true
	// +optional
	PinCPU bool `json:"pinCPU,omitempty"`
	// PinMemory controls whether the policy pins containers allocated memory nodes.
	// +kubebuilder:default=true
	// +optional
	PinMemory bool `json:"pinMemory,omitempty"`
	// PreferIsolated controls whether kernel-isolated CPUs are preferred for
	// Guaranteed QoS-class containers that request 1 full CPU.
	// +kubebuilder:default=true
	//+optional
	PreferIsolated bool `json:"preferIsolatedCPUs,omitempty"`
	// PreferShared controls whether exclusive CPU allocation is considered for
	// all eligible containers. If set to trues, exclusive CPU allocation is only
	// considered for eligible containers which are explicitly annotated to opt
	// out from shared allocation.
	// +optional
	PreferShared bool `json:"preferSharedCPUs,omitempty"`
	// ColocatePods controls whether an attempt is made to allocate containers
	// within the same pod close to each other (to the same topology zone).
	// +optional
	ColocatePods bool `json:"colocatePods,omitempty"`
	// ColocateNamespaces controls whether an attempt is made to allocate all
	// containers of pods in a namespace close to each other (to the same topology
	// zone).
	// +optional
	ColocateNamespaces bool `json:"colocateNamespaces,omitempty"`
	// ReservedPoolNamespaces lists extra namespaces which are treated like
	// 'kube-system' (resources allocate from the reserved pool).
	// +optional
	ReservedPoolNamespaces []string `json:"reservedPoolNamespaces,omitempty"`
	// AvailableResources defines the bounding set for the policy to allocate
	// resources from.
	// +optional
	AvailableResources Constraints `json:"availableResources,omitempty"`
	// ReservedResources defines the resources reserved namespaces get assigned
	// to. If AvailableResources is defined, ReservedResources must be a subset
	// of it.
	// +kubebuilder:validation:Required
	ReservedResources Constraints `json:"reservedResources"`
	// DefaultCPUPriority (high, normal, low, none) is the preferred CPU
	// priority for allocated CPUs when a container has not been annotated
	// with any other CPU preference.
	// Notes: Currently this option only affects exclusive CPU allocations.
	// +kubebuilder:validation:Enum=high;normal;low;none
	// +kubebuilder:default=none
	// +kubebuilder:validation:Format:string
	DefaultCPUPriority CPUPriority `json:"defaultCPUPriority,omitempty"`
}

+k8s:deepcopy-gen=true +optional

func (*Config) DeepCopy

func (in *Config) DeepCopy() *Config

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Config.

func (*Config) DeepCopyInto

func (in *Config) DeepCopyInto(out *Config)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Constraints

type Constraints = policy.Constraints

type Domain

type Domain = policy.Domain

Jump to

Keyboard shortcuts

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