termination

package
v0.18.1 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2022 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsNodeDrainErr added in v0.14.0

func IsNodeDrainErr(err error) bool

Types

type Controller

type Controller struct {
	Terminator *Terminator
	KubeClient client.Client
	Recorder   events.Recorder

	TerminationRecord sets.String
	// contains filtered or unexported fields
}

Controller for the resource

func NewController

func NewController(ctx context.Context, clk clock.Clock, kubeClient client.Client, coreV1Client corev1.CoreV1Interface, recorder events.Recorder, cloudProvider cloudprovider.CloudProvider) *Controller

NewController constructs a controller instance

func (*Controller) Reconcile

func (c *Controller) Reconcile(ctx context.Context, req reconcile.Request) (reconcile.Result, error)

Reconcile executes a termination control loop for the resource

func (*Controller) Register

func (c *Controller) Register(_ context.Context, m manager.Manager) error

type EvictionQueue

type EvictionQueue struct {
	workqueue.RateLimitingInterface
	set.Set
	// contains filtered or unexported fields
}

func NewEvictionQueue

func NewEvictionQueue(ctx context.Context, coreV1Client corev1.CoreV1Interface, recorder events.Recorder) *EvictionQueue

func (*EvictionQueue) Add

func (e *EvictionQueue) Add(pods []*v1.Pod)

Add adds pods to the EvictionQueue

func (*EvictionQueue) Start

func (e *EvictionQueue) Start(ctx context.Context)

type NodeDrainErr added in v0.14.0

type NodeDrainErr error

type Terminator

type Terminator struct {
	EvictionQueue *EvictionQueue
	KubeClient    client.Client
	CoreV1Client  corev1.CoreV1Interface
	CloudProvider cloudprovider.CloudProvider
	Clock         clock.Clock
}

Jump to

Keyboard shortcuts

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