Documentation ¶
Index ¶
- Constants
- func New(plArgs *runtime.Unknown, handle framework.FrameworkHandle) (framework.Plugin, error)
- type Args
- type ServiceAffinity
- func (pl *ServiceAffinity) Filter(ctx context.Context, cycleState *framework.CycleState, pod *v1.Pod, ...) *framework.Status
- func (pl *ServiceAffinity) Name() string
- func (pl *ServiceAffinity) NormalizeScore(ctx context.Context, _ *framework.CycleState, pod *v1.Pod, ...) *framework.Status
- func (pl *ServiceAffinity) Score(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeName string) (int64, *framework.Status)
- func (pl *ServiceAffinity) ScoreExtensions() framework.ScoreExtensions
Constants ¶
View Source
const Name = "ServiceAffinity"
Name is the name of the plugin used in the plugin registry and configurations.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Args ¶
type Args struct { // Labels are homogeneous for pods that are scheduled to a node. // (i.e. it returns true IFF this pod can be added to this node such that all other pods in // the same service are running on nodes with the exact same values for Labels). AffinityLabels []string `json:"labels,omitempty"` // AntiAffinityLabelsPreference are the labels to consider for service anti affinity scoring. AntiAffinityLabelsPreference []string `json:"antiAffinityLabelsPreference,omitempty"` }
Args holds the args that are used to configure the plugin.
type ServiceAffinity ¶
type ServiceAffinity struct {
// contains filtered or unexported fields
}
ServiceAffinity is a plugin that checks service affinity.
func (*ServiceAffinity) Filter ¶
func (pl *ServiceAffinity) Filter(ctx context.Context, cycleState *framework.CycleState, pod *v1.Pod, nodeInfo *nodeinfo.NodeInfo) *framework.Status
Filter invoked at the filter extension point.
func (*ServiceAffinity) Name ¶
func (pl *ServiceAffinity) Name() string
Name returns name of the plugin. It is used in logs, etc.
func (*ServiceAffinity) NormalizeScore ¶
func (pl *ServiceAffinity) NormalizeScore(ctx context.Context, _ *framework.CycleState, pod *v1.Pod, scores framework.NodeScoreList) *framework.Status
NormalizeScore invoked after scoring all nodes.
func (*ServiceAffinity) Score ¶
func (pl *ServiceAffinity) Score(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeName string) (int64, *framework.Status)
Score invoked at the Score extension point.
func (*ServiceAffinity) ScoreExtensions ¶
func (pl *ServiceAffinity) ScoreExtensions() framework.ScoreExtensions
ScoreExtensions of the Score plugin.
Click to show internal directories.
Click to hide internal directories.