Documentation
¶
Index ¶
- Constants
- Variables
- type DeviceHandler
- func (d *DeviceHandler) Create(ctx context.Context, e event.TypedCreateEvent[ctrlclient.Object], ...)
- func (d *DeviceHandler) Delete(ctx context.Context, e event.TypedDeleteEvent[ctrlclient.Object], ...)
- func (d *DeviceHandler) Generic(ctx context.Context, e event.TypedGenericEvent[ctrlclient.Object], ...)
- func (d *DeviceHandler) Update(ctx context.Context, e event.TypedUpdateEvent[ctrlclient.Object], ...)
- 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) 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 rdma resources" UpdateResourcesMsg = "node rdma resources from device" NeedSyncForResourceDiffMsg = "rdma resource diff is big than threshold" )
View Source
const PluginName = "RDMADeviceResource"
Variables ¶
View Source
var ( ResourceNames = []corev1.ResourceName{ extension.ResourceRDMA, } )
Functions ¶
This section is empty.
Types ¶
type DeviceHandler ¶
type DeviceHandler struct{}
func (*DeviceHandler) Create ¶
func (d *DeviceHandler) Create(ctx context.Context, e event.TypedCreateEvent[ctrlclient.Object], q workqueue.TypedRateLimitingInterface[reconcile.Request])
func (*DeviceHandler) Delete ¶
func (d *DeviceHandler) Delete(ctx context.Context, e event.TypedDeleteEvent[ctrlclient.Object], q workqueue.TypedRateLimitingInterface[reconcile.Request])
func (*DeviceHandler) Generic ¶
func (d *DeviceHandler) Generic(ctx context.Context, e event.TypedGenericEvent[ctrlclient.Object], q workqueue.TypedRateLimitingInterface[reconcile.Request])
func (*DeviceHandler) Update ¶
func (d *DeviceHandler) Update(ctx context.Context, e event.TypedUpdateEvent[ctrlclient.Object], q workqueue.TypedRateLimitingInterface[reconcile.Request])
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) Prepare ¶
func (p *Plugin) Prepare(_ *configuration.ColocationStrategy, node *corev1.Node, nr *framework.NodeResource) error
Click to show internal directories.
Click to hide internal directories.