cloudinstances

package
v1.23.2 Latest Latest
Warning

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

Go to latest
Published: May 11, 2022 License: Apache-2.0 Imports: 5 Imported by: 290

Documentation

Index

Constants

View Source
const CloudInstanceStatusDetached = "Detached"

CloudInstanceStatusDetached means the instance needs update and has been detached.

View Source
const CloudInstanceStatusNeedsUpdate = "NeedsUpdate"

CloudInstanceStatusNeedsUpdate means the instance has joined the cluster, is not detached, and needs to be updated.

View Source
const CloudInstanceStatusUpToDate = "UpToDate"

CloudInstanceStatusReady means the instance has joined the cluster, is not detached, and is up to date.

Variables

This section is empty.

Functions

func GetNodeMap

func GetNodeMap(nodes []v1.Node, cluster *kopsapi.Cluster) map[string]*v1.Node

GetNodeMap returns a list of nodes keyed by their external id

Types

type CloudInstance added in v1.19.0

type CloudInstance struct {
	// ID is a unique identifier for the instance, meaningful to the cloud
	ID string
	// Node is the associated k8s instance, if it is known
	Node *v1.Node
	// CloudInstanceGroup is the managing CloudInstanceGroup
	CloudInstanceGroup *CloudInstanceGroup
	// Status indicates if the instance has joined the cluster and if it needs any updates.
	Status string
	// Roles are the roles the instance have.
	Roles []string
	// MachineType is the hardware resource class of the instance.
	MachineType string
	// Private IP is the private ip address of the instance.
	PrivateIP string
	// State is in which state the instance is in
	State State
}

CloudInstance describes an instance in a CloudInstanceGroup group.

type CloudInstanceGroup

type CloudInstanceGroup struct {
	// HumanName is a user-friendly name for the group
	HumanName     string
	InstanceGroup *kopsapi.InstanceGroup
	Ready         []*CloudInstance
	NeedUpdate    []*CloudInstance
	MinSize       int
	TargetSize    int
	MaxSize       int

	// Raw allows for the implementer to attach an object, for tracking additional state
	Raw interface{}
}

CloudInstanceGroup is the cloud backing of InstanceGroup.

func (*CloudInstanceGroup) AdjustNeedUpdate added in v1.20.0

func (group *CloudInstanceGroup) AdjustNeedUpdate()

func (*CloudInstanceGroup) NewCloudInstance added in v1.19.0

func (c *CloudInstanceGroup) NewCloudInstance(instanceId string, status string, node *v1.Node) (*CloudInstance, error)

NewCloudInstance creates a new CloudInstance

func (*CloudInstanceGroup) Status

func (c *CloudInstanceGroup) Status() string

Status returns a human-readable Status indicating whether an update is needed

type State added in v1.21.0

type State string
const WarmPool State = "WarmPool"

WarmPool means the instance is in the warm pool

Jump to

Keyboard shortcuts

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