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 predicatechecker.PredicateChecker // ClusterSnapshot denotes cluster snapshot used for predicate checking. ClusterSnapshot clustersnapshot.ClusterSnapshot // ExpanderStrategy is the strategy used to choose which node group to expand when scaling up ExpanderStrategy expander.Strategy // ProcessorCallbacks is interface defining extra callback methods which can be called by processors used in extension points. ProcessorCallbacks processor_callbacks.ProcessorCallbacks // DebuggingSnapshotter is the interface for capturing the debugging snapshot DebuggingSnapshotter debuggingsnapshot.DebuggingSnapshotter // ScaleDownActuator is the interface for draining and deleting nodes ScaleDownActuator scaledown.Actuator // RemainingPdbTracker tracks the remaining pod disruption budget RemainingPdbTracker pdb.RemainingPdbTracker // ClusterStateRegistry tracks the health of the node groups and pending scale-ups and scale-downs ClusterStateRegistry *clusterstate.ClusterStateRegistry //ProvisionRequstScaleUpMode indicates whether ClusterAutoscaler tries to accommodate ProvisioningRequest in current scale up iteration. ProvisioningRequestScaleUpMode bool }
AutoscalingContext contains user-configurable constant and configuration-related objects passed to scale up/scale down functions.
func NewAutoscalingContext ¶
func NewAutoscalingContext( options config.AutoscalingOptions, predicateChecker predicatechecker.PredicateChecker, clusterSnapshot clustersnapshot.ClusterSnapshot, autoscalingKubeClients *AutoscalingKubeClients, cloudProvider cloudprovider.CloudProvider, expanderStrategy expander.Strategy, processorCallbacks processor_callbacks.ProcessorCallbacks, debuggingSnapshotter debuggingsnapshot.DebuggingSnapshotter, remainingPdbTracker pdb.RemainingPdbTracker, clusterStateRegistry *clusterstate.ClusterStateRegistry, ) *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 kube_client.Interface, informerFactory informers.SharedInformerFactory) *AutoscalingKubeClients
NewAutoscalingKubeClients builds AutoscalingKubeClients out of basic client.
Click to show internal directories.
Click to hide internal directories.