quarantine

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2022 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const QuarantineNodeRemoveLabel = "revert"
View Source
const QuarantinePodLabelKey = "quarantine"
View Source
const QuarantinePodLabelPrefix = "ops.soer3n.info/"

Variables

This section is empty.

Functions

This section is empty.

Types

type Daemonset

type Daemonset struct {
	Name      string
	Namespace string
	Keep      bool
}

Daemonset represents a configuration for a daemonset whose pod which is on an affected node should be isolated

type Debug

type Debug struct {
	Image     string
	Namespace string
	Enabled   bool
}

Debug represents a configuration for a debug pod

type Deployment

type Deployment struct {
	Name      string
	Namespace string
	Keep      bool
}

Deployment represents a configuration for a deployment whose pod which is on an affected node should be isolated

type Node

type Node struct {
	Name        string
	Debug       Debug
	Isolate     bool
	Daemonsets  []Daemonset
	Deployments []Deployment
	IOStreams   genericclioptions.IOStreams

	Flags  *drain.Helper
	Logger logr.Logger
	// contains filtered or unexported fields
}

Node represents configuration for isolating a node

type Quarantine

type Quarantine struct {
	Nodes       []*Node
	MarkedNodes []*Node
	Debug       Debug
	Client      kubernetes.Interface

	Conditions []metav1.Condition
	Logger     logr.Logger
	// contains filtered or unexported fields
}

Quarantine represents current state of isolation

func New

New represents an initialization of a quarantine struct

func (Quarantine) IsActive

func (q Quarantine) IsActive() bool

IsActive represents returning state of a quarantine

func (*Quarantine) Prepare

func (q *Quarantine) Prepare() error

Prepare represents the tasks before a quarantine can be started

func (*Quarantine) Start

func (q *Quarantine) Start() error

Start represents the tasks to start isolating resources on nodes

func (*Quarantine) Stop

func (q *Quarantine) Stop() error

Stop represents the tasks for uncordon nodes, rescheduling resources and deleting debug resources

func (*Quarantine) Update

func (q *Quarantine) Update() error

Update represents the tasks which are not yet executed

Jump to

Keyboard shortcuts

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