terminator

package
v0.34.4 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2024 License: Apache-2.0 Imports: 25 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 ...*v1.Pod)

Add adds pods to the Queue

func (*Queue) Builder

func (*Queue) Evict

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

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

func (*Queue) Has added in v0.33.3

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

func (*Queue) Name

func (q *Queue) Name() string

func (*Queue) Reconcile

func (q *Queue) Reconcile(ctx context.Context, _ reconcile.Request) (reconcile.Result, 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 *v1.Pod) QueueKey

type Terminator

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

func NewTerminator

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

func (*Terminator) Drain

func (t *Terminator) Drain(ctx context.Context, node *v1.Node) 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 []*v1.Pod)

func (*Terminator) Taint

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

Taint idempotently adds the karpenter.sh/disruption 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