v1alpha1

package
v0.5.14 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2026 License: Apache-2.0 Imports: 6 Imported by: 45

Documentation

Overview

Package v1alpha1 provides alpha API for Katalyst Node API objects.

Index

Constants

View Source
const (
	ResourceNameKatalystCNR = "customnoderesources"
	ResourceNameKatalystNPD = "nodeprofiledescriptors"
)

ResourceNameKatalystCNR is used to construct standard gvr

View Source
const (
	// GroupName is the group name used in this package
	GroupName string = "node.katalyst.kubewharf.io"
)

Variables

View Source
var (
	// SchemeBuilder collects schemas to build.
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	// AddToScheme is used by generated client to add this scheme to the generated client.
	AddToScheme = SchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"}

SchemeGroupVersion is group version used to register these objects

Functions

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type Aggregator added in v0.5.1

type Aggregator string
const (
	AggregatorAvg   Aggregator = "avg"
	AggregatorMax   Aggregator = "max"
	AggregatorMin   Aggregator = "min"
	AggregatorCount Aggregator = "count"
	AggregatorP99   Aggregator = "p99"
	AggregatorP95   Aggregator = "p95"
	AggregatorP90   Aggregator = "p90"
)

type Allocation

type Allocation struct {
	Consumer string `json:"consumer"`
	// +optional
	Requests *v1.ResourceList `json:"requests,omitempty"`
}

func (*Allocation) DeepCopy

func (in *Allocation) DeepCopy() *Allocation

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

func (*Allocation) DeepCopyInto

func (in *Allocation) DeepCopyInto(out *Allocation)

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

type Attribute added in v0.1.2

type Attribute struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

Attribute records the resource-specified info with name-value pairs

func (*Attribute) DeepCopy added in v0.1.2

func (in *Attribute) DeepCopy() *Attribute

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

func (*Attribute) DeepCopyInto added in v0.1.2

func (in *Attribute) DeepCopyInto(out *Attribute)

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

type CNRCondition

type CNRCondition struct {
	// Type is the type of the condition.
	Type CNRConditionType `json:"type"`
	// Status of the condition, one of True, False, Unknown.
	Status v1.ConditionStatus `json:"status" `
	// Last time we got an update on a given condition.
	// +optional
	LastHeartbeatTime metav1.Time `json:"lastHeartbeatTime,omitempty"`
	// (brief) reason for the condition's last transition.
	// +optional
	Reason string `json:"reason,omitempty"`
	// Human-readable message indicating details about last transition.
	// +optional
	Message string `json:"message,omitempty"`
}

CNRCondition contains condition information for a cnr.

func (*CNRCondition) DeepCopy

func (in *CNRCondition) DeepCopy() *CNRCondition

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

func (*CNRCondition) DeepCopyInto

func (in *CNRCondition) DeepCopyInto(out *CNRCondition)

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

type CNRConditionType

type CNRConditionType string
const (
	CNRAgentReady    CNRConditionType = "AgentReady"
	CNRAgentNotFound CNRConditionType = "AgentNotFound"
)

type CustomNodeResource

type CustomNodeResource struct {
	metav1.TypeMeta `json:",inline"`
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Spec defines the behavior of a CustomNodeResource.
	// +optional
	Spec CustomNodeResourceSpec `json:"spec,omitempty"`

	// Status represents the current information about a CustomNodeResource.
	// This data may not be up-to-date.
	// +optional
	Status CustomNodeResourceStatus `json:"status,omitempty"`
}

CustomNodeResource captures information about a custom defined node resource, mainly focus on static attributes and resources CustomNodeResource objects are non-namespaced.

func (*CustomNodeResource) DeepCopy

func (in *CustomNodeResource) DeepCopy() *CustomNodeResource

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

func (*CustomNodeResource) DeepCopyInto

func (in *CustomNodeResource) DeepCopyInto(out *CustomNodeResource)

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

func (*CustomNodeResource) DeepCopyObject

func (in *CustomNodeResource) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type CustomNodeResourceList

type CustomNodeResourceList struct {
	metav1.TypeMeta `json:",inline"`

	// Standard list metadata
	// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
	// +optional
	metav1.ListMeta `json:"metadata,omitempty"`

	// items is the list of CNRs
	Items []CustomNodeResource `json:"items"`
}

CustomNodeResourceList is a collection of CustomNodeResource objects.

func (*CustomNodeResourceList) DeepCopy

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

func (*CustomNodeResourceList) DeepCopyInto

func (in *CustomNodeResourceList) DeepCopyInto(out *CustomNodeResourceList)

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

func (*CustomNodeResourceList) DeepCopyObject

func (in *CustomNodeResourceList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type CustomNodeResourceSpec

type CustomNodeResourceSpec struct {
	// +optional
	NodeResourceProperties []*Property `json:"nodeResourceProperties,omitempty"`

	// Taints customized taint for katalyst, which affect pod scheduling
	// based on their QoS levels and the specified taint's QoS level.
	// +optional
	Taints []Taint `json:"taints,omitempty"`
}

func (*CustomNodeResourceSpec) DeepCopy

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

func (*CustomNodeResourceSpec) DeepCopyInto

func (in *CustomNodeResourceSpec) DeepCopyInto(out *CustomNodeResourceSpec)

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

type CustomNodeResourceStatus

type CustomNodeResourceStatus struct {
	// Resources defines the numeric quantities in this node; for instance reclaimed resources for this node
	// +optional
	Resources Resources `json:"resources"`

	// +optional
	TopologyZone []*TopologyZone `json:"topologyZone,omitempty"`

	// TopologyPolicy indicates placement policy for scheduler or other centralized components to follow.
	// this policy (including topology scope) is defined in topology-manager, katalyst is
	// responsible to parse the policy, and transform to TopologyPolicy here.
	// +kubebuilder:default:=none
	TopologyPolicy TopologyPolicy `json:"topologyPolicy"`

	// Conditions is an array of current observed cnr conditions.
	// +optional
	Conditions []CNRCondition `json:"conditions,omitempty"`

	// NodeMetricStatus report node real-time metrics
	// +optional
	NodeMetricStatus *NodeMetricStatus `json:"nodeMetricStatus,omitempty"`
}

func (*CustomNodeResourceStatus) DeepCopy

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

func (*CustomNodeResourceStatus) DeepCopyInto

func (in *CustomNodeResourceStatus) DeepCopyInto(out *CustomNodeResourceStatus)

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

type GroupMetricInfo added in v0.5.0

type GroupMetricInfo struct {
	// +kubebuilder:validation:Enum=reclaimed_cores;shared_cores;dedicated_cores;system_cores
	QoSLevel      string `json:"QoSLevel"`
	ResourceUsage `json:",inline"`
	// PodList indicates the pods belongs to this qos group, in format of {namespace}/{name}.
	// Pods that have been scheduled but are not listed in the PodList need to be estimated by the scheduler.
	PodList []string `json:"podList,omitempty"`
}

func (*GroupMetricInfo) DeepCopy added in v0.5.0

func (in *GroupMetricInfo) DeepCopy() *GroupMetricInfo

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

func (*GroupMetricInfo) DeepCopyInto added in v0.5.0

func (in *GroupMetricInfo) DeepCopyInto(out *GroupMetricInfo)

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

type MetricValue added in v0.5.1

type MetricValue struct {
	// the name of the metric
	// +optional
	MetricName string `json:"metricName,omitempty"`

	// a set of labels that identify a single time series for the metric
	// +optional
	MetricLabels map[string]string `json:"metricLabels,omitempty"`

	// indicates the time at which the metrics were produced
	// +optional
	Timestamp metav1.Time `json:"timestamp,omitempty"`

	// the aggregator of the metric
	// +optional
	Aggregator *Aggregator `json:"aggregator,omitempty"`

	// indicates the window ([Timestamp-Window, Timestamp]) from
	// which these metrics were calculated, when returning rate
	// metrics calculated from cumulative metrics (or zero for
	// non-calculated instantaneous metrics).
	// +optional
	Window *metav1.Duration `json:"window,omitempty"`

	// the value of the metric
	// +optional
	Value resource.Quantity `json:"value,omitempty"`
}

func (*MetricValue) DeepCopy added in v0.5.1

func (in *MetricValue) DeepCopy() *MetricValue

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

func (*MetricValue) DeepCopyInto added in v0.5.1

func (in *MetricValue) DeepCopyInto(out *MetricValue)

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

type NUMAMetricInfo added in v0.5.0

type NUMAMetricInfo struct {
	NUMAId int `json:"numaId"`
	// Usage contains the real-time resource usage for this NUMA node
	Usage v1.ResourceList `json:"usage"`
}

func (*NUMAMetricInfo) DeepCopy added in v0.5.0

func (in *NUMAMetricInfo) DeepCopy() *NUMAMetricInfo

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

func (*NUMAMetricInfo) DeepCopyInto added in v0.5.0

func (in *NUMAMetricInfo) DeepCopyInto(out *NUMAMetricInfo)

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

type NodeMetricInfo added in v0.5.0

type NodeMetricInfo struct {
	ResourceUsage `json:",inline"`
}

func (*NodeMetricInfo) DeepCopy added in v0.5.0

func (in *NodeMetricInfo) DeepCopy() *NodeMetricInfo

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

func (*NodeMetricInfo) DeepCopyInto added in v0.5.0

func (in *NodeMetricInfo) DeepCopyInto(out *NodeMetricInfo)

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

type NodeMetricStatus added in v0.5.0

type NodeMetricStatus struct {
	// UpdateTime is the last time this NodeMetricStatus was updated.
	UpdateTime metav1.Time `json:"updateTime"`

	// NodeMetric contains the metrics for this node.
	NodeMetric *NodeMetricInfo `json:"nodeMetric,omitempty"`

	// GroupMetric contains the metrics aggregated by QoS level groups
	GroupMetric []GroupMetricInfo `json:"groupMetric,omitempty"`
}

NodeMetricStatus defines the observed state of NodeMetric

func (*NodeMetricStatus) DeepCopy added in v0.5.0

func (in *NodeMetricStatus) DeepCopy() *NodeMetricStatus

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

func (*NodeMetricStatus) DeepCopyInto added in v0.5.0

func (in *NodeMetricStatus) DeepCopyInto(out *NodeMetricStatus)

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

type NodeProfileDescriptor added in v0.5.1

type NodeProfileDescriptor struct {
	metav1.TypeMeta `json:",inline"`
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Spec defines the behavior of a NodeProfileDescriptor.
	// +optional
	Spec NodeProfileDescriptorSpec `json:"spec,omitempty"`

	// Status represents the current information about a NodeProfileDescriptor.
	// This data may not be up-to-date.
	// +optional
	Status NodeProfileDescriptorStatus `json:"status,omitempty"`
}

NodeProfileDescriptor captures information about node, such as node-related metrics NodeProfileDescriptor objects are non-namespaced.

func (*NodeProfileDescriptor) DeepCopy added in v0.5.1

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

func (*NodeProfileDescriptor) DeepCopyInto added in v0.5.1

func (in *NodeProfileDescriptor) DeepCopyInto(out *NodeProfileDescriptor)

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

func (*NodeProfileDescriptor) DeepCopyObject added in v0.5.1

func (in *NodeProfileDescriptor) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type NodeProfileDescriptorList added in v0.5.1

type NodeProfileDescriptorList struct {
	metav1.TypeMeta `json:",inline"`

	// Standard list metadata
	// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
	// +optional
	metav1.ListMeta `json:"metadata,omitempty"`

	// items is the list of CNRs
	Items []NodeProfileDescriptor `json:"items"`
}

NodeProfileDescriptorList is a collection of NodeProfileDescriptor objects.

func (*NodeProfileDescriptorList) DeepCopy added in v0.5.1

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

func (*NodeProfileDescriptorList) DeepCopyInto added in v0.5.1

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

func (*NodeProfileDescriptorList) DeepCopyObject added in v0.5.1

func (in *NodeProfileDescriptorList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type NodeProfileDescriptorSpec added in v0.5.1

type NodeProfileDescriptorSpec struct {
}

func (*NodeProfileDescriptorSpec) DeepCopy added in v0.5.1

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

func (*NodeProfileDescriptorSpec) DeepCopyInto added in v0.5.1

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

type NodeProfileDescriptorStatus added in v0.5.1

type NodeProfileDescriptorStatus struct {
	// NodeMetrics contains the node-related metrics
	// +optional
	NodeMetrics []ScopedNodeMetrics `json:"nodeMetrics,omitempty"`

	// PodMetrics contains the pod-related metrics
	// +optional
	PodMetrics []ScopedPodMetrics `json:"podMetrics,omitempty"`
}

func (*NodeProfileDescriptorStatus) DeepCopy added in v0.5.1

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

func (*NodeProfileDescriptorStatus) DeepCopyInto added in v0.5.1

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

type PodMetric added in v0.5.1

type PodMetric struct {
	// +optional
	Namespace string `json:"namespace,omitempty"`

	// +optional
	Name string `json:"name,omitempty"`

	// +optional
	Metrics []MetricValue `json:"metrics,omitempty"`
}

func (*PodMetric) DeepCopy added in v0.5.1

func (in *PodMetric) DeepCopy() *PodMetric

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

func (*PodMetric) DeepCopyInto added in v0.5.1

func (in *PodMetric) DeepCopyInto(out *PodMetric)

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

type Property

type Property struct {
	// property name
	PropertyName string `json:"propertyName"`

	// values of the specific property
	// +optional
	PropertyValues []string `json:"propertyValues,omitempty"`

	// values of the quantity-types property
	// +optional
	PropertyQuantity *resource.Quantity `json:"propertyQuantity,omitempty"`
}

func (*Property) DeepCopy

func (in *Property) DeepCopy() *Property

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

func (*Property) DeepCopyInto

func (in *Property) DeepCopyInto(out *Property)

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

type ResourcePackage added in v0.5.7

type ResourcePackage struct {
	// PackageName is the identifier for this package, e.g. "x2", "x8".
	// Rules:
	// - Names like "default" or "default-N" (N = integer) are reserved identifiers
	//   for the default package(s), which represent resources not explicitly
	//   subdivided into other named packages.
	// - Other names are user-defined and may follow any convention
	//   (e.g., "x2", "x8").
	PackageName string `json:"packageName"`

	// Allocatable defines the total resources available for this package.
	// Keys usually include "cpu" and "memory" (e.g. cpu: "64", memory: "128Gi").
	Allocatable *v1.ResourceList `json:"allocatable,omitempty"`

	// +optional
	// +patchMergeKey=name
	// +patchStrategy=merge
	Attributes []Attribute `json:"attributes,omitempty" patchStrategy:"merge" patchMergeKey:"name"`
}

ResourcePackage represents a single compute package definition. Concept:

  • A ResourcePackage subdivides the node/numa’s total resources into standardized units.
  • The most common naming convention is based on CPU:Memory ratio.
  • Example: "x2" means 1 core : 2 GiB memory, "x8" means 1 core : 8 GiB memory
  • In the future, packages may also define additional resource dimensions (e.g., local SSDs, network bandwidth, GPUs).

Behavior:

  • Pods associated with this package must consume resources following the shape defined in Allocatable.
  • A special "default" resource package (or "default-N" variants) represents all remaining resources not explicitly assigned to a named resource package.

Data source:

  • ResourcePackages are derived from metrics reported in a NodeProfileDescriptor CRD.
  • These metrics are aggregated (e.g., across NUMA nodes) to compute the Allocatable resources for each package.

func (*ResourcePackage) DeepCopy added in v0.5.7

func (in *ResourcePackage) DeepCopy() *ResourcePackage

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

func (*ResourcePackage) DeepCopyInto added in v0.5.7

func (in *ResourcePackage) DeepCopyInto(out *ResourcePackage)

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

type ResourcePool added in v0.5.4

type ResourcePool struct {
	// PoolName is the unique identifier of the resource pool.
	PoolName string `json:"poolName"`

	// MinAllocatable defines the minimum amount of resources *guaranteed* or reserved
	// for this pool. This is the lower bound that the pool can always access.
	// Interpretation:
	//   - Acts like a reservation or guaranteed quota.
	//   - Ensures workloads in this pool always get at least these resources.
	MinAllocatable *v1.ResourceList `json:"minAllocatable,omitempty"`

	// MaxAllocatable defines the maximum amount of resources this pool
	// can consume, including any resources it may opportunistically
	// borrowed from other pools.
	// Interpretation:
	//   - Acts like an upper bound / quota ceiling.
	//   - Workloads in this pool cannot exceed this allocation, even if more
	//     resources are available on the node.
	//   - Supports resource sharing between pools, but with clear limits.
	MaxAllocatable *v1.ResourceList `json:"maxAllocatable,omitempty"`

	// +optional
	// +patchMergeKey=name
	// +patchStrategy=merge
	Attributes []Attribute `json:"attributes,omitempty" patchStrategy:"merge" patchMergeKey:"name"`
}

ResourcePool represents a pool of resources reserved for a specific workload type. Concept:

  • A ResourcePool is workload-oriented. It defines a reserved or guaranteed set of resources and the possible upper bound for a workload (e.g., GPU workloads, latency-sensitive services).
  • Unlike ResourcePackages (which divide total node/numa resources into fixed CPU:Memory bundles), ResourcePools allow flexible reservation and borrowing of resources.

Data source:

  • ResourcePools are derived from metrics reported in a NodeProfileDescriptor CRD.
  • These metrics are mapped into MinAllocatable/MaxAllocatable values.

func (*ResourcePool) DeepCopy added in v0.5.4

func (in *ResourcePool) DeepCopy() *ResourcePool

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

func (*ResourcePool) DeepCopyInto added in v0.5.4

func (in *ResourcePool) DeepCopyInto(out *ResourcePool)

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

type ResourceUsage added in v0.5.0

type ResourceUsage struct {
	// NUMAUsage contains the real-time resource usage for each NUMA
	NUMAUsage []NUMAMetricInfo `json:"numaUsage,omitempty"`

	// GenericUsage contains the real-time resource usage
	GenericUsage v1.ResourceList `json:"genericUsage,omitempty"`
}

func (*ResourceUsage) DeepCopy added in v0.5.0

func (in *ResourceUsage) DeepCopy() *ResourceUsage

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

func (*ResourceUsage) DeepCopyInto added in v0.5.0

func (in *ResourceUsage) DeepCopyInto(out *ResourceUsage)

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

type Resources added in v0.1.2

type Resources struct {
	// +optional
	Allocatable *v1.ResourceList `json:"allocatable,omitempty"`

	// +optional
	Capacity *v1.ResourceList `json:"capacity,omitempty"`

	// ResourcePackages defines compute packages available on the node/numa.
	// Concept:
	//   - ResourcePackages are node/numa-oriented.
	//   - A ResourcePackage represents a subdivision of the total node/numa resources into
	//     standardized units. Each unit may define one or more resource dimensions
	//     (e.g., CPU, memory, disk, network).
	//   - Pods associated with a package must consume resources following the
	//     same ratio. If a Pod is not bound to a package, it falls back to
	//     the "default" package (or its variants: "default-1", "default-2").
	// Difference vs ResourcePools:
	//   - ResourcePackages: split all node/numa resources into standard shapes (abstracting
	//     physical resources into units).
	//   - ResourcePools: reserve/limit resources for a particular workload type.
	// +optional
	// +listMapKey=packageName
	// +listType=map
	ResourcePackages []ResourcePackage `json:"resourcePackages,omitempty"`

	// ResourcePools defines pools of resources reserved for specific workloads.
	// Concept:
	//   - ResourcePools are workload-oriented.
	//   - They allow a workload type (e.g. GPU jobs, latency-sensitive tasks) to
	//     reserve a guaranteed amount of resources (via MinAllocatable) while
	//     also optionally borrowing up to a maximum limit (via MaxAllocatable).
	// Difference vs ResourcePackages:
	//   - ResourcePools are for *workload reservations* (claiming resources for
	//     certain job types).
	//   - ResourcePackages are for *node subdivisions* (splitting all node resources into
	//     standard allocation units).
	// +optional
	// +listMapKey=poolName
	// +listType=map
	ResourcePools []ResourcePool `json:"resourcePools,omitempty"`
}

func (*Resources) DeepCopy added in v0.1.2

func (in *Resources) DeepCopy() *Resources

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

func (*Resources) DeepCopyInto added in v0.1.2

func (in *Resources) DeepCopyInto(out *Resources)

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

type ScopedNodeMetrics added in v0.5.1

type ScopedNodeMetrics struct {
	// +optional
	Scope string `json:"scope,omitempty"`

	// +optional
	Metrics []MetricValue `json:"metrics,omitempty"`
}

func (*ScopedNodeMetrics) DeepCopy added in v0.5.1

func (in *ScopedNodeMetrics) DeepCopy() *ScopedNodeMetrics

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

func (*ScopedNodeMetrics) DeepCopyInto added in v0.5.1

func (in *ScopedNodeMetrics) DeepCopyInto(out *ScopedNodeMetrics)

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

type ScopedPodMetrics added in v0.5.1

type ScopedPodMetrics struct {
	// +optional
	Scope string `json:"scope,omitempty"`

	// +optional
	PodMetrics []PodMetric `json:"podMetrics,omitempty"`
}

func (*ScopedPodMetrics) DeepCopy added in v0.5.1

func (in *ScopedPodMetrics) DeepCopy() *ScopedPodMetrics

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

func (*ScopedPodMetrics) DeepCopyInto added in v0.5.1

func (in *ScopedPodMetrics) DeepCopyInto(out *ScopedPodMetrics)

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

type Sibling added in v0.1.7

type Sibling struct {
	// Type represents the type of this Sibling.
	// For instance, Socket, Numa, GPU, NIC, Disk and so on.
	Type TopologyType `json:"type"`

	// Name represents the name of this Sibling.
	Name string `json:"name"`

	// Attributes are the attributes of the relationship between two Zones.
	// For instance, the distance between tow NUMA nodes, the connection type between two GPUs, etc.
	// +patchMergeKey=name
	// +patchStrategy=merge
	Attributes []Attribute `json:"attributes,omitempty" patchStrategy:"merge" patchMergeKey:"name"`
}

Sibling describes the relationship between two Zones.

func (*Sibling) DeepCopy added in v0.1.7

func (in *Sibling) DeepCopy() *Sibling

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

func (*Sibling) DeepCopyInto added in v0.1.7

func (in *Sibling) DeepCopyInto(out *Sibling)

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

type Taint

type Taint struct {
	// Taint is standard Kubernetes Taint
	v1.Taint `json:",inline"`

	// QoSLevel specifies the QoS level of pods that this taint applies to.
	// +kubebuilder:validation:Enum=reclaimed_cores;shared_cores;dedicated_cores;system_cores
	QoSLevel consts.QoSLevel `json:"qosLevel"`
}

Taint wraps standard Kubernetes Taint with QoSLevel.

func (*Taint) DeepCopy

func (in *Taint) DeepCopy() *Taint

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

func (*Taint) DeepCopyInto

func (in *Taint) DeepCopyInto(out *Taint)

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

type TopologyAllocation added in v0.5.11

type TopologyAllocation map[TopologyType]map[string]ZoneAllocation

TopologyAllocation is the map of topology type to map of zone name to zone allocation. This is used in QRM for reporting the allocations of containers through pod annotations, and it will be used by kubelet.

func (TopologyAllocation) DeepCopy added in v0.5.12

func (in TopologyAllocation) DeepCopy() TopologyAllocation

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

func (TopologyAllocation) DeepCopyInto added in v0.5.12

func (in TopologyAllocation) DeepCopyInto(out *TopologyAllocation)

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

type TopologyPolicy added in v0.1.2

type TopologyPolicy string
const (
	// TopologyPolicyNone policy is the default policy and does not perform any topology alignment.
	TopologyPolicyNone TopologyPolicy = "None"

	// TopologyPolicySingleNUMANodeContainerLevel represents single-numa-node policy and container level.
	TopologyPolicySingleNUMANodeContainerLevel TopologyPolicy = "SingleNUMANodeContainerLevel"

	// TopologyPolicySingleNUMANodePodLevel represents single-numa-node policy and pod level.
	TopologyPolicySingleNUMANodePodLevel TopologyPolicy = "SingleNUMANodePodLevel"

	// TopologyPolicyRestrictedContainerLevel represents restricted policy and container level.
	TopologyPolicyRestrictedContainerLevel TopologyPolicy = "RestrictedContainerLevel"

	// TopologyPolicyRestrictedPodLevel represents restricted policy and pod level.
	TopologyPolicyRestrictedPodLevel TopologyPolicy = "RestrictedPodLevel"

	// TopologyPolicyBestEffortContainerLevel represents best-effort policy and container level.
	TopologyPolicyBestEffortContainerLevel TopologyPolicy = "BestEffortContainerLevel"

	// TopologyPolicyBestEffortPodLevel represents best-effort policy and pod level.
	TopologyPolicyBestEffortPodLevel TopologyPolicy = "BestEffortPodLevel"

	// TopologyPolicyNumericContainerLevel represents numeric policy and container level.
	TopologyPolicyNumericContainerLevel TopologyPolicy = "NumericContainerLevel"

	// TopologyPolicyNumericPodLevel represents numeric policy and pod level.
	TopologyPolicyNumericPodLevel TopologyPolicy = "NumericPodLevel"
)

type TopologyType added in v0.1.2

type TopologyType string
const (
	// TopologyTypeSocket indicates socket-level topology
	TopologyTypeSocket TopologyType = "Socket"

	// TopologyTypeNuma indicates numa-level topology
	TopologyTypeNuma TopologyType = "Numa"

	// TopologyTypeCacheGroup indicates cache-group-level topology
	TopologyTypeCacheGroup TopologyType = "L3CacheGroup"

	// TopologyTypeGPU indicates a zone for gpu device
	TopologyTypeGPU TopologyType = "GPU"

	// TopologyTypeNIC indicates a zone for network device
	TopologyTypeNIC TopologyType = "NIC"

	// TopologyTypeStorage indicates a zone for storage device
	TopologyTypeStorage TopologyType = "Storage"
)

type TopologyZone added in v0.1.2

type TopologyZone struct {
	// Type represents which kind of resource this TopologyZone is for;
	// for instance, Socket, Numa, GPU, NIC, Disk and so on.
	Type TopologyType `json:"type"`

	// Name represents the name for the given type for resource; for instance,
	// - disk-for-log, disk-for-storage may have different usage or attributes, so we
	//   need separate structure to distinguish them.
	Name string `json:"name"`

	// Resources defines the numeric quantities in this TopologyZone; for instance,
	// - a TopologyZone with type TopologyTypeGPU may have both gpu and gpu-memory
	// - a TopologyZone with type TopologyTypeNIC may have both ingress and egress bandwidth
	// +optional
	Resources Resources `json:"resources"`

	// +optional
	// +patchMergeKey=name
	// +patchStrategy=merge
	Attributes []Attribute `json:"attributes,omitempty" patchStrategy:"merge" patchMergeKey:"name"`

	// +optional
	// +patchMergeKey=consumer
	// +patchStrategy=merge
	Allocations []*Allocation `json:"allocations,omitempty" patchStrategy:"merge" patchMergeKey:"consumer"`

	// Children represents the ownerships between multiple TopologyZone; for instance,
	// - a TopologyZone with type TopologyTypeSocket may have multiple childed TopologyZone
	//   with type TopologyTypeNuma to reflect the physical connections for a node
	// - a TopologyZone with type `nic` may have multiple childed TopologyZone with type `vf`
	//   to reflect the `physical and virtual` relations between devices
	// todo: in order to bypass the lacked functionality of recursive structure definition,
	//  we need to skip validation of this field for now; will re-add this validation logic
	//  if the community supports $ref, for more information, please
	//  refer to https://github.com/kubernetes/kubernetes/issues/62872
	// +optional
	// +kubebuilder:validation:Schemaless
	// +kubebuilder:pruning:PreserveUnknownFields
	Children []*TopologyZone `json:"children,omitempty"`

	// Siblings represents the relationship between TopologyZones at the same level; for instance,
	// the distance between NUMA nodes.
	// +optional
	// +patchMergeKey=name
	// +patchStrategy=merge
	Siblings []Sibling `json:"siblings,omitempty" patchStrategy:"merge" patchMergeKey:"name"`
}

func (*TopologyZone) DeepCopy added in v0.1.2

func (in *TopologyZone) DeepCopy() *TopologyZone

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

func (*TopologyZone) DeepCopyInto added in v0.1.2

func (in *TopologyZone) DeepCopyInto(out *TopologyZone)

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

type ZoneAllocation added in v0.5.11

type ZoneAllocation struct {
	// Allocated indicates the resources that are allocated to the pod.
	Allocated v1.ResourceList `json:"allocated,omitempty"`

	// Attributes store additional attributes specific to the device.
	Attributes map[string]string `json:"attributes,omitempty"`
}

ZoneAllocation describes a specific zone allocation result.

func (*ZoneAllocation) DeepCopy added in v0.5.12

func (in *ZoneAllocation) DeepCopy() *ZoneAllocation

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

func (*ZoneAllocation) DeepCopyInto added in v0.5.12

func (in *ZoneAllocation) DeepCopyInto(out *ZoneAllocation)

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

Jump to

Keyboard shortcuts

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