Documentation ¶
Index ¶
Constants ¶
const ( // InjectedMetricsLabel is the label for unschedulable pods metric for injected pods. InjectedMetricsLabel = "injected" // SkippedInjectionMetricsLabel is the label for unschedulable pods metric for pods that was not injected due to limit. SkippedInjectionMetricsLabel = "skipped_injection" )
const ( // FakePodAnnotationKey the key for pod type FakePodAnnotationKey = "podtype" // FakePodAnnotationValue the value for a fake pod FakePodAnnotationValue = "fakepod" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type EnforceInjectedPodsLimitProcessor ¶
type EnforceInjectedPodsLimitProcessor struct {
// contains filtered or unexported fields
}
EnforceInjectedPodsLimitProcessor is a PodListProcessor used to limit the number of injected fake pods.
func NewEnforceInjectedPodsLimitProcessor ¶
func NewEnforceInjectedPodsLimitProcessor(podLimit int) *EnforceInjectedPodsLimitProcessor
NewEnforceInjectedPodsLimitProcessor return an instance of EnforceInjectedPodsLimitProcessor
func (*EnforceInjectedPodsLimitProcessor) CleanUp ¶
func (p *EnforceInjectedPodsLimitProcessor) CleanUp()
CleanUp is called at CA termination
func (*EnforceInjectedPodsLimitProcessor) Process ¶
func (p *EnforceInjectedPodsLimitProcessor) Process(ctx *context.AutoscalingContext, unschedulablePods []*apiv1.Pod) ([]*apiv1.Pod, error)
Process filters unschedulablePods and enforces the limit of the number of injected pods
type FakePodsScaleUpStatusProcessor ¶
type FakePodsScaleUpStatusProcessor struct {
// contains filtered or unexported fields
}
FakePodsScaleUpStatusProcessor is a ScaleUpStatusProcessor used for filtering out fake pods from scaleup status.
func NewFakePodsScaleUpStatusProcessor ¶
func NewFakePodsScaleUpStatusProcessor(fakePodRegistry *podinjectionbackoff.ControllerRegistry) *FakePodsScaleUpStatusProcessor
NewFakePodsScaleUpStatusProcessor return an instance of FakePodsScaleUpStatusProcessor
func (*FakePodsScaleUpStatusProcessor) CleanUp ¶
func (a *FakePodsScaleUpStatusProcessor) CleanUp()
CleanUp is called at CA termination
func (*FakePodsScaleUpStatusProcessor) Process ¶
func (a *FakePodsScaleUpStatusProcessor) Process(_ *ca_context.AutoscalingContext, scaleUpStatus *status.ScaleUpStatus)
Process updates scaleupStatus to remove all fake pods from PodsRemainUnschedulable, PodsAwaitEvaluation & PodsTriggeredScaleup
type PodInjectionPodListProcessor ¶
type PodInjectionPodListProcessor struct {
// contains filtered or unexported fields
}
PodInjectionPodListProcessor is a PodListProcessor used to inject fake pods to consider replica count in the respective controllers for the scale-up. For each controller, #fake pods injected = #replicas specified the controller - #scheduled pods - #finished pods - #unschedulable pods
func NewPodInjectionPodListProcessor ¶
func NewPodInjectionPodListProcessor(fakePodRegistry *podinjectionbackoff.ControllerRegistry) *PodInjectionPodListProcessor
NewPodInjectionPodListProcessor return an instance of PodInjectionPodListProcessor
func (*PodInjectionPodListProcessor) CleanUp ¶
func (p *PodInjectionPodListProcessor) CleanUp()
CleanUp is called at CA termination
func (*PodInjectionPodListProcessor) Process ¶
func (p *PodInjectionPodListProcessor) Process(ctx *context.AutoscalingContext, unschedulablePods []*apiv1.Pod) ([]*apiv1.Pod, error)
Process updates unschedulablePods by injecting fake pods to match target replica count