kubernetes: k8s.io/kubernetes/pkg/scheduler/framework/plugins Index | Files | Directories

package plugins

import "k8s.io/kubernetes/pkg/scheduler/framework/plugins"

Index

Package Files

legacy_registry.go registry.go

Constants

const (
    // EqualPriority defines the name of prioritizer function that gives an equal weight of one to all nodes.
    EqualPriority = "EqualPriority"
    // MostRequestedPriority defines the name of prioritizer function that gives used nodes higher priority.
    MostRequestedPriority = "MostRequestedPriority"
    // RequestedToCapacityRatioPriority defines the name of RequestedToCapacityRatioPriority.
    RequestedToCapacityRatioPriority = "RequestedToCapacityRatioPriority"
    // SelectorSpreadPriority defines the name of prioritizer function that spreads pods by minimizing
    // the number of pods (belonging to the same service or replication controller) on the same node.
    SelectorSpreadPriority = "SelectorSpreadPriority"
    // ServiceSpreadingPriority is largely replaced by "SelectorSpreadPriority".
    ServiceSpreadingPriority = "ServiceSpreadingPriority"
    // InterPodAffinityPriority defines the name of prioritizer function that decides which pods should or
    // should not be placed in the same topological domain as some other pods.
    InterPodAffinityPriority = "InterPodAffinityPriority"
    // LeastRequestedPriority defines the name of prioritizer function that prioritize nodes by least
    // requested utilization.
    LeastRequestedPriority = "LeastRequestedPriority"
    // BalancedResourceAllocation defines the name of prioritizer function that prioritizes nodes
    // to help achieve balanced resource usage.
    BalancedResourceAllocation = "BalancedResourceAllocation"
    // NodePreferAvoidPodsPriority defines the name of prioritizer function that priorities nodes according to
    // the node annotation "scheduler.alpha.kubernetes.io/preferAvoidPods".
    NodePreferAvoidPodsPriority = "NodePreferAvoidPodsPriority"
    // NodeAffinityPriority defines the name of prioritizer function that prioritizes nodes which have labels
    // matching NodeAffinity.
    NodeAffinityPriority = "NodeAffinityPriority"
    // TaintTolerationPriority defines the name of prioritizer function that prioritizes nodes that marked
    // with taint which pod can tolerate.
    TaintTolerationPriority = "TaintTolerationPriority"
    // ImageLocalityPriority defines the name of prioritizer function that prioritizes nodes that have images
    // requested by the pod present.
    ImageLocalityPriority = "ImageLocalityPriority"
    // EvenPodsSpreadPriority defines the name of prioritizer function that prioritizes nodes
    // which have pods and labels matching the incoming pod's topologySpreadConstraints.
    EvenPodsSpreadPriority = "EvenPodsSpreadPriority"
)
const (
    // MatchInterPodAffinityPred defines the name of predicate MatchInterPodAffinity.
    MatchInterPodAffinityPred = "MatchInterPodAffinity"
    // CheckVolumeBindingPred defines the name of predicate CheckVolumeBinding.
    CheckVolumeBindingPred = "CheckVolumeBinding"
    // GeneralPred defines the name of predicate GeneralPredicates.
    GeneralPred = "GeneralPredicates"
    // HostNamePred defines the name of predicate HostName.
    HostNamePred = "HostName"
    // PodFitsHostPortsPred defines the name of predicate PodFitsHostPorts.
    PodFitsHostPortsPred = "PodFitsHostPorts"
    // MatchNodeSelectorPred defines the name of predicate MatchNodeSelector.
    MatchNodeSelectorPred = "MatchNodeSelector"
    // PodFitsResourcesPred defines the name of predicate PodFitsResources.
    PodFitsResourcesPred = "PodFitsResources"
    // NoDiskConflictPred defines the name of predicate NoDiskConflict.
    NoDiskConflictPred = "NoDiskConflict"
    // PodToleratesNodeTaintsPred defines the name of predicate PodToleratesNodeTaints.
    PodToleratesNodeTaintsPred = "PodToleratesNodeTaints"
    // CheckNodeUnschedulablePred defines the name of predicate CheckNodeUnschedulablePredicate.
    CheckNodeUnschedulablePred = "CheckNodeUnschedulable"
    // CheckNodeLabelPresencePred defines the name of predicate CheckNodeLabelPresence.
    CheckNodeLabelPresencePred = "CheckNodeLabelPresence"
    // CheckServiceAffinityPred defines the name of predicate checkServiceAffinity.
    CheckServiceAffinityPred = "CheckServiceAffinity"
    // MaxEBSVolumeCountPred defines the name of predicate MaxEBSVolumeCount.
    // DEPRECATED
    // All cloudprovider specific predicates are deprecated in favour of MaxCSIVolumeCountPred.
    MaxEBSVolumeCountPred = "MaxEBSVolumeCount"
    // MaxGCEPDVolumeCountPred defines the name of predicate MaxGCEPDVolumeCount.
    // DEPRECATED
    // All cloudprovider specific predicates are deprecated in favour of MaxCSIVolumeCountPred.
    MaxGCEPDVolumeCountPred = "MaxGCEPDVolumeCount"
    // MaxAzureDiskVolumeCountPred defines the name of predicate MaxAzureDiskVolumeCount.
    // DEPRECATED
    // All cloudprovider specific predicates are deprecated in favour of MaxCSIVolumeCountPred.
    MaxAzureDiskVolumeCountPred = "MaxAzureDiskVolumeCount"
    // MaxCinderVolumeCountPred defines the name of predicate MaxCinderDiskVolumeCount.
    // DEPRECATED
    // All cloudprovider specific predicates are deprecated in favour of MaxCSIVolumeCountPred.
    MaxCinderVolumeCountPred = "MaxCinderVolumeCount"
    // MaxCSIVolumeCountPred defines the predicate that decides how many CSI volumes should be attached.
    MaxCSIVolumeCountPred = "MaxCSIVolumeCountPred"
    // NoVolumeZoneConflictPred defines the name of predicate NoVolumeZoneConflict.
    NoVolumeZoneConflictPred = "NoVolumeZoneConflict"
    // EvenPodsSpreadPred defines the name of predicate EvenPodsSpread.
    EvenPodsSpreadPred = "EvenPodsSpread"
)

func NewInTreeRegistry Uses

func NewInTreeRegistry() runtime.Registry

NewInTreeRegistry builds the registry with all the in-tree plugins. A scheduler that runs out of tree plugins can register additional plugins through the WithFrameworkOutOfTreeRegistry option.

func PredicateOrdering Uses

func PredicateOrdering() []string

PredicateOrdering returns the ordering of predicate execution.

type ConfigProducer Uses

type ConfigProducer func(args ConfigProducerArgs) (config.Plugins, []config.PluginConfig)

ConfigProducer returns the set of plugins and their configuration for a predicate/priority given the args.

type ConfigProducerArgs Uses

type ConfigProducerArgs struct {
    // Weight used for priority functions.
    Weight int32
    // NodeLabelArgs is the args for the NodeLabel plugin.
    NodeLabelArgs *config.NodeLabelArgs
    // RequestedToCapacityRatioArgs is the args for the RequestedToCapacityRatio plugin.
    RequestedToCapacityRatioArgs *config.RequestedToCapacityRatioArgs
    // ServiceAffinityArgs is the args for the ServiceAffinity plugin.
    ServiceAffinityArgs *config.ServiceAffinityArgs
    // NodeResourcesFitArgs is the args for the NodeResources fit filter.
    NodeResourcesFitArgs *config.NodeResourcesFitArgs
    // InterPodAffinityArgs is the args for InterPodAffinity plugin
    InterPodAffinityArgs *config.InterPodAffinityArgs
}

ConfigProducerArgs contains arguments that are passed to the producer. As we add more predicates/priorities to framework plugins mappings, more arguments may be added here.

type LegacyRegistry Uses

type LegacyRegistry struct {
    // maps that associate predicates/priorities with framework plugin configurations.
    PredicateToConfigProducer map[string]ConfigProducer
    PriorityToConfigProducer  map[string]ConfigProducer
    // predicates that will always be configured.
    MandatoryPredicates sets.String
    // predicates and priorities that will be used if either was set to nil in a
    // given v1.Policy configuration.
    DefaultPredicates sets.String
    DefaultPriorities map[string]int64
}

LegacyRegistry is used to store current state of registered predicates and priorities.

func NewLegacyRegistry Uses

func NewLegacyRegistry() *LegacyRegistry

NewLegacyRegistry returns a legacy algorithm registry of predicates and priorities.

func (*LegacyRegistry) ProcessPredicatePolicy Uses

func (lr *LegacyRegistry) ProcessPredicatePolicy(policy config.PredicatePolicy, pluginArgs *ConfigProducerArgs) string

ProcessPredicatePolicy given a PredicatePolicy, return the plugin name implementing the predicate and update the ConfigProducerArgs if necessary.

func (*LegacyRegistry) ProcessPriorityPolicy Uses

func (lr *LegacyRegistry) ProcessPriorityPolicy(policy config.PriorityPolicy, configProducerArgs *ConfigProducerArgs) string

ProcessPriorityPolicy given a PriorityPolicy, return the plugin name implementing the priority and update the ConfigProducerArgs if necessary.

Directories

PathSynopsis
defaultbinder
defaultpreemption
helper
imagelocality
interpodaffinity
nodeaffinity
nodelabel
nodename
nodeports
nodepreferavoidpods
noderesources
nodeunschedulable
nodevolumelimits
podtopologyspread
queuesort
selectorspread
serviceaffinity
tainttoleration
volumebinding
volumerestrictions
volumezone

Package plugins imports 24 packages (graph) and is imported by 31 packages. Updated 2020-09-16. Refresh now. Tools for package owners.