orchestration

package
v0.33.9 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2024 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsUnrecoverableError

func IsUnrecoverableError(err error) bool

Types

type Command

type Command struct {
	Replacements []Replacement
	// contains filtered or unexported fields
}

func NewCommand

func NewCommand(replacements []string, candidates []*state.StateNode, method string, consolidationType string) *Command

NewCommand creates a command key and adds in initial data for the orchestration queue.

func (*Command) Reason

func (c *Command) Reason() string

type Queue

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

func NewQueue

func NewQueue(kubeClient client.Client, recorder events.Recorder, cluster *state.Cluster, clock clock.Clock,
	provisioner *provisioning.Provisioner) *Queue

NewQueue creates a queue that will asynchronously orchestrate disruption commands

func NewTestingQueue

func NewTestingQueue(kubeClient client.Client, recorder events.Recorder, cluster *state.Cluster, clock clock.Clock,
	provisioner *provisioning.Provisioner) *Queue

NewTestingQueue uses a test RateLimitingInterface that will immediately re-queue items.

func (*Queue) Add

func (q *Queue) Add(cmd *Command) error

Add adds commands to the Queue Each command added to the queue should already be validated and ready for execution.

func (*Queue) Builder

func (*Queue) HasAny

func (q *Queue) HasAny(ids ...string) bool

HasAny checks to see if the candidate is part of an currently executing command.

func (*Queue) IsEmpty

func (q *Queue) IsEmpty() 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) Remove

func (q *Queue) Remove(cmd *Command)

Remove fully clears the queue of all references of a hash/command

func (*Queue) Reset

func (q *Queue) Reset()

Reset is used for testing and clears all internal data structures

type Replacement

type Replacement struct {

	// Use a bool track if a node has already been initialized so we can fire metrics for intialization once.
	// This intentionally does not capture nodes that go initialized then go NotReady after as other pods can
	// schedule to this node as well.
	Initialized bool
	// contains filtered or unexported fields
}

Replacement wraps a NodeClaim name with an initialized field to save on readiness checks and identify when a NodeClaim is first initialized for metrics and events.

type UnrecoverableError

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

func NewUnrecoverableError

func NewUnrecoverableError(err error) *UnrecoverableError

Jump to

Keyboard shortcuts

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