Documentation ¶
Index ¶
- Constants
- type AvailabilityZonePriority
- func (pl *AvailabilityZonePriority) Name() string
- func (pl *AvailabilityZonePriority) NormalizeScore(ctx context.Context, states *state.State, scores state.PodScoreList) *state.Status
- func (pl *AvailabilityZonePriority) Score(ctx context.Context, args interface{}, states *state.State, ...) (uint64, *state.Status)
- func (pl *AvailabilityZonePriority) ScoreExtensions() state.ScoreExtensions
Constants ¶
View Source
const ( ErrReasonInvalidArg = "invalid arguments" ErrReasonNoResource = "zone does not exist" )
View Source
const Name = state.AvailabilityZonePriority
Name of the plugin
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AvailabilityZonePriority ¶
type AvailabilityZonePriority struct { }
AvailabilityZonePriority is a score plugin that favors pods that create an even spread of resources across zones for HA
func (*AvailabilityZonePriority) Name ¶
func (pl *AvailabilityZonePriority) Name() string
Name returns name of the plugin
func (*AvailabilityZonePriority) NormalizeScore ¶
func (pl *AvailabilityZonePriority) NormalizeScore(ctx context.Context, states *state.State, scores state.PodScoreList) *state.Status
NormalizeScore invoked after scoring all pods.
func (*AvailabilityZonePriority) Score ¶
func (pl *AvailabilityZonePriority) Score(ctx context.Context, args interface{}, states *state.State, feasiblePods []int32, key types.NamespacedName, podID int32) (uint64, *state.Status)
Score invoked at the score extension point. The "score" returned in this function is higher for zones that create an even spread across zones.
func (*AvailabilityZonePriority) ScoreExtensions ¶
func (pl *AvailabilityZonePriority) ScoreExtensions() state.ScoreExtensions
ScoreExtensions of the Score plugin.
Click to show internal directories.
Click to hide internal directories.