Documentation ¶
Overview ¶
Package v1alpha1 provides alpha API for Katalyst Node API objects.
Index ¶
- Constants
- Variables
- func Resource(resource string) schema.GroupResource
- type Allocation
- type Attribute
- type CNRCondition
- type CNRConditionType
- type CustomNodeResource
- type CustomNodeResourceList
- type CustomNodeResourceSpec
- type CustomNodeResourceStatus
- type Property
- type Resources
- type Sibling
- type Taint
- type TaintEffect
- type TopologyPolicy
- type TopologyType
- type TopologyZone
Constants ¶
const ( // GroupName is the group name used in this package GroupName string = "node.katalyst.kubewharf.io" )
const (
ResourceNameKatalystCNR = "customnoderesources"
)
ResourceNameKatalystCNR is used to construct standard gvr
Variables ¶
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 )
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 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
Attribute records the resource-specified info with name-value pairs
func (*Attribute) DeepCopy ¶ added in v0.1.2
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Attribute.
func (*Attribute) DeepCopyInto ¶ added in v0.1.2
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 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 ¶
func (in *CustomNodeResourceList) DeepCopy() *CustomNodeResourceList
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"` // customized taint for katalyst, which may affect partial tasks // +optional Taints []*Taint `json:"taints,omitempty"` }
func (*CustomNodeResourceSpec) DeepCopy ¶
func (in *CustomNodeResourceSpec) DeepCopy() *CustomNodeResourceSpec
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 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"` }
func (*CustomNodeResourceStatus) DeepCopy ¶
func (in *CustomNodeResourceStatus) DeepCopy() *CustomNodeResourceStatus
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 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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Property.
func (*Property) DeepCopyInto ¶
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"` }
func (*Resources) DeepCopy ¶ added in v0.1.2
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Resources.
func (*Resources) DeepCopyInto ¶ added in v0.1.2
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
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Sibling.
func (*Sibling) DeepCopyInto ¶ added in v0.1.7
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Taint ¶
type Taint struct { // Required. The taint key to be applied to a node. Key string `json:"key,omitempty"` // Required. The taint value corresponding to the taint key. // +optional Value string `json:"value,omitempty"` // Required. The effect of the taint on pods // that do not tolerate the taint. // Valid effects are NoScheduleForReclaimedTasks. Effect TaintEffect `json:"effect,omitempty"` }
func (*Taint) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Taint.
func (*Taint) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TaintEffect ¶
type TaintEffect string
const ( // TaintEffectNoScheduleForReclaimedTasks // Do not allow new pods using reclaimed resources to schedule onto the node unless they tolerate the taint, // but allow all pods submitted to Kubelet without going through the scheduler // to start, and allow all already-running pods to continue running. // Enforced by the scheduler. TaintEffectNoScheduleForReclaimedTasks TaintEffect = "NoScheduleForReclaimedTasks" )
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" )
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" // TopologyTypeGPU indicates a zone for gpu device TopologyTypeGPU TopologyType = "GPU" // TopologyTypeNIC indicates a zone for network device TopologyTypeNIC TopologyType = "NIC" )
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 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.