Documentation
¶
Index ¶
- Constants
- func NewLoadAware(args runtime.Object, handle types.Handle) (types.Plugin, error)
- func SetDefaults_LoadAwareArgs(obj runtime.Object)
- func ValidateLoadAwareArgs(obj runtime.Object) error
- type LoadAware
- type LoadAwareArgs
- type Metrics
- type MetricsClient
- type NodeInfo
- type NodeMetrics
- type NodeThresholds
- type NodeUsage
- type PrometheusMetricsClient
Constants ¶
View Source
const ( // MinResourcePercentage is the minimum value of a resource's percentage MinResourcePercentage = 0 // MaxResourcePercentage is the maximum value of a resource's percentage MaxResourcePercentage = 100 )
View Source
const LoadAwarePluginName = "LoadAware"
Variables ¶
This section is empty.
Functions ¶
func NewLoadAware ¶
NewLoadAware builds plugin from its arguments while passing a handle
func ValidateLoadAwareArgs ¶
Types ¶
type LoadAware ¶
type LoadAware struct {
// contains filtered or unexported fields
}
type LoadAwareArgs ¶
type LoadAwareArgs struct { metav1.TypeMeta `json:"inline"` UseDeviationThresholds bool `json:"useDeviationThresholds"` Thresholds api.ResourceThresholds `json:"thresholds"` TargetThresholds api.ResourceThresholds `json:"targetThresholds"` NumberOfNodes int `json:"numberOfNodes"` // Naming this one differently since namespaces are still // considered while considering resources used by pods // but then filtered out before eviction EvictableNamespaces *api.Namespaces `json:"evictableNamespaces"` MetricsConfiguration Metrics `json:"metrics"` }
func (*LoadAwareArgs) DeepCopy ¶
func (in *LoadAwareArgs) DeepCopy() *LoadAwareArgs
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HighNodeUtilizationArgs.
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 MetricsClient ¶
type MetricsClient interface {
NodeMetricsAvg(ctx context.Context, nodeName string, period string) (*NodeMetrics, error)
}
func NewMetricsClient ¶
func NewMetricsClient(metricsConf Metrics) (MetricsClient, error)
type NodeMetrics ¶
type NodeThresholds ¶
type NodeThresholds struct {
// contains filtered or unexported fields
}
type NodeUsage ¶
type NodeUsage struct {
// contains filtered or unexported fields
}
NodeUsage stores a node's info, pods on it, thresholds and its resource usage
type PrometheusMetricsClient ¶
type PrometheusMetricsClient struct {
// contains filtered or unexported fields
}
func NewPrometheusMetricsClient ¶
func NewPrometheusMetricsClient(address string, conf Metrics) (*PrometheusMetricsClient, error)
func (*PrometheusMetricsClient) NodeMetricsAvg ¶
func (p *PrometheusMetricsClient) NodeMetricsAvg(ctx context.Context, nodeName string, period string) (*NodeMetrics, error)
Click to show internal directories.
Click to hide internal directories.