instancegroups

package
v1.30.3 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: Apache-2.0 Imports: 27 Imported by: 31

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeleteInstanceGroup

type DeleteInstanceGroup struct {
	Cluster   *api.Cluster
	Cloud     fi.Cloud
	Clientset simple.Clientset
}

DeleteInstanceGroup removes the cloud resources for an InstanceGroup

func (*DeleteInstanceGroup) DeleteInstanceGroup

func (d *DeleteInstanceGroup) DeleteInstanceGroup(group *api.InstanceGroup) error

DeleteInstanceGroup deletes a cloud instance group

type RollingUpdateCluster

type RollingUpdateCluster struct {
	Clientset simple.Clientset
	Ctx       context.Context
	Cluster   *api.Cluster
	Cloud     fi.Cloud

	// MasterInterval is the amount of time to wait after stopping a master instance
	MasterInterval time.Duration
	// NodeInterval is the amount of time to wait after stopping a non-master instance
	NodeInterval time.Duration
	// BastionInterval is the amount of time to wait after stopping a bastion instance
	BastionInterval time.Duration
	// Interactive prompts user to continue after each instance is updated
	Interactive bool

	Force bool

	// K8sClient is the kubernetes client, used for draining etc
	K8sClient kubernetes.Interface

	// ClusterValidator is used for validating the cluster. Unused if CloudOnly
	ClusterValidator validation.ClusterValidator

	FailOnDrainError bool
	FailOnValidate   bool
	CloudOnly        bool
	ClusterName      string

	// PostDrainDelay is the duration we wait after draining each node
	PostDrainDelay time.Duration

	// ValidationTimeout is the maximum time to wait for the cluster to validate, once we start validation
	ValidationTimeout time.Duration

	// ValidateTickDuration is the amount of time to wait between cluster validation attempts
	ValidateTickDuration time.Duration

	// ValidateSuccessDuration is the amount of time a cluster must continue to validate successfully
	// before updating the next node
	ValidateSuccessDuration time.Duration

	// ValidateCount is the amount of time that a cluster needs to be validated after single node update
	ValidateCount int

	// DrainTimeout is the maximum amount of time to wait while draining a node.
	DrainTimeout time.Duration

	// Options holds user-specified options
	Options RollingUpdateOptions
}

RollingUpdateCluster is a struct containing cluster information for a rolling update.

func (*RollingUpdateCluster) AdjustNeedUpdate added in v1.18.0

func (*RollingUpdateCluster) AdjustNeedUpdate(groups map[string]*cloudinstances.CloudInstanceGroup) error

AdjustNeedUpdate adjusts the set of instances that need updating, using factors outside those known by the cloud implementation

func (*RollingUpdateCluster) RollingUpdate

func (c *RollingUpdateCluster) RollingUpdate(groups map[string]*cloudinstances.CloudInstanceGroup, instanceGroups *api.InstanceGroupList) error

RollingUpdate performs a rolling update on a K8s Cluster.

func (*RollingUpdateCluster) UpdateSingleInstance added in v1.19.0

func (c *RollingUpdateCluster) UpdateSingleInstance(cloudMember *cloudinstances.CloudInstance, detach bool) error

UpdateSingleInstance performs a rolling update on a single instance

type RollingUpdateOptions added in v1.26.0

type RollingUpdateOptions struct {
	// DeregisterControlPlaneNodes controls if we deregister control plane instances from load balacners etc before draining/terminating.
	// When a cluster only has a single apiserver, we don't want to do this, as we can't drain after deregistering it.
	DeregisterControlPlaneNodes bool
}

func (*RollingUpdateOptions) InitDefaults added in v1.26.0

func (o *RollingUpdateOptions) InitDefaults()

type ValidationTimeoutError added in v1.26.0

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

ValidationTimeoutError represents an error that occurs when the cluster fails to validate within the designated timeout.

func (*ValidationTimeoutError) Error added in v1.26.0

func (v *ValidationTimeoutError) Error() string

func (*ValidationTimeoutError) Is added in v1.26.0

func (v *ValidationTimeoutError) Is(err error) bool

Is checks that a given error is a ValidationTimeoutError.

func (*ValidationTimeoutError) Unwrap added in v1.26.0

func (v *ValidationTimeoutError) Unwrap() error

Jump to

Keyboard shortcuts

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