Documentation ¶
Index ¶
- Constants
- func IsDrainTimeOutError(err error) (*drainTimeOutError, bool)
- func IsScaleTimeOutError(err error) bool
- func NewDrainTimeOutError(nodeName string) *drainTimeOutError
- func NewScaleTimeOutError(msg string) *scaleTimeOutError
- func NotSelectorFromSet(ls NotMatchingLabels) labels.Selector
- type NotMatchingLabels
- type Scaler
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 ¶
IsDrainTimeOutError returns a drainTimeOutError and bool that is true if the error arg is that of a drainTimeOutError
func IsScaleTimeOutError ¶
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 ¶
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
Click to show internal directories.
Click to hide internal directories.