scaler

package
v0.0.0-...-a56079f Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// LABEL_UPGRADE is the label used for managed upgrades
	LABEL_UPGRADE = "upgrade.managed.openshift.io"
	// LABEL_MACHINESET is the label used for machinesets
	LABEL_MACHINESET = "machine.openshift.io/cluster-api-machineset"
	// MACHINE_API_NAMESPACE is the namespace of the machine api
	MACHINE_API_NAMESPACE = "openshift-machine-api"
)

Variables

This section is empty.

Functions

func IsDrainTimeOutError

func IsDrainTimeOutError(err error) (*drainTimeOutError, bool)

IsDrainTimeOutError returns a drainTimeOutError and bool that is true if the error arg is that of a drainTimeOutError

func IsScaleTimeOutError

func IsScaleTimeOutError(err error) bool

IsScaleTimeOutError returns a bool if the error arg is that of a scaleTimeOutError

func NewDrainTimeOutError

func NewDrainTimeOutError(nodeName string) *drainTimeOutError

NewDrainTimeOutError returns a drainTimeOutError

func NewScaleTimeOutError

func NewScaleTimeOutError(msg string) *scaleTimeOutError

NewScaleTimeOutError returns a scaleTimeOutError

func NotSelectorFromSet

func NotSelectorFromSet(ls NotMatchingLabels) labels.Selector

NotSelectorFromSet returns a labels.Selector

Types

type NotMatchingLabels

type NotMatchingLabels map[string]string

NotMatchingLabels is a map of strings

func (NotMatchingLabels) ApplyToList

func (m NotMatchingLabels) ApplyToList(opts *client.ListOptions)

ApplyToList applies listOptions to NotMachingLabels

type Scaler

type Scaler interface {
	CanScale(client.Client, logr.Logger) (bool, error)
	EnsureScaleUpNodes(client.Client, time.Duration, logr.Logger) (bool, error)
	EnsureScaleDownNodes(client.Client, drain.NodeDrainStrategy, logr.Logger) (bool, error)
}

Scaler is an interface that enables implementations of a Scaler

func NewScaler

func NewScaler() Scaler

NewScaler returns a Scaler

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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