kubeadm

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: 23 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// PkiDir - The directory kubeadm will store all pki assets
	PkiDir string = kubeadmconstants.KubernetesDir + "/pki"

	// CaCertFile the name of the Kube CA cert file (as used by kubeadm)
	CaCertFile string = kubeadmconstants.KubernetesDir + "/pki" + "/" + kubeadmconstants.CACertAndKeyBaseName + ".crt"

	// CaKeyFile the file name of Kube CA key file (as used by kubeadm)
	CaKeyFile string = kubeadmconstants.KubernetesDir + "/pki" + "/" + kubeadmconstants.CACertAndKeyBaseName + ".key"
)

Functions

func GetKubeadmCfg

func GetKubeadmCfg(kmmCfg Config) (cfg *kubeadmapi.MasterConfiguration, err error)

GetKubeadmCfg - will transfer config from kmm to a config struct as used by kubeadm internaly TODO: This is a hack until we can use kubeadm cmd directly...

Types

type Config

type Config struct {
	EtcdClientConfig           etcd.Client
	CaCert                     string
	CaKey                      string
	APIServer                  *url.URL
	KubeletID                  string
	CloudProvider              string
	KubeVersion                string
	MasterCount                uint
	PodNetworkCidr             string
	APIServerExtraArgs         map[string]string
	ControllerManagerExtraArgs map[string]string
	SchedulerExtraArgs         map[string]string
}

Config represents runtime params cfg structure.

func (*Config) Addons added in v0.0.4

func (k *Config) Addons() error

Addons - deploys the essential addons

func (*Config) CreateKubeConfig added in v0.0.4

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

CreateKubeConfig - Creates all the kubeconfig files requires for masters

func (*Config) CreatePKI added in v0.0.4

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

CreatePKI - generates all PKI assests on to disk

func (*Config) LoadAndSerializeAssets added in v0.0.4

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

LoadAndSerializeAssets getting assets off disk into a serialized string Return an error if there are no assets (and empty string)

func (*Config) SaveAssets added in v0.0.4

func (k *Config) SaveAssets(assets string) (err error)

SaveAssets - will persist assets to disk

func (*Config) UpdateMasterRoleLabelsAndTaints added in v0.0.4

func (cfg *Config) UpdateMasterRoleLabelsAndTaints() error

UpdateMasterRoleLabelsAndTaints will apply the master role taints and labels

func (*Config) WriteManifests added in v0.0.4

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

WriteManifests - will save kubernetes master manifests from kmm config struct

type Kubeadmer added in v0.0.4

type Kubeadmer interface {
	Addons() error
	CreateKubeConfig() (err error)
	CreatePKI() (err error)
	LoadAndSerializeAssets() (assets string, err error)
	SaveAssets(assets string) (err error)
	UpdateMasterRoleLabelsAndTaints() error
	WriteManifests() (err error)
}

Kubeadmer allows for mocking out this lib for testing

type SharedAssets

type SharedAssets struct {
	FrontProxyCa    string
	FrontProxyCaKey string
	SaPub           string
	SaKey           string
}

SharedAssets - the data to be shared between all kubernetes masters

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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