const ( PluginName = "BatteryLevel" // The label that describes the current battery level in percent (as an integer). NodeBatteryLevelLabel = "polaris-slo-cloud.github.io/battery.level" // The label that describes the battery capacity in mAh. NodeBatteryCapacityLabel = "polaris-slo-cloud.github.io/battery.capacity-mah" // The label that describes the requested minimum battery level in percent (as an integer). PodMinBatteryLevelLabel = "polaris-slo-cloud.github.io/battery.min-level" // The label that describes the minimum battery capacity in mAh. PodMinBatteryCapacityLabel = "polaris-slo-cloud.github.io/battery.min-capacity-mah" )
func NewBatteryLevelClusterAgentPlugin(configMap config.PluginConfig, clusterAgentServices pipeline.ClusterAgentServices) (pipeline.Plugin, error)
func NewBatteryLevelSchedulingPlugin(configMap config.PluginConfig, scheduler pipeline.PolarisScheduler) (pipeline.Plugin, error)
The BatteryLevelPlugin ensures that a node meets certain battery level requirements requested by a pod.
type BatteryLevelPlugin struct { }
func (blp *BatteryLevelPlugin) Filter(ctx pipeline.SchedulingContext, podInfo *pipeline.PodInfo, nodeInfo *pipeline.NodeInfo) pipeline.Status
func (blp *BatteryLevelPlugin) Name() string
func (blp *BatteryLevelPlugin) PreFilter(ctx pipeline.SchedulingContext, podInfo *pipeline.PodInfo) pipeline.Status