Documentation ¶
Index ¶
- Variables
- type OnDemandJob
- func NewOnDemandCreateJob(podNamespace string, podName string, requestCount int) OnDemandJob
- func NewOnDemandDeleteNodeJob(nodeName string) OnDemandJob
- func NewOnDemandDeletedJob(nodeName string, uid types.UID) OnDemandJob
- func NewOnDemandProcessDeleteQueueJob(nodeName string) OnDemandJob
- func NewOnDemandReconcileNodeJob(nodeName string) OnDemandJob
- type Operations
- type WarmPoolJob
- type Worker
Constants ¶
This section is empty.
Variables ¶
var (
WorkersAlreadyStartedError = errors.New("failed to start the workers as they are already running")
)
Errors
Functions ¶
This section is empty.
Types ¶
type OnDemandJob ¶
type OnDemandJob struct { // Operation is the type of operation to perform on the given pod Operation Operations // UID is the unique ID of the pod UID string // PodName is the name of the pod PodName string // PodNamespace is the pod's namespace PodNamespace string // RequestCount is the number of resources to create for operations of type Create. Optional for other operations RequestCount int // NodeName is the k8s node name NodeName string }
OnDemandJob represents the job that will be executed by the respective worker
func NewOnDemandCreateJob ¶
func NewOnDemandCreateJob(podNamespace string, podName string, requestCount int) OnDemandJob
NewOnDemandDeleteJob returns an on demand job for operation Create or Update
func NewOnDemandDeleteNodeJob ¶
func NewOnDemandDeleteNodeJob(nodeName string) OnDemandJob
NewOnDemandDeleteNodeJob returns a delete node job
func NewOnDemandDeletedJob ¶
func NewOnDemandDeletedJob(nodeName string, uid types.UID) OnDemandJob
NewOnDemandDeleteJob returns an on demand job for operation Deleted
func NewOnDemandProcessDeleteQueueJob ¶
func NewOnDemandProcessDeleteQueueJob(nodeName string) OnDemandJob
NewOnDemandProcessDeleteQueueJob returns a process delete queue job
func NewOnDemandReconcileNodeJob ¶
func NewOnDemandReconcileNodeJob(nodeName string) OnDemandJob
NewOnDemandReconcileJob returns a reconcile job
type Operations ¶
type Operations string
Operations are the supported operations for on demand resource handler
const ( OperationProcessDeleteQueue Operations = "ProcessDeleteQueue" // OperationReconcileNode represents a reconcile operation that reclaims dangling network interfaces using local cache OperationReconcileNode Operations = "ReconcileNode" // OperationCreate represents pods that are in created state OperationCreate Operations = "Create" // OperationDelete represents pods that have been deleted OperationDeleted Operations = "Deleted" // OperationDeleting represents pods that are being deleted OperationDeleting Operations = "Deleting" // OperationReconcileNotRequired represents job that don't need execution OperationReconcileNotRequired Operations = "NoReconcile" // OperationReSyncPool represents a job to re-sync a dirty pool OperationReSyncPool Operations = "ReSyncPool" // OperationDeleteNode represents the job to delete the node OperationDeleteNode Operations = "NodeDelete" )
type WarmPoolJob ¶
type WarmPoolJob struct { // Operation is the type of operation on warm pool Operations Operations // Resources can hold the resource to delete or the created resources Resources []string // ResourceCount is the number of resource to be created ResourceCount int // NodeName is the name of the node NodeName string }
WarmPoolJob represents the job for a resource handler for warm pool resources
func NewWarmPoolCreateJob ¶
func NewWarmPoolCreateJob(nodeName string, count int) *WarmPoolJob
NewWarmPoolCreateJob returns a job on warm pool of resource
func NewWarmPoolDeleteJob ¶
func NewWarmPoolDeleteJob(nodeName string, resourcesToDelete []string) *WarmPoolJob
func NewWarmPoolReSyncJob ¶ added in v1.1.0
func NewWarmPoolReSyncJob(nodeName string) *WarmPoolJob
NewWarmPoolReSyncJob returns a job to re-sync the warm pool with upstream
func NewWarmProcessDeleteQueueJob ¶
func NewWarmProcessDeleteQueueJob(nodeName string) *WarmPoolJob