Documentation ¶
Index ¶
- Constants
- Variables
- type DeviceHandler
- func (d *DeviceHandler) Create(ctx context.Context, e event.CreateEvent, q workqueue.RateLimitingInterface)
- func (d *DeviceHandler) Delete(ctx context.Context, e event.DeleteEvent, q workqueue.RateLimitingInterface)
- func (d *DeviceHandler) Generic(ctx context.Context, e event.GenericEvent, q workqueue.RateLimitingInterface)
- func (d *DeviceHandler) Update(ctx context.Context, e event.UpdateEvent, q workqueue.RateLimitingInterface)
- type Plugin
- func (p *Plugin) Calculate(_ *configuration.ColocationStrategy, node *corev1.Node, _ *corev1.PodList, ...) ([]framework.ResourceItem, error)
- func (p *Plugin) Name() string
- func (p *Plugin) NeedSync(strategy *configuration.ColocationStrategy, oldNode, newNode *corev1.Node) (bool, string)
- func (p *Plugin) NeedSyncMeta(_ *configuration.ColocationStrategy, oldNode, newNode *corev1.Node) (bool, string)
- func (p *Plugin) Prepare(_ *configuration.ColocationStrategy, node *corev1.Node, ...) error
- func (p *Plugin) Reset(node *corev1.Node, message string) []framework.ResourceItem
- func (p *Plugin) Setup(opt *framework.Option) error
Constants ¶
View Source
const ( ResetResourcesMsg = "reset node gpu resources" UpdateResourcesMsg = "node gpu resources from device" UpdateLabelsMsg = "node gpu labels from device" NeedSyncForResourceDiffMsg = "gpu resource diff is big than threshold" NeedSyncForGPUModelMsgFmt = "gpu device label %s changed" )
View Source
const PluginName = "GPUDeviceResource"
Variables ¶
View Source
var ( // ResourceNames are the known resources reconciled by the plugin from devices to nodes. // TODO: support custom resources. ResourceNames = []corev1.ResourceName{ extension.ResourceGPU, extension.ResourceGPUCore, extension.ResourceGPUMemory, extension.ResourceGPUMemoryRatio, extension.ResourceGPUShared, } // Labels are the known labels reconciled by the plugin from devices to nodes. Labels = []string{ extension.LabelGPUModel, extension.LabelGPUDriverVersion, } )
Functions ¶
This section is empty.
Types ¶
type DeviceHandler ¶
type DeviceHandler struct{}
func (*DeviceHandler) Create ¶
func (d *DeviceHandler) Create(ctx context.Context, e event.CreateEvent, q workqueue.RateLimitingInterface)
func (*DeviceHandler) Delete ¶
func (d *DeviceHandler) Delete(ctx context.Context, e event.DeleteEvent, q workqueue.RateLimitingInterface)
func (*DeviceHandler) Generic ¶
func (d *DeviceHandler) Generic(ctx context.Context, e event.GenericEvent, q workqueue.RateLimitingInterface)
func (*DeviceHandler) Update ¶
func (d *DeviceHandler) Update(ctx context.Context, e event.UpdateEvent, q workqueue.RateLimitingInterface)
type Plugin ¶
type Plugin struct{}
func (*Plugin) Calculate ¶
func (p *Plugin) Calculate(_ *configuration.ColocationStrategy, node *corev1.Node, _ *corev1.PodList, _ *framework.ResourceMetrics) ([]framework.ResourceItem, error)
func (*Plugin) NeedSync ¶
func (p *Plugin) NeedSync(strategy *configuration.ColocationStrategy, oldNode, newNode *corev1.Node) (bool, string)
func (*Plugin) NeedSyncMeta ¶
func (p *Plugin) NeedSyncMeta(_ *configuration.ColocationStrategy, oldNode, newNode *corev1.Node) (bool, string)
func (*Plugin) Prepare ¶
func (p *Plugin) Prepare(_ *configuration.ColocationStrategy, node *corev1.Node, nr *framework.NodeResource) error
Click to show internal directories.
Click to hide internal directories.