node

package
v1.33.1 Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: Apache-2.0 Imports: 58 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(cc *config.ClusterConfig, n config.Node, delOnFail bool) error

Add adds a new node config to an existing cluster.

func CacheAndLoadImagesInConfig

func CacheAndLoadImagesInConfig(profiles []*config.Profile) error

CacheAndLoadImagesInConfig loads the images currently in the config file called by 'start' and 'cache reload' commands.

func CacheKubectlBinary

func CacheKubectlBinary(k8sVersion, binaryURL string) (string, error)

CacheKubectlBinary caches the kubectl binary

func Delete

func Delete(cc config.ClusterConfig, name string) (*config.Node, error)

Delete calls teardownNode to remove node from cluster and deletes the host.

func ExitIfFatal added in v1.13.0

func ExitIfFatal(err error, force bool)

ExitIfFatal before exiting will try to check for different error types and provide advice if we know for sure what the error is

func ID added in v1.33.0

func ID(name string) (int, error)

ID returns the appropriate node id from the node name. ID of first (primary control-plane) node (with empty name) is 1, so next one would be "m02", etc. Eg, "m05" should return "5", regardles if any preceded nodes were deleted.

func Name added in v1.9.0

func Name(index int) string

Name returns the appropriate name for the node given the node index.

func Provision added in v1.10.0

func Provision(cc *config.ClusterConfig, n *config.Node, delOnFail bool) (command.Runner, bool, libmachine.API, *host.Host, error)

Provision provisions the machine/container for the node

func Retrieve

func Retrieve(cc config.ClusterConfig, name string) (*config.Node, int, error)

Retrieve finds the node by name in the given cluster

func Save

func Save(cfg *config.ClusterConfig, node *config.Node) error

Save saves a node to a cluster

func Start

func Start(starter Starter) (*kubeconfig.Settings, error)

Start spins up a guest and starts the Kubernetes node.

Types

type Starter added in v1.10.0

type Starter struct {
	Runner         command.Runner
	PreExists      bool
	StopK8s        bool
	MachineAPI     libmachine.API
	Host           *host.Host
	Cfg            *config.ClusterConfig
	Node           *config.Node
	ExistingAddons map[string]bool
}

Starter is a struct with all the necessary information to start a node

Jump to

Keyboard shortcuts

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