instancegroups

package
v1.15.1 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2020 License: Apache-2.0 Imports: 18 Imported by: 0

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 {
	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

	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
}

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

func (*RollingUpdateCluster) RollingUpdate

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

RollingUpdate performs a rolling update on a K8s Cluster.

type RollingUpdateInstanceGroup

type RollingUpdateInstanceGroup struct {
	// Cloud is the kops cloud provider
	Cloud fi.Cloud
	// CloudGroup is the kops cloud provider groups
	CloudGroup *cloudinstances.CloudInstanceGroup
}

RollingUpdateInstanceGroup is the AWS ASG backing an InstanceGroup.

func NewRollingUpdateInstanceGroup

func NewRollingUpdateInstanceGroup(cloud fi.Cloud, cloudGroup *cloudinstances.CloudInstanceGroup) (*RollingUpdateInstanceGroup, error)

NewRollingUpdateInstanceGroup creates a new struct

func (*RollingUpdateInstanceGroup) Delete

func (r *RollingUpdateInstanceGroup) Delete() error

Delete a CloudInstanceGroups

func (*RollingUpdateInstanceGroup) DeleteInstance

DeleteInstance deletes an Cloud Instance.

func (*RollingUpdateInstanceGroup) DrainNode

DrainNode drains a K8s node.

func (*RollingUpdateInstanceGroup) RollingUpdate

func (r *RollingUpdateInstanceGroup) RollingUpdate(rollingUpdateData *RollingUpdateCluster, cluster *api.Cluster, instanceGroupList *api.InstanceGroupList, isBastion bool, sleepAfterTerminate time.Duration, validationTimeout time.Duration) (err error)

RollingUpdate performs a rolling update on a list of ec2 instances.

func (*RollingUpdateInstanceGroup) ValidateCluster

func (r *RollingUpdateInstanceGroup) ValidateCluster(rollingUpdateData *RollingUpdateCluster, cluster *api.Cluster, instanceGroupList *api.InstanceGroupList) error

ValidateCluster runs our validation methods on the K8s Cluster.

func (*RollingUpdateInstanceGroup) ValidateClusterWithDuration

func (r *RollingUpdateInstanceGroup) ValidateClusterWithDuration(rollingUpdateData *RollingUpdateCluster, cluster *api.Cluster, instanceGroupList *api.InstanceGroupList, duration time.Duration) error

ValidateClusterWithDuration runs validation.ValidateCluster until either we get positive result or the timeout expires

Jump to

Keyboard shortcuts

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