Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterDefaults(scheme *runtime.Scheme) error
- func SetDefaults_GodelSchedulerConfiguration(obj *GodelSchedulerConfiguration)
- func SetObjectDefaults_GodelSchedulerConfiguration(in *GodelSchedulerConfiguration)
- type GodelSchedulerConfiguration
- type GodelSchedulerProfile
- type InterPodAffinityArgs
- type LoadAwareArgs
- type LocalStoragePoolCheckerArgs
- type NodeLabelArgs
- type NodeLoadArgs
- type NodeResourcesAffinityArgs
- type NodeResourcesBalancedAllocatedArgs
- type NodeResourcesFitArgs
- type NodeResourcesLeastAllocatedArgs
- type NodeResourcesMostAllocatedArgs
- type Plugin
- type PluginConfig
- type PluginSet
- type Plugins
- type PodTopologySpreadArgs
- type RequestedToCapacityRatioArgs
- type ResourceMatchFactor
- type ResourceSpec
- type ScorePolicy
- type ServiceAffinityArgs
- type StartRecentlyArgs
- type StringSlice
- type UtilizationShapePoint
- type VictimSearchingPluginCollection
- type VictimSearchingPluginSet
- type VolumeBindingArgs
Constants ¶
const ( // ProxyStatusPort is the default port for the proxy metrics server. // May be overridden by a flag at startup. ProxyStatusPort = 10249 // KubeletPort is the default port for the kubelet server on each host machine. // May be overridden by a flag at startup. KubeletPort = 10250 // InsecureSchedulerPort is the default port for the scheduler status server. // May be overridden by a flag at startup. // Deprecated: use the secure KubeSchedulerPort instead. InsecureSchedulerPort = 10251 // InsecureKubeControllerManagerPort is the default port for the controller manager status server. // May be overridden by a flag at startup. // Deprecated: use the secure KubeControllerManagerPort instead. InsecureKubeControllerManagerPort = 10252 // InsecureCloudControllerManagerPort is the default port for the cloud controller manager server. // This value may be overridden by a flag at startup. // Deprecated: use the secure CloudControllerManagerPort instead. InsecureCloudControllerManagerPort = 10253 // KubeletReadOnlyPort exposes basic read-only services from the kubelet. // May be overridden by a flag at startup. // This is necessary for heapster to collect monitoring stats from the kubelet // until heapster can transition to using the SSL endpoint. // TODO(roberthbailey): Remove this once we have a better solution for heapster. KubeletReadOnlyPort = 10255 // ProxyHealthzPort is the default port for the proxy healthz server. // May be overridden by a flag at startup. ProxyHealthzPort = 10256 // KubeControllerManagerPort is the default port for the controller manager status server. // May be overridden by a flag at startup. KubeControllerManagerPort = 10257 // CloudControllerManagerPort is the default port for the cloud controller manager server. // This value may be overridden by a flag at startup. CloudControllerManagerPort = 10258 // KubeSchedulerPort is the default port for the scheduler status server. // May be overridden by a flag at startup. KubeSchedulerPort = 10259 )
const ( // SchedulerDefaultLockObjectNamespace defines default scheduler lock object namespace ("kube-system") SchedulerDefaultLockObjectNamespace = metav1.NamespaceSystem // SchedulerDefaultLockObjectName defines default scheduler lock object name ("kube-scheduler") SchedulerDefaultLockObjectName = "scheduler" // SchedulerPolicyConfigMapKey defines the key of the element in the // scheduler's policy ConfigMap that contains scheduler's policy config. SchedulerPolicyConfigMapKey = "policy.cfg" // FIXME // SchedulerDefaultProviderName defines the default provider names SchedulerDefaultProviderName = "DefaultProvider" // DefaultInsecureSchedulerPort is the default port for the scheduler status server. // May be overridden by a flag at startup. // Deprecated: use the secure GodelSchedulerPort instead. DefaultInsecureSchedulerPort = 10251 // DefaultGodelSchedulerPort is the default port for the scheduler status server. // May be overridden by a flag at startup. DefaultGodelSchedulerPort = 10259 // DefaultGodelSchedulerAddress is the default address for the scheduler status server. // May be overridden by a flag at startup. DefaultGodelSchedulerAddress = "0.0.0.0" )
const ( // DefaultPercentageOfNodesToScore defines the percentage of nodes of all nodes // that once found feasible, the scheduler stops looking for more nodes. // A value of 0 means adaptive, meaning the scheduler figures out a proper default. DefaultPercentageOfNodesToScore = 0 DefaultIncreasedPercentageOfNodesToScore = 0 // MaxCustomPriorityScore is the max score UtilizationShapePoint expects. MaxCustomPriorityScore int64 = 10 // MaxTotalScore is the maximum total score. MaxTotalScore int64 = math.MaxInt64 // MaxWeight defines the max weight value allowed for custom PriorityPolicy MaxWeight = MaxTotalScore / MaxCustomPriorityScore )
const ( // DefaultUnitInitialBackoffInSeconds is the default value for the initial backoff duration // for unschedulable units. To change the default podInitialBackoffDurationSeconds used by the // scheduler, update the ComponentConfig value in defaults.go DefaultUnitInitialBackoffInSeconds = 10 // DefaultUnitMaxBackoffInSeconds is the default value for the max backoff duration // for unschedulable units. To change the default unitMaxBackoffDurationSeconds used by the // scheduler, update the ComponentConfig value in defaults.go DefaultUnitMaxBackoffInSeconds = 300 // DefaultDisablePreemption is the default value for the option to disable preemption ability // for unschedulable pods. DefaultDisablePreemption = true CandidateSelectPolicyBest = "Best" CandidateSelectPolicyBetter = "Better" CandidateSelectPolicyRandom = "Random" BetterPreemptionPolicyAscending = "Ascending" BetterPreemptionPolicyDichotomy = "Dichotomy" // DefaultBlockQueue is the default value for the option to use block queue for SchedulingQueue. DefaultBlockQueue = false // DefaultPodUpgradePriorityInMinutes is the default upgrade priority duration for godel sort. DefaultPodUpgradePriorityInMinutes = 5 // DefaultGodelSchedulerName defines the name of default scheduler. DefaultGodelSchedulerName = "godel-scheduler" // DefaultRenewIntervalInSeconds is the default value for the renew interval duration for scheduler. DefaultRenewIntervalInSeconds = 30 // DefaultSchedulerName is default high level scheduler name DefaultSchedulerName = "godel-scheduler" // DefaultClientConnectionQPS is default scheduler qps DefaultClientConnectionQPS = 10000.0 // DefaultClientConnectionBurst is default scheduler burst DefaultClientConnectionBurst = 10000 // DefaultIDC is default idc name for godel scheduler DefaultIDC = "lq" // DefaultCluster is default cluster name for godel scheduler DefaultCluster = "default" // DefaultTracer is default tracer name for godel scheduler DefaultTracer = string(tracing.NoopConfig) DefaultSubClusterKey = "" // DefaultAttemptImpactFactorOnPriority is the default attempt factors used by godel sort DefaultAttemptImpactFactorOnPriority = 10.0 DefaultMaxWaitingDeletionDuration = 120 DefaultReservationTimeOutSeconds = 60 )
const GroupName = "godelscheduler.config.kubewharf.io"
GroupName is the group name used in this package
Variables ¶
var ( // SchemeBuilder is the scheme builder with scheme init functions to run for this API package SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, addDefaultingFuncs) // AddToScheme is a global function that registers this API group & version to a scheme AddToScheme = SchemeBuilder.AddToScheme )
var DefaultBindAddress = net.JoinHostPort(DefaultGodelSchedulerAddress, strconv.Itoa(DefaultInsecureSchedulerPort))
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}
SchemeGroupVersion is group version used to register these objects
Functions ¶
func RegisterDefaults ¶
RegisterDefaults adds defaulters functions to the given scheme. Public to allow building arbitrary schemes. All generated defaulters are covering - they call all nested defaulters.
func SetDefaults_GodelSchedulerConfiguration ¶
func SetDefaults_GodelSchedulerConfiguration(obj *GodelSchedulerConfiguration)
SetDefaults_GodelSchedulerConfiguration sets additional defaults
func SetObjectDefaults_GodelSchedulerConfiguration ¶
func SetObjectDefaults_GodelSchedulerConfiguration(in *GodelSchedulerConfiguration)
Types ¶
type GodelSchedulerConfiguration ¶
type GodelSchedulerConfiguration struct { metav1.TypeMeta // LeaderElection defines the configuration of leader election client. LeaderElection componentbaseconfig.LeaderElectionConfiguration // SchedulerRenewIntervalSeconds is the duration for updating scheduler. // If this value is null, the default value (30s) will be used. SchedulerRenewIntervalSeconds int64 // ClientConnection specifies the kubeconfig file and client connection // settings for the proxy server to use when communicating with the apiserver. ClientConnection componentbaseconfig.ClientConnectionConfiguration // HealthzBindAddress is the IP address and port for the health check server to serve on, // defaulting to 0.0.0.0:10251 HealthzBindAddress string // MetricsBindAddress is the IP address and port for the metrics server to // serve on, defaulting to 0.0.0.0:10251. MetricsBindAddress string // DebuggingConfiguration holds configuration for Debugging related features // TODO: We might wanna make this a substruct like Debugging componentbaseconfig.DebuggingConfiguration componentbaseconfig.DebuggingConfiguration // GodelSchedulerName is the name of the scheduler, scheduler will register scheduler crd with // this name, then dispatcher will choose one scheduler and use this scheduler's name to set the // selected-scheduler annotation on pod. GodelSchedulerName string // SchedulerName specifies a scheduling system, scheduling components(dispatcher, // scheduler, binder) will not accept a pod, unless pod.Spec.SchedulerName == SchedulerName SchedulerName *string // Tracer defines the configuration of tracer Tracer *tracing.TracerConfiguration SubClusterKey *string // reserved resources will be released after a period of time. ReservationTimeOutSeconds int64 // TODO: update the comment // Profiles are scheduling profiles that kube-scheduler supports. Pods can // choose to be scheduled under a particular profile by setting its associated // scheduler name. Pods that don't specify any scheduler name are scheduled // with the "default-scheduler" profile, if present here. DefaultProfile *GodelSchedulerProfile SubClusterProfiles []GodelSchedulerProfile }
GodelSchedulerConfiguration configures a scheduler
func (*GodelSchedulerConfiguration) DeepCopy ¶
func (in *GodelSchedulerConfiguration) DeepCopy() *GodelSchedulerConfiguration
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GodelSchedulerConfiguration.
func (*GodelSchedulerConfiguration) DeepCopyInto ¶
func (in *GodelSchedulerConfiguration) DeepCopyInto(out *GodelSchedulerConfiguration)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*GodelSchedulerConfiguration) DeepCopyObject ¶
func (in *GodelSchedulerConfiguration) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type GodelSchedulerProfile ¶
type GodelSchedulerProfile struct { // ProfileKey associates the profile to a subcluster if it is not nil. SubClusterName string // BasePluginsForKubelet specify the set of default plugins. BasePluginsForKubelet *Plugins // BasePluginsForNM specify the set of default plugins. BasePluginsForNM *Plugins // PluginConfigs is an optional set of custom plugin arguments for each plugin. // Omitting config args for a plugin is equivalent to using the default config // for that plugin. PluginConfigs []PluginConfig // PreemptionPluginConfigs is an optional set of custom plugin arguments for each preemption plugin. // Omitting config args for a preemption plugin is equivalent to using the default config // for that preemption plugin. PreemptionPluginConfigs []PluginConfig // TODO: reserve temporarily(godel). // PercentageOfNodesToScore is the percentage of all nodes that once found feasible // for running a pod, the scheduler stops its search for more feasible nodes in // the cluster. This helps improve scheduler's performance. Scheduler always tries to find // at least "minFeasibleNodesToFind" feasible nodes no matter what the value of this flag is. // Example: if the cluster size is 500 nodes and the value of this flag is 30, // then scheduler stops finding further feasible nodes once it finds 150 feasible ones. // When the value is 0, default percentage (5%--50% based on the size of the cluster) of the // nodes will be scored. PercentageOfNodesToScore *int32 // IncreasedPercentageOfNodesToScore is used to improve the scheduling quality for particular // pods for which the scheduler will find more feasible nodes. It is usually greater than PercenrageOfNodesToScore. IncreasedPercentageOfNodesToScore *int32 // DisablePreemption disables the pod preemption feature. DisablePreemption *bool // CandidatesSelectPolicies CandidatesSelectPolicy *string // BetterSelectPolicies BetterSelectPolicies *StringSlice // max attempts waiting for deletion completed MaxWaitingDeletionDuration int64 // BlockQueue indicates whether a BlockQueue is required. BlockQueue *bool // UnitQueueSortPlugin specifies the sort plugin used in scheduling queue, defining the priority of pods in scheduling queue. UnitQueueSortPlugin *Plugin AttemptImpactFactorOnPriority *float64 // UnitInitialBackoffSeconds is the initial backoff for unschedulable pods. // If specified, it must be greater than 0. If this value is null, the default value (10s) // will be used. UnitInitialBackoffSeconds *int64 // UnitMaxBackoffSeconds is the max backoff for unschedulable pods. // If specified, it must be greater than or equal to unitInitialBackoffSeconds. If this value is null, // the default value (10s) will be used. UnitMaxBackoffSeconds *int64 }
GodelSchedulerProfile is a scheduling profile.
func (*GodelSchedulerProfile) DeepCopy ¶
func (in *GodelSchedulerProfile) DeepCopy() *GodelSchedulerProfile
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GodelSchedulerProfile.
func (*GodelSchedulerProfile) DeepCopyInto ¶
func (in *GodelSchedulerProfile) DeepCopyInto(out *GodelSchedulerProfile)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type InterPodAffinityArgs ¶
type InterPodAffinityArgs struct { metav1.TypeMeta `json:",inline"` // HardPodAffinityWeight is the scoring weight for existing pods with a // matching hard affinity to the incoming pod. HardPodAffinityWeight int32 `json:"hardPodAffinityWeight,omitempty"` }
InterPodAffinityArgs holds arguments used to configure the InterPodAffinity plugin.
func (*InterPodAffinityArgs) DeepCopy ¶
func (in *InterPodAffinityArgs) DeepCopy() *InterPodAffinityArgs
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InterPodAffinityArgs.
func (*InterPodAffinityArgs) DeepCopyInto ¶
func (in *InterPodAffinityArgs) DeepCopyInto(out *InterPodAffinityArgs)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*InterPodAffinityArgs) DeepCopyObject ¶
func (in *InterPodAffinityArgs) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type LoadAwareArgs ¶
type LoadAwareArgs struct { metav1.TypeMeta `json:",inline"` // Resources to be considered when scoring. // The default resource set includes "cpu" and "memory" with an equal weight. // Allowed weights go from 1 to 100. // ResourceType can be unfilled if no need to differentiate weights by pod resource type. Resources []ResourceSpec `json:"resources,omitempty"` // Estimator indicates the expected Estimator to use Estimator string `json:"estimator,omitempty"` FilterExpiredNodeMetrics bool `json:"filterExpiredNodeMetrics,omitempty"` NodeMetricExpirationSeconds int64 `json:"nodeMetricExpirationSeconds,omitempty"` UsageThresholds map[v1.ResourceName]int64 `json:"usageThresholds,omitempty"` // EstimatedScalingFactors indicates the factor when estimating resource usage. // Is CPU scaling factor is 80, estimated CPU = 80 / 100 * request.cpu EstimatedScalingFactors map[v1.ResourceName]int64 `json:"estimatedScalingFactors,omitempty"` }
func (*LoadAwareArgs) DeepCopy ¶
func (in *LoadAwareArgs) DeepCopy() *LoadAwareArgs
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoadAwareArgs.
func (*LoadAwareArgs) DeepCopyInto ¶
func (in *LoadAwareArgs) DeepCopyInto(out *LoadAwareArgs)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*LoadAwareArgs) DeepCopyObject ¶
func (in *LoadAwareArgs) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type LocalStoragePoolCheckerArgs ¶
type LocalStoragePoolCheckerArgs struct { metav1.TypeMeta `json:",inline"` // ScorePolicy to use ScorePolicy ScorePolicy `json:"score_policy"` StorageClassWeights []ResourceSpec `json:"storage_class_weights"` }
LocalStoragePoolCheckerArgs holds arguments used to configure NodeResourcesLeastAllocated plugin.
func (*LocalStoragePoolCheckerArgs) DeepCopy ¶
func (in *LocalStoragePoolCheckerArgs) DeepCopy() *LocalStoragePoolCheckerArgs
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalStoragePoolCheckerArgs.
func (*LocalStoragePoolCheckerArgs) DeepCopyInto ¶
func (in *LocalStoragePoolCheckerArgs) DeepCopyInto(out *LocalStoragePoolCheckerArgs)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*LocalStoragePoolCheckerArgs) DeepCopyObject ¶
func (in *LocalStoragePoolCheckerArgs) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type NodeLabelArgs ¶
type NodeLabelArgs struct { metav1.TypeMeta `json:",inline"` // PresentLabels should be present for the node to be considered a fit for hosting the pod PresentLabels []string `json:"presentLabels,omitempty"` // AbsentLabels should be absent for the node to be considered a fit for hosting the pod AbsentLabels []string `json:"absentLabels,omitempty"` // Nodes that have labels in the list will get a higher score. PresentLabelsPreference []string `json:"presentLabelsPreference,omitempty"` // Nodes that don't have labels in the list will get a higher score. AbsentLabelsPreference []string `json:"absentLabelsPreference,omitempty"` }
NodeLabelArgs holds arguments used to configure the NodeLabel plugin.
func (*NodeLabelArgs) DeepCopy ¶
func (in *NodeLabelArgs) DeepCopy() *NodeLabelArgs
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeLabelArgs.
func (*NodeLabelArgs) DeepCopyInto ¶
func (in *NodeLabelArgs) DeepCopyInto(out *NodeLabelArgs)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*NodeLabelArgs) DeepCopyObject ¶
func (in *NodeLabelArgs) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type NodeLoadArgs ¶
type NodeLoadArgs struct { metav1.TypeMeta `json:",inline"` // LoadThreshold is the threshold to consider for node load limitation LoadThreshold float64 `json:"loadThreshold"` }
NodeLoadArgs holds arguments used to configure the HighLoad plugin. TODO this should be confirmed later
func (*NodeLoadArgs) DeepCopy ¶
func (in *NodeLoadArgs) DeepCopy() *NodeLoadArgs
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeLoadArgs.
func (*NodeLoadArgs) DeepCopyInto ¶
func (in *NodeLoadArgs) DeepCopyInto(out *NodeLoadArgs)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*NodeLoadArgs) DeepCopyObject ¶
func (in *NodeLoadArgs) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type NodeResourcesAffinityArgs ¶
type NodeResourcesAffinityArgs struct { metav1.TypeMeta `json:",inline"` // Resources to be considered when scoring. // The default resource set includes "bytedance.com/sriov.nic" with weight 1. // Allowed weights go from 1 to 100. Resources []ResourceSpec `json:"resources,omitempty"` }
NodeResourcesAffinityArgs holds arguments used to configure NodeResourcesLeastAllocated plugin.
func (*NodeResourcesAffinityArgs) DeepCopy ¶
func (in *NodeResourcesAffinityArgs) DeepCopy() *NodeResourcesAffinityArgs
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeResourcesAffinityArgs.
func (*NodeResourcesAffinityArgs) DeepCopyInto ¶
func (in *NodeResourcesAffinityArgs) DeepCopyInto(out *NodeResourcesAffinityArgs)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*NodeResourcesAffinityArgs) DeepCopyObject ¶
func (in *NodeResourcesAffinityArgs) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type NodeResourcesBalancedAllocatedArgs ¶
type NodeResourcesBalancedAllocatedArgs struct { metav1.TypeMeta `json:",inline"` // Resources to be considered when scoring. // The default resource set includes "cpu" and "memory" with an equal weight. // Allowed weights go from 1 to 100. Resources []ResourceSpec `json:"resources,omitempty"` }
NodeResourcesBalancedAllocatedArgs holds arguments used to configure NodeResourcesLeastAllocated plugin.
func (*NodeResourcesBalancedAllocatedArgs) DeepCopy ¶
func (in *NodeResourcesBalancedAllocatedArgs) DeepCopy() *NodeResourcesBalancedAllocatedArgs
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeResourcesBalancedAllocatedArgs.
func (*NodeResourcesBalancedAllocatedArgs) DeepCopyInto ¶
func (in *NodeResourcesBalancedAllocatedArgs) DeepCopyInto(out *NodeResourcesBalancedAllocatedArgs)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*NodeResourcesBalancedAllocatedArgs) DeepCopyObject ¶
func (in *NodeResourcesBalancedAllocatedArgs) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type NodeResourcesFitArgs ¶
type NodeResourcesFitArgs struct { metav1.TypeMeta `json:",inline"` // IgnoredResources is the list of resources that NodeResources fit filter // should ignore. IgnoredResources []string `json:"ignoredResources,omitempty"` // IgnoredResourceGroups defines the list of resource groups that NodeResources fit filter should ignore. // e.g. if group is ["example.com"], it will ignore all resource names that begin // with "example.com", such as "example.com/aaa" and "example.com/bbb". // A resource group name can't contain '/'. IgnoredResourceGroups []string `json:"ignoredResourceGroups,omitempty"` }
NodeResourcesFitArgs holds arguments used to configure the NodeResourcesFit plugin.
func (*NodeResourcesFitArgs) DeepCopy ¶
func (in *NodeResourcesFitArgs) DeepCopy() *NodeResourcesFitArgs
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeResourcesFitArgs.
func (*NodeResourcesFitArgs) DeepCopyInto ¶
func (in *NodeResourcesFitArgs) DeepCopyInto(out *NodeResourcesFitArgs)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*NodeResourcesFitArgs) DeepCopyObject ¶
func (in *NodeResourcesFitArgs) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type NodeResourcesLeastAllocatedArgs ¶
type NodeResourcesLeastAllocatedArgs struct { metav1.TypeMeta `json:",inline"` // Resources to be considered when scoring. // The default resource set includes "cpu" and "memory" with an equal weight. // Allowed weights go from 1 to 100. Resources []ResourceSpec `json:"resources,omitempty"` }
NodeResourcesLeastAllocatedArgs holds arguments used to configure NodeResourcesLeastAllocated plugin.
func (*NodeResourcesLeastAllocatedArgs) DeepCopy ¶
func (in *NodeResourcesLeastAllocatedArgs) DeepCopy() *NodeResourcesLeastAllocatedArgs
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeResourcesLeastAllocatedArgs.
func (*NodeResourcesLeastAllocatedArgs) DeepCopyInto ¶
func (in *NodeResourcesLeastAllocatedArgs) DeepCopyInto(out *NodeResourcesLeastAllocatedArgs)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*NodeResourcesLeastAllocatedArgs) DeepCopyObject ¶
func (in *NodeResourcesLeastAllocatedArgs) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type NodeResourcesMostAllocatedArgs ¶
type NodeResourcesMostAllocatedArgs struct { metav1.TypeMeta `json:",inline"` // Resources to be considered when scoring. // The default resource set includes "cpu" and "memory" with an equal weight. // Allowed weights go from 1 to 100. Resources []ResourceSpec `json:"resources,omitempty"` }
NodeResourcesMostAllocatedArgs holds arguments used to configure NodeResourcesMostAllocated plugin.
func (*NodeResourcesMostAllocatedArgs) DeepCopy ¶
func (in *NodeResourcesMostAllocatedArgs) DeepCopy() *NodeResourcesMostAllocatedArgs
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeResourcesMostAllocatedArgs.
func (*NodeResourcesMostAllocatedArgs) DeepCopyInto ¶
func (in *NodeResourcesMostAllocatedArgs) DeepCopyInto(out *NodeResourcesMostAllocatedArgs)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*NodeResourcesMostAllocatedArgs) DeepCopyObject ¶
func (in *NodeResourcesMostAllocatedArgs) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type Plugin ¶
type Plugin struct { // Name defines the name of plugin Name string `json:"name"` // Weight defines the weight of plugin, only used for Score plugins. Weight int64 `json:"weight,omitempty"` }
Plugin specifies a plugin name and its weight when applicable. Weight is used only for Score plugins.
func (*Plugin) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Plugin.
func (*Plugin) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PluginConfig ¶
type PluginConfig struct { // Name defines the name of plugin being configured Name string `json:"name"` // Args defines the arguments passed to the plugins at the time of initialization. Args can have arbitrary structure. Args runtime.RawExtension `json:"args,omitempty"` }
PluginConfig specifies arguments that should be passed to a plugin at the time of initialization. A plugin that is invoked at multiple extension points is initialized once. Args can have arbitrary structure. It is up to the plugin to process these Args.
func (*PluginConfig) DecodeNestedObjects ¶
func (c *PluginConfig) DecodeNestedObjects(d runtime.Decoder) error
func (*PluginConfig) DeepCopy ¶
func (in *PluginConfig) DeepCopy() *PluginConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PluginConfig.
func (*PluginConfig) DeepCopyInto ¶
func (in *PluginConfig) DeepCopyInto(out *PluginConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PluginConfig) EncodeNestedObjects ¶
func (c *PluginConfig) EncodeNestedObjects(e runtime.Encoder) error
type PluginSet ¶
type PluginSet struct { // Plugins specifies plugins that should be used. // These are called after default plugins and in the same order specified here. Plugins []Plugin `json:"plugins,omitempty"` }
PluginSet specifies enabled and disabled plugins for an extension point. If an array is empty, missing, or nil, default plugins at that extension point will be used.
func (*PluginSet) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PluginSet.
func (*PluginSet) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Plugins ¶
type Plugins struct { // Filter is a list of plugins that should be invoked when filtering out nodes that cannot run the Pod. Filter *PluginSet `json:"filter,omitempty"` // Score is a list of plugins that should be invoked when ranking nodes that have passed the filtering phase. Score *PluginSet `json:"score,omitempty"` // Preemption is a list of plugins that should be invoked in preemption phase VictimSearching *VictimSearchingPluginSet `json:"victimSearching,omitempty"` Sorting *PluginSet `json:"sorting,omitempty"` }
Plugins include multiple extension points. When specified, the list of plugins for a particular extension point are the only ones enabled. If an extension point is omitted from the config, then the default set of plugins is used for that extension point. Plugins plugins are called in the order specified here, after default plugins. If they need to be invoked before default plugins, default plugins must be disabled and re-enabled here in desired order.
func (*Plugins) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Plugins.
func (*Plugins) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PodTopologySpreadArgs ¶
type PodTopologySpreadArgs struct { metav1.TypeMeta `json:",inline"` // DefaultConstraints defines topology spread constraints to be applied to // pods that don't define any in `pod.spec.topologySpreadConstraints`. // `topologySpreadConstraint.labelSelectors` must be empty, as they are // deduced the pods' membership to Services, Replication Controllers, Replica // Sets or Stateful Sets. // Empty by default. DefaultConstraints []v1.TopologySpreadConstraint `json:"defaultConstraints,omitempty"` }
PodTopologySpreadArgs holds arguments used to configure the PodTopologySpread plugin.
func (*PodTopologySpreadArgs) DeepCopy ¶
func (in *PodTopologySpreadArgs) DeepCopy() *PodTopologySpreadArgs
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodTopologySpreadArgs.
func (*PodTopologySpreadArgs) DeepCopyInto ¶
func (in *PodTopologySpreadArgs) DeepCopyInto(out *PodTopologySpreadArgs)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PodTopologySpreadArgs) DeepCopyObject ¶
func (in *PodTopologySpreadArgs) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type RequestedToCapacityRatioArgs ¶
type RequestedToCapacityRatioArgs struct { metav1.TypeMeta `json:",inline"` // Points defining priority function shape Shape []UtilizationShapePoint `json:"shape"` // Resources to be considered when scoring. // The default resource set includes "cpu" and "memory" with an equal weight. // Allowed weights go from 1 to 100. Resources []ResourceSpec `json:"resources,omitempty"` }
RequestedToCapacityRatioArgs holds arguments used to configure RequestedToCapacityRatio plugin.
func (*RequestedToCapacityRatioArgs) DeepCopy ¶
func (in *RequestedToCapacityRatioArgs) DeepCopy() *RequestedToCapacityRatioArgs
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RequestedToCapacityRatioArgs.
func (*RequestedToCapacityRatioArgs) DeepCopyInto ¶
func (in *RequestedToCapacityRatioArgs) DeepCopyInto(out *RequestedToCapacityRatioArgs)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*RequestedToCapacityRatioArgs) DeepCopyObject ¶
func (in *RequestedToCapacityRatioArgs) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ResourceMatchFactor ¶
type ResourceMatchFactor struct { // Name of the resource. Name string `json:"name"` // Match factor of the resource Factor float64 `json:"factor"` }
func (*ResourceMatchFactor) DeepCopy ¶
func (in *ResourceMatchFactor) DeepCopy() *ResourceMatchFactor
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceMatchFactor.
func (*ResourceMatchFactor) DeepCopyInto ¶
func (in *ResourceMatchFactor) DeepCopyInto(out *ResourceMatchFactor)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceSpec ¶
type ResourceSpec struct { // Name of the resource. Name string `json:"name"` // Weight of the resource. Weight int64 `json:"weight,omitempty"` // ResourceType of the resource, such as guaranteed, best-effort. ResourceType podutil.PodResourceType `json:"resourceType,omitempty"` }
ResourceSpec represents single resource.
func (*ResourceSpec) DeepCopy ¶
func (in *ResourceSpec) DeepCopy() *ResourceSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceSpec.
func (*ResourceSpec) DeepCopyInto ¶
func (in *ResourceSpec) DeepCopyInto(out *ResourceSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ScorePolicy ¶
type ScorePolicy string
const ( ScorePolicyMostAvailable ScorePolicy = "MostAvailable" ScorePolicyLeastAvailable ScorePolicy = "LeastAvailable" )
type ServiceAffinityArgs ¶
type ServiceAffinityArgs struct { metav1.TypeMeta `json:",inline"` // AffinityLabels 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:"affinityLabels,omitempty"` // AntiAffinityLabelsPreference are the labels to consider for service anti affinity scoring. AntiAffinityLabelsPreference []string `json:"antiAffinityLabelsPreference,omitempty"` }
ServiceAffinityArgs holds arguments used to configure the ServiceAffinity plugin.
func (*ServiceAffinityArgs) DeepCopy ¶
func (in *ServiceAffinityArgs) DeepCopy() *ServiceAffinityArgs
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceAffinityArgs.
func (*ServiceAffinityArgs) DeepCopyInto ¶
func (in *ServiceAffinityArgs) DeepCopyInto(out *ServiceAffinityArgs)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ServiceAffinityArgs) DeepCopyObject ¶
func (in *ServiceAffinityArgs) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type StartRecentlyArgs ¶
type StartRecentlyArgs struct { metav1.TypeMeta `json:",inline"` // only if pod started more than this time duration, it could be preempted PreemptMinIntervalSeconds *int64 `json:"preemptMinIntervalSeconds,omitempty"` }
StartRecentlyArgs holds arguments used to configure the StartRecently plugin.
func (*StartRecentlyArgs) DeepCopy ¶
func (in *StartRecentlyArgs) DeepCopy() *StartRecentlyArgs
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StartRecentlyArgs.
func (*StartRecentlyArgs) DeepCopyInto ¶
func (in *StartRecentlyArgs) DeepCopyInto(out *StartRecentlyArgs)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*StartRecentlyArgs) DeepCopyObject ¶
func (in *StartRecentlyArgs) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type StringSlice ¶
type StringSlice []string
func (StringSlice) DeepCopy ¶
func (in StringSlice) DeepCopy() StringSlice
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StringSlice.
func (StringSlice) DeepCopyInto ¶
func (in StringSlice) DeepCopyInto(out *StringSlice)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type UtilizationShapePoint ¶
type UtilizationShapePoint struct { // Utilization (x axis). Valid values are 0 to 100. Fully utilized node maps to 100. Utilization int32 `json:"utilization"` // Score assigned to a given utilization (y axis). Valid values are 0 to 10. Score int32 `json:"score"` }
UtilizationShapePoint represents a single point of a priority function shape.
func (*UtilizationShapePoint) DeepCopy ¶
func (in *UtilizationShapePoint) DeepCopy() *UtilizationShapePoint
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UtilizationShapePoint.
func (*UtilizationShapePoint) DeepCopyInto ¶
func (in *UtilizationShapePoint) DeepCopyInto(out *UtilizationShapePoint)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VictimSearchingPluginCollection ¶
type VictimSearchingPluginCollection struct { // if ForceQuickPass is true and result is PreemptionSucceed, return canBePreempted=true directly, no need to execute the rest of the preemption plugins ForceQuickPass bool `json:"forceQuickPass,omitempty"` // if EnableQuickPass is true and result is PreemptionSucceed, return canBePreempted=true directly, no need to execute the rest of the preemption plugins EnableQuickPass bool `json:"enableQuickPass,omitempty"` // if RejectNotSure is true and result is PreemptionNotSure, return PreemptFail RejectNotSure bool `json:"rejectNotSure,omitempty"` // PreemptionPlugins specifies preemption plugins in this collection Plugins []Plugin `json:"plugins,omitempty"` }
func (*VictimSearchingPluginCollection) DeepCopy ¶
func (in *VictimSearchingPluginCollection) DeepCopy() *VictimSearchingPluginCollection
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VictimSearchingPluginCollection.
func (*VictimSearchingPluginCollection) DeepCopyInto ¶
func (in *VictimSearchingPluginCollection) DeepCopyInto(out *VictimSearchingPluginCollection)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VictimSearchingPluginSet ¶
type VictimSearchingPluginSet struct { // PreemptionPlugins specifies preemption plugin collections that should be used. PluginCollections []VictimSearchingPluginCollection `json:"pluginCollections,omitempty"` }
PreemptionPluginSet specifies enabled and disabled plugins for an extension point. If an array is empty, missing, or nil, default plugins at that extension point will be used.
func (*VictimSearchingPluginSet) DeepCopy ¶
func (in *VictimSearchingPluginSet) DeepCopy() *VictimSearchingPluginSet
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VictimSearchingPluginSet.
func (*VictimSearchingPluginSet) DeepCopyInto ¶
func (in *VictimSearchingPluginSet) DeepCopyInto(out *VictimSearchingPluginSet)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VolumeBindingArgs ¶
type VolumeBindingArgs struct { metav1.TypeMeta `json:",inline"` // BindTimeoutSeconds is the timeout in seconds in volume binding operation. // Value must be non-negative integer. The value zero indicates no waiting. // If this value is nil, the default value will be used. BindTimeoutSeconds int64 `json:"bindTimeoutSeconds"` }
VolumeBindingArgs holds arguments used to configure the VolumeBinding plugin.
func (*VolumeBindingArgs) DeepCopy ¶
func (in *VolumeBindingArgs) DeepCopy() *VolumeBindingArgs
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeBindingArgs.
func (*VolumeBindingArgs) DeepCopyInto ¶
func (in *VolumeBindingArgs) DeepCopyInto(out *VolumeBindingArgs)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*VolumeBindingArgs) DeepCopyObject ¶
func (in *VolumeBindingArgs) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.