Version: v1.1.0 Latest Latest

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

Go to latest
Published: Oct 5, 2021 License: Apache-2.0 Imports: 10 Imported by: 0




View Source
const (
	RequeueAfterWhenWPEmpty         = time.Millisecond * 600
	RequeueAfterWhenResourceCooling = time.Second * 20
	ReasonResourceAllocationFailed  = "ResourceAllocationFailed"
	ReasonResourceAllocated         = "ResourceAllocated"


This section is empty.


This section is empty.


type Handler

type Handler interface {
	HandleCreate(requestCount int, pod *v1.Pod) (ctrl.Result, error)
	HandleDelete(pod *v1.Pod) (ctrl.Result, error)

Handler interface allows different types of resource implementation to be clubbed under a single handler. For instance, warm resource handler would handle all the types of resources that support warm pools. An example of warm pool resource is IPv4. Another example of handler is on demand handler, resources that can be only processed on demand would fit into this category. For instance, Branch ENIs are tied to the Security Group required by the pod which we would know only after receiving the pod request.

func NewOnDemandHandler

func NewOnDemandHandler(log logr.Logger, resourceName string,
	ondDemandProvider provider.ResourceProvider) Handler

NewOnDemandHandler returns a new on demand handler with all the workers that can handle particular resource types

func NewWarmResourceHandler

func NewWarmResourceHandler(log logr.Logger, wrapper api.Wrapper,
	resourceName string, resourceProviders provider.ResourceProvider, ctx context.Context) Handler

Jump to

Keyboard shortcuts

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