cluster

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2019 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(cl *Config, provider *kind.Provider, box *packr.Box, wg *sync.WaitGroup) error

Create creates cluster with kind

func Destroy

func Destroy(clName string, provider *kind.Provider) error

Destroy destroys a kind cluster

func FinalizeSetup

func FinalizeSetup(cl *Config, box *packr.Box, wg *sync.WaitGroup) error

FinalizeSetup creates custom environment

func GenerateCalicoDeploymentFile added in v0.1.1

func GenerateCalicoDeploymentFile(cl *Config, box *packr.Box) (string, error)

GenerateCalicoDeploymentFile generates calico deployment file from template

func GenerateFlannelDeploymentFile added in v0.1.1

func GenerateFlannelDeploymentFile(cl *Config, box *packr.Box) (string, error)

GenerateFlannelDeploymentFile generates flannel deployment file from template

func GenerateKindConfig added in v0.1.1

func GenerateKindConfig(cl *Config, configDir string, box *packr.Box) (string, error)

GenerateKindConfig creates kind config file and returns its path

func GenerateWeaveDeploymentFile added in v0.1.1

func GenerateWeaveDeploymentFile(cl *Config, box *packr.Box) (string, error)

GenerateWeaveDeploymentFile generates weave deployment file from template

func GetClientSet added in v0.1.2

func GetClientSet(clName string) (kubernetes.Interface, error)

GetClientSet returns kubernetes interface

func GetCrdClientSet added in v0.1.2

func GetCrdClientSet(clName string) (apiextclientset.Interface, error)

GetCrdClientSet returns apiextclientset interface

func GetKubeConfigPath added in v0.1.1

func GetKubeConfigPath(clName string) (string, error)

GetKubeConfigPath returns different kubeconfig paths for local and docker based runs

func GetMasterDockerIP added in v0.1.1

func GetMasterDockerIP(clName string) (string, error)

GetMasterDockerIP gets control plain master docker internal ip

func IsKnown added in v0.1.2

func IsKnown(clName string, provider *kind.Provider) (bool, error)

IsKnown returns bool if cluster exists

func PrepareKubeConfigs added in v0.1.2

func PrepareKubeConfigs(clName string, sourceKubeConfigFilePath, masterIP string) error

PrepareKubeConfigs modifies kubconfig file generated by kind and returns the kubeconfig file path

Types

type Config added in v0.1.2

type Config struct {
	// Cni is a name of the cni that will be installed for a cluster
	Cni string

	// Name is a cluster name
	Name string

	// PodSubnet is pod subnet cidr and mask
	PodSubnet string

	// ServiceSubnet is a service subnet cidr and mask
	ServiceSubnet string

	// DNSDomain is cluster dns domain name
	DNSDomain string

	// // KubeAdminAPIVersion for each cluster
	KubeAdminAPIVersion string

	// NumWorkers is the number of worker nodes
	NumWorkers int

	// KubeConfigFilePath is the destination where kind will generate the original kubeconfig file
	KubeConfigFilePath string

	// Amount of time to wait for control plain to be ready
	WaitForReady time.Duration

	// Config image name
	NodeImageName string

	// Retain if to retain the cluster despite and error
	Retain bool

	// Tiller if to deploy a cluster with tiller
	Tiller bool
}

Config type

func PopulateConfig added in v0.1.2

func PopulateConfig(i int, image, cni string, retain, tiller, overlap bool, wait time.Duration) (*Config, error)

PopulateConfig return a desired cluster config object

Jump to

Keyboard shortcuts

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