context

package
v0.0.0-...-386b7fa Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 14, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewResourceLimiterFromAutoscalingOptions

func NewResourceLimiterFromAutoscalingOptions(options config.AutoscalingOptions) *cloudprovider.ResourceLimiter

NewResourceLimiterFromAutoscalingOptions creates new instance of cloudprovider.ResourceLimiter reading limits from AutoscalingOptions struct.

Types

type AutoscalingContext

type AutoscalingContext struct {
	// Options to customize how autoscaling works
	config.AutoscalingOptions
	// Kubernetes API clients.
	AutoscalingKubeClients
	// CloudProvider used in CA.
	CloudProvider cloudprovider.CloudProvider
	// TODO(kgolab) - move away too as it's not config
	// PredicateChecker to check if a pod can fit into a node.
	PredicateChecker *simulator.PredicateChecker
	// ExpanderStrategy is the strategy used to choose which node group to expand when scaling up
	ExpanderStrategy expander.Strategy
	// EstimatorBuilder is the builder function for node count estimator to be used.
	EstimatorBuilder estimator.EstimatorBuilder
	// ProcessorCallbacks is interface defining extra callback methods which can be called by processors used in extension points.
	ProcessorCallbacks processor_callbacks.ProcessorCallbacks
}

AutoscalingContext contains user-configurable constant and configuration-related objects passed to scale up/scale down functions.

func NewAutoscalingContext

func NewAutoscalingContext(options config.AutoscalingOptions, predicateChecker *simulator.PredicateChecker,
	autoscalingKubeClients *AutoscalingKubeClients, cloudProvider cloudprovider.CloudProvider,
	expanderStrategy expander.Strategy, estimatorBuilder estimator.EstimatorBuilder,
	processorCallbacks processor_callbacks.ProcessorCallbacks) *AutoscalingContext

NewAutoscalingContext returns an autoscaling context from all the necessary parameters passed via arguments

type AutoscalingKubeClients

type AutoscalingKubeClients struct {
	// Listers.
	kube_util.ListerRegistry
	// ClientSet interface.
	ClientSet kube_client.Interface
	// Recorder for recording events.
	Recorder kube_record.EventRecorder
	// LogRecorder can be used to collect log messages to expose via Events on some central object.
	LogRecorder *utils.LogEventRecorder
}

AutoscalingKubeClients contains all Kubernetes API clients, including listers and event recorders.

func NewAutoscalingKubeClients

func NewAutoscalingKubeClients(opts config.AutoscalingOptions, kubeClient, eventsKubeClient kube_client.Interface) *AutoscalingKubeClients

NewAutoscalingKubeClients builds AutoscalingKubeClients out of basic client.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL