kmm

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2017 License: Apache-2.0 Imports: 21 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SaveCloudAssets

func SaveCloudAssets(cloudprovider, etcdCa, etcdCaKey, kubeCa, kubeCaKey string) error

SaveCloudAssets will get assets from cloud provider and save onto disk at known locations

func SetupCompute

func SetupCompute(cloud string, exitOnCompletion bool) (err error)

SetupCompute will configure a compute node - currently just saves an env file

Types

type Config

type Config struct {
	ConfigType
}

Config is tied to the Primary methods (no interface - not for mocking)

func New added in v0.0.4

func New(cfg Config) *Config

New creates a new kmm struct with live interface from configuration

func (*Config) BootstrapOnce added in v0.0.4

func (k *Config) BootstrapOnce() (assets string, err error)

BootstrapOnce will carry out all the actions on a primary master TODO: ensure these are all repeatable - blocked, see issue:

https://github.com/UKHomeOffice/keto-k8/issues/33

func (*Config) BootstrapSecondaryMaster added in v0.0.4

func (k *Config) BootstrapSecondaryMaster(assets string) error

BootstrapSecondaryMaster will start a secondary master (cluster unique assets not created here)

func (*Config) CreateOrGetSharedAssets added in v0.0.4

func (k *Config) CreateOrGetSharedAssets() (err error)

CreateOrGetSharedAssets core logic

type ConfigType added in v0.0.4

type ConfigType struct {
	KubeadmCfg           *kubeadm.Config
	KubePersistentCaCert string
	KubePersistentCaKey  string
	ClusterName          string
	NetworkProvider      string
	MasterBackOffTime    time.Duration
	ExitOnCompletion     bool
	Etcd                 etcd.Clienter
	Kubeadm              kubeadm.Kubeadmer
	Kmm                  Interface
	KubeletExtraArgs     string
	NodeLabels           map[string]string
	NodeTaints           map[string]string
}

ConfigType is the complete configuration provided for all kmm use

type Interface added in v0.0.4

type Interface interface {
	CleanUp(releaseLock, deleteAssets bool) (err error)
	CopyKubeCa() (err error)
	InstallNetwork() (err error)
	TokensDeploy() error
	UpdateCloudCfg() (err error)
	CreateAndStartKubelet(master bool) error
}

Interface defined to enable testing of core functions without dependencies

type Kmm added in v0.0.4

type Kmm struct {
	ConfigType
}

Kmm is a concrete implementation of the testable (mockable) methods

func (*Kmm) CleanUp added in v0.0.4

func (k *Kmm) CleanUp(releaseLock, deleteAssets bool) (err error)

CleanUp - will optionally clean all etcd resources

func (*Kmm) CopyKubeCa added in v0.0.4

func (k *Kmm) CopyKubeCa() (err error)

CopyKubeCa will copy Kube CA and link CA key to kubeadm expected locations (if not there already)

func (*Kmm) CreateAndStartKubelet added in v0.0.4

func (k *Kmm) CreateAndStartKubelet(master bool) error

CreateAndStartKubelet will create Kubelet CreateAndStartKubelet will call the CreateAndStartKubelet method with the correct configuration

func (*Kmm) InstallNetwork added in v0.0.4

func (k *Kmm) InstallNetwork() (err error)

InstallNetwork will create the CNI network resources from a named template

func (*Kmm) TokensDeploy added in v0.0.4

func (k *Kmm) TokensDeploy() error

TokensDeploy method calls the dependancy with the correct configuration It allows the dependancy to be mocked.

func (*Kmm) UpdateCloudCfg added in v0.0.4

func (k *Kmm) UpdateCloudCfg() (err error)

UpdateCloudCfg config based on cloud provider, if specified

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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