Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SaveCloudAssets ¶
SaveCloudAssets will get assets from cloud provider and save onto disk at known locations
func SetupCompute ¶
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 (*Config) BootstrapOnce ¶ added in v0.0.4
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
BootstrapSecondaryMaster will start a secondary master (cluster unique assets not created here)
func (*Config) CreateOrGetSharedAssets ¶ added in v0.0.4
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) CopyKubeCa ¶ added in v0.0.4
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
CreateAndStartKubelet will create Kubelet CreateAndStartKubelet will call the CreateAndStartKubelet method with the correct configuration
func (*Kmm) InstallNetwork ¶ added in v0.0.4
InstallNetwork will create the CNI network resources from a named template
func (*Kmm) TokensDeploy ¶ added in v0.0.4
TokensDeploy method calls the dependancy with the correct configuration It allows the dependancy to be mocked.
func (*Kmm) UpdateCloudCfg ¶ added in v0.0.4
UpdateCloudCfg config based on cloud provider, if specified