machine

package
v0.0.0-...-f9409e5 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// AwsCloud const definition.
	AwsCloud = "aws"
	// GcpCloud const definition.
	GcpCloud = "gcp"
	// AzureCloud const definition.
	AzureCloud = "azure"
)

Variables

This section is empty.

Functions

func WaitForMachineSetReady

func WaitForMachineSetReady(
	apiClient *clients.Settings,
	namespace,
	machineSetName string,
	timeout time.Duration) error

WaitForMachineSetReady waits until MachineSet first replica is Ready.

Types

type SetBuilder

type SetBuilder struct {
	// SetBuilder definition. Used to create
	// MachineSet object with minimum set of required elements.
	Definition *machinev1beta1.MachineSet
	// Created SetBuilder object on the cluster.
	Object *machinev1beta1.MachineSet
	// contains filtered or unexported fields
}

SetBuilder provides a struct for MachineSet object from the cluster and a MachineSet definition.

func ListWorkerMachineSets

func ListWorkerMachineSets(
	apiClient *clients.Settings,
	namespace string,
	workerLabel string,
	options ...metav1.ListOptions) ([]*SetBuilder, error)

ListWorkerMachineSets returns a slice of SetBuilder objects in a namespace on a cluster.

func NewSetBuilderFromCopy

func NewSetBuilderFromCopy(
	apiClient *clients.Settings,
	nsName string,
	instanceType string,
	workerLabel string,
	replicas int32) *SetBuilder

NewSetBuilderFromCopy returns an SetBuilder struct from a copied MachineSet.

func PullSet

func PullSet(apiClient *clients.Settings, name, namespace string) (*SetBuilder, error)

PullSet loads an existing MachineSet into Builder struct.

func (*SetBuilder) AWSChangeProviderInstanceType

func (builder *SetBuilder) AWSChangeProviderInstanceType(instanceType string) error

AWSChangeProviderInstanceType changes the ProviderSpec InstanceType param for AWS public cloud.

func (*SetBuilder) AzureChangeProviderVMSize

func (builder *SetBuilder) AzureChangeProviderVMSize(vmSize string) error

AzureChangeProviderVMSize changes the ProviderSpec VMSize param for Azure public cloud.

func (*SetBuilder) ChangeCloudProviderInstanceType

func (builder *SetBuilder) ChangeCloudProviderInstanceType(instanceType string) error

ChangeCloudProviderInstanceType calls the cloud-specific function to change the ProviderSpec instance type param.

func (*SetBuilder) Create

func (builder *SetBuilder) Create() (*SetBuilder, error)

Create makes a MachineSet in cluster and stores the created object in struct.

func (*SetBuilder) Delete

func (builder *SetBuilder) Delete() error

Delete removes a MachineSet object from a cluster.

func (*SetBuilder) Exists

func (builder *SetBuilder) Exists() bool

Exists checks whether the given MachineSet exists.

func (*SetBuilder) GCPChangeProviderMachineType

func (builder *SetBuilder) GCPChangeProviderMachineType(machineType string) error

GCPChangeProviderMachineType changes the ProviderSpec MachineType param for GCP public cloud.

Jump to

Keyboard shortcuts

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