terminator

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2024 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsNodeDrainError

func IsNodeDrainError(err error) bool

Types

type NodeDrainError

type NodeDrainError struct {
	// contains filtered or unexported fields
}

func NewNodeDrainError

func NewNodeDrainError(err error) *NodeDrainError

type Queue

type Queue struct {
	workqueue.RateLimitingInterface
	// contains filtered or unexported fields
}

func NewQueue

func NewQueue(kubeClient client.Client, recorder events.Recorder) *Queue

func (*Queue) Add

func (q *Queue) Add(pods ...*corev1.Pod)

Add adds pods to the Queue

func (*Queue) Evict

func (q *Queue) Evict(ctx context.Context, key QueueKey) bool

Evict returns true if successful eviction call, and false if there was an eviction-related error

func (*Queue) Has added in v0.33.3

func (q *Queue) Has(pod *corev1.Pod) bool

func (*Queue) Reconcile

func (q *Queue) Reconcile(ctx context.Context) (reconcile.Result, error)

func (*Queue) Register added in v0.37.0

func (q *Queue) Register(_ context.Context, m manager.Manager) error

func (*Queue) Reset

func (q *Queue) Reset()

type QueueKey added in v0.33.3

type QueueKey struct {
	types.NamespacedName
	UID types.UID
}

func NewQueueKey added in v0.33.3

func NewQueueKey(pod *corev1.Pod) QueueKey

type Terminator

type Terminator struct {
	// contains filtered or unexported fields
}

func NewTerminator

func NewTerminator(clk clock.Clock, kubeClient client.Client, eq *Queue, recorder events.Recorder) *Terminator

func (*Terminator) DeleteExpiringPods added in v1.0.0

func (t *Terminator) DeleteExpiringPods(ctx context.Context, pods []*corev1.Pod, nodeGracePeriodTerminationTime *time.Time) error

func (*Terminator) Drain

func (t *Terminator) Drain(ctx context.Context, node *corev1.Node, nodeGracePeriodExpirationTime *time.Time) error

Drain evicts pods from the node and returns true when all pods are evicted https://kubernetes.io/docs/concepts/architecture/nodes/#graceful-node-shutdown

func (*Terminator) Evict

func (t *Terminator) Evict(pods []*corev1.Pod)

func (*Terminator) EvictInOrder added in v1.0.0

func (t *Terminator) EvictInOrder(pods ...[]*corev1.Pod)

func (*Terminator) Taint

func (t *Terminator) Taint(ctx context.Context, node *corev1.Node, taint corev1.Taint) error

Taint idempotently adds a given taint to a node with a NodeClaim

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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