package serviceaffinity
import "k8s.io/kubernetes/pkg/scheduler/framework/plugins/serviceaffinity"
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, nodeInfo *nodeinfo.NodeInfo) *framework.Status
- func (pl *ServiceAffinity) Name() string
- func (pl *ServiceAffinity) NormalizeScore(ctx context.Context, _ *framework.CycleState, pod *v1.Pod, scores framework.NodeScoreList) *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 ¶
const Name = "ServiceAffinity"
Name is the name of the plugin used in the plugin registry and configurations.
Functions ¶
func New ¶
New initializes a new plugin and returns it.
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.
Source Files ¶
service_affinity.go
- Version
- v1.17.8
- Published
- Jun 26, 2020
- Platform
- js/wasm
- Imports
- 9 packages
- Last checked
- 3 minutes ago –
Tools for package owners.