Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CustomResources ¶
type CustomResources map[corev1.ResourceName]resource.Quantity
CustomResources is a key-value map for defining custom resources
func (CustomResources) DeepCopy ¶
func (cr CustomResources) DeepCopy() CustomResources
DeepCopy copy the custom resource
func (CustomResources) Equal ¶
func (cr CustomResources) Equal(other CustomResources) bool
Equal return if resources is equal
type ProviderNode ¶
ProviderNode defines the virtual kubelet node of tensile-kube
func (*ProviderNode) AddResource ¶
func (n *ProviderNode) AddResource(resource *Resource) error
AddResource add resource to the node
func (*ProviderNode) DeepCopy ¶
func (n *ProviderNode) DeepCopy() *corev1.Node
DeepCopy deepcopy node with lock, to avoid concurrent read-write
func (*ProviderNode) SubResource ¶
func (n *ProviderNode) SubResource(resource *Resource) error
SubResource sub resource from the node
type Resource ¶
type Resource struct { // CPU requirement CPU resource.Quantity // Memory requirement Memory resource.Quantity // Pods requirement Pods resource.Quantity // EphemeralStorage requirement EphemeralStorage resource.Quantity // Custom resource requirement Custom CustomResources }
Resource defines the resources of a pod, it provides func `Add`, `Sub` to make computation flexible
func ConvertResource ¶
func ConvertResource(resources corev1.ResourceList) *Resource
ConvertResource converts ResourceList to Resource
func (*Resource) SetCapacityToNode ¶
SetCapacityToNode set the resource the virtual-kubelet node
Click to show internal directories.
Click to hide internal directories.