kops

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterSize

type ClusterSize struct {
	NodeCount   string
	NodeSize    string
	MasterCount string
	MasterSize  string
}

ClusterSize is sizing configuration used by kops at cluster creation.

func GetSize

func GetSize(size string) (ClusterSize, error)

GetSize takes a size keyword and returns the matching kops cluster configuration.

type Cmd

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

Cmd is the kops command to execute.

func New

func New(s3StateStore string, logger log.FieldLogger) (*Cmd, error)

New creates a new instance of Cmd through which to execute kops.

func (*Cmd) Close

func (c *Cmd) Close() error

Close cleans up the temporary output directory used by kops.

func (*Cmd) CreateCluster

func (c *Cmd) CreateCluster(name, version, ami, cloud string, clusterSize ClusterSize, zones, privateSubnetIds, publicSubnetIds, masterSecurityGroups, workerSecurityGroups []string) error

CreateCluster invokes kops create cluster, using the context of the created Cmd.

func (*Cmd) DeleteCluster

func (c *Cmd) DeleteCluster(name string) error

DeleteCluster invokes kops delete cluster, using the context of the created Cmd.

func (*Cmd) ExportKubecfg

func (c *Cmd) ExportKubecfg(name string) error

ExportKubecfg invokes kops export kubecfg for the named cluster in the context of the created Cmd.

func (*Cmd) GetCluster

func (c *Cmd) GetCluster(name string) (string, error)

GetCluster invokes kops get cluster, using the context of the created Cmd, and returns the stdout.

func (*Cmd) GetKubeConfigPath

func (c *Cmd) GetKubeConfigPath() string

GetKubeConfigPath returns the temporary kubeconfig directory used by kops.

func (*Cmd) GetOutputDirectory

func (c *Cmd) GetOutputDirectory() string

GetOutputDirectory returns the temporary output directory used by kops.

func (*Cmd) RollingUpdateCluster

func (c *Cmd) RollingUpdateCluster(name string) error

RollingUpdateCluster invokes kops rolling-update cluster, using the context of the created Cmd.

func (*Cmd) SetCluster added in v0.9.0

func (c *Cmd) SetCluster(name, setValue string) error

SetCluster invokes kops set cluster, using the context of the created Cmd. Example setValue: spec.kubernetesVersion=1.10.0

func (*Cmd) UpdateCluster

func (c *Cmd) UpdateCluster(name, dir string) error

UpdateCluster invokes kops update cluster, using the context of the created Cmd.

func (*Cmd) UpgradeCluster

func (c *Cmd) UpgradeCluster(name string) error

UpgradeCluster invokes kops upgrade cluster, using the context of the created Cmd.

func (*Cmd) ValidateCluster

func (c *Cmd) ValidateCluster(name string, silent bool) error

ValidateCluster invokes kops validate cluster, using the context of the created Cmd.

func (*Cmd) Version

func (c *Cmd) Version() (string, error)

Version invokes kops version, using the context of the created Cmd, and returns the stdout.

func (*Cmd) WaitForKubernetesReadiness

func (c *Cmd) WaitForKubernetesReadiness(dns string, timeout int) error

WaitForKubernetesReadiness will poll a given kubernetes cluster at a regular interval for it to become ready. If the cluster fails to become ready before the provided timeout then an error will be returned.

Jump to

Keyboard shortcuts

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