Documentation
¶
Overview ¶
Package kpa implements a kubernetes controller which tracks revisions and notifies a callback interface.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewController ¶
func NewController( opts *reconciler.Options, paInformer informers.PodAutoscalerInformer, sksInformer ninformers.ServerlessServiceInformer, serviceInformer corev1informers.ServiceInformer, endpointsInformer corev1informers.EndpointsInformer, kpaDeciders Deciders, metrics Metrics, ) *controller.Impl
NewController creates an autoscaling Controller.
Types ¶
type Deciders ¶
type Deciders interface {
// Get accesses the Decider resource for this key, returning any errors.
Get(ctx context.Context, namespace, name string) (*autoscaler.Decider, error)
// Create adds a Decider resource for a given key, returning any errors.
Create(ctx context.Context, decider *autoscaler.Decider) (*autoscaler.Decider, error)
// Delete removes the Decider resource for a given key, returning any errors.
Delete(ctx context.Context, namespace, name string) error
// Watch registers a function to call when Decider change.
Watch(watcher func(string))
// Update update the Decider resource, return the new Decider or any errors.
Update(ctx context.Context, decider *autoscaler.Decider) (*autoscaler.Decider, error)
}
Deciders is an interface for notifying the presence or absence of KPAs.
type Metrics ¶
type Metrics interface {
// Get accesses the Metric resource for this key, returning any errors.
Get(ctx context.Context, namespace, name string) (*autoscaler.Metric, error)
// Create adds a Metric resource for a given key, returning any errors.
Create(ctx context.Context, metric *autoscaler.Metric) (*autoscaler.Metric, error)
// Delete removes the Metric resource for a given key, returning any errors.
Delete(ctx context.Context, namespace, name string) error
// Update update the Metric resource, return the new Metric or any errors.
Update(ctx context.Context, metric *autoscaler.Metric) (*autoscaler.Metric, error)
}
Metrics is an interface for notifying the presence or absence of metric collection.
type Reconciler ¶
type Reconciler struct {
*reconciler.Base
// contains filtered or unexported fields
}
Reconciler tracks PAs and right sizes the ScaleTargetRef based on the information from Deciders.
Click to show internal directories.
Click to hide internal directories.