bootstrap

package
v0.0.0-...-5773fff Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: Apache-2.0 Imports: 50 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ManifestCreatedInClusterCacheKey = "tf-state-and-manifests-in-cluster"
	MasterHostsCacheKey              = "cluster-hosts"
	BastionHostCacheKey              = "bastion-hosts"
)
View Source
const PostBootstrapResultCacheKey = "post-bootstrap-result"

Variables

This section is empty.

Functions

func BootstrapAdditionalMasterNodes

func BootstrapAdditionalMasterNodes(kubeCl *client.KubernetesClient, metaConfig *config.MetaConfig, addressTracker map[string]string) error

func BootstrapGetNodesFromCache

func BootstrapGetNodesFromCache(metaConfig *config.MetaConfig, stateCache state.Cache) (map[string]map[int]string, error)

func BootstrapMaster

func BootstrapMaster(sshClient *ssh.Client, bundleName, nodeIP string, metaConfig *config.MetaConfig, controller *template.Controller) error

func BootstrapTerraNodes

func BootstrapTerraNodes(kubeCl *client.KubernetesClient, metaConfig *config.MetaConfig, terraNodeGroups []config.TerraNodeGroupSpec) error

func CheckBashibleBundle

func CheckBashibleBundle(sshClient *ssh.Client) bool

func CheckDHCTLDependencies

func CheckDHCTLDependencies(sshClient *ssh.Client) error

func CheckPreventBreakAnotherBootstrappedCluster

func CheckPreventBreakAnotherBootstrappedCluster(kubeCl *client.KubernetesClient, config *config.DeckhouseInstaller) error

func DetermineBundleName

func DetermineBundleName(sshClient *ssh.Client) (string, error)

func ExecuteBashibleBundle

func ExecuteBashibleBundle(sshClient *ssh.Client, tmpDir string) error

func GetBastionHostFromCache

func GetBastionHostFromCache() (string, error)

func GetMasterHostsIPs

func GetMasterHostsIPs() ([]string, error)

func InstallDeckhouse

func InstallDeckhouse(kubeCl *client.KubernetesClient, config *config.DeckhouseInstaller) error

func PrepareBashibleBundle

func PrepareBashibleBundle(bundleName, nodeIP, devicePath string, metaConfig *config.MetaConfig, controller *template.Controller) error

func RebootMaster

func RebootMaster(sshClient *ssh.Client) error

func RunBashiblePipeline

func RunBashiblePipeline(sshClient *ssh.Client, cfg *config.MetaConfig, nodeIP, devicePath string) error

func SaveBastionHostToCache

func SaveBastionHostToCache(host string)

func SaveMasterHostsToCache

func SaveMasterHostsToCache(hosts map[string]string)

func SetupSSHTunnelToRegistryPackagesProxy

func SetupSSHTunnelToRegistryPackagesProxy(sshCl *ssh.Client) (*frontend.ReverseTunnel, error)

func StartRegistryPackagesProxy

func StartRegistryPackagesProxy(config config.RegistryData, clusterDomain string) error

func ValidateScriptFile

func ValidateScriptFile(path string) error

func WaitForSSHConnectionOnMaster

func WaitForSSHConnectionOnMaster(sshClient *ssh.Client) error

Types

type ClusterBootstrapper

type ClusterBootstrapper struct {
	*Params
	*phases.PhasedExecutionContext
	// contains filtered or unexported fields
}

func NewClusterBootstrapper

func NewClusterBootstrapper(params *Params) *ClusterBootstrapper

func (*ClusterBootstrapper) Abort

func (b *ClusterBootstrapper) Abort(forceAbortFromCache bool) error

func (*ClusterBootstrapper) BaseInfrastructure

func (b *ClusterBootstrapper) BaseInfrastructure() error

func (*ClusterBootstrapper) Bootstrap

func (b *ClusterBootstrapper) Bootstrap() error

func (*ClusterBootstrapper) CreateResources

func (b *ClusterBootstrapper) CreateResources() error

func (*ClusterBootstrapper) ExecPostBootstrap

func (b *ClusterBootstrapper) ExecPostBootstrap() error

func (*ClusterBootstrapper) ExecuteBashible

func (b *ClusterBootstrapper) ExecuteBashible() error

func (*ClusterBootstrapper) GetLastState

func (c *ClusterBootstrapper) GetLastState() phases.DhctlState

TODO(dhctl-for-commander): pass stateCache externally using params as in Destroyer, this method will be unneeded then

func (*ClusterBootstrapper) InstallDeckhouse

func (b *ClusterBootstrapper) InstallDeckhouse() error

type Params

type Params struct {
	InitialState               phases.DhctlState
	ResetInitialState          bool
	DisableBootstrapClearCache bool
	OnPhaseFunc                phases.OnPhaseFunc
	CommanderMode              bool

	ConfigPaths             []string
	ResourcesPath           string
	ResourcesTimeout        string
	DeckhouseTimeout        time.Duration
	SSHUser                 string
	SSHBastionUser          string
	SSHAgentPrivateKeys     []string
	SSHHosts                []string
	PostBootstrapScriptPath string
	UseTfCache              *bool
	AutoApprove             *bool

	*client.KubernetesInitParams
}

TODO(remove-global-app): Support all needed parameters in Params, remove usage of app.*

type PostBootstrapScriptExecutor

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

func NewPostBootstrapScriptExecutor

func NewPostBootstrapScriptExecutor(sshClient *ssh.Client, path string, state *State) *PostBootstrapScriptExecutor

func (*PostBootstrapScriptExecutor) Execute

func (e *PostBootstrapScriptExecutor) Execute() error

func (*PostBootstrapScriptExecutor) WithTimeout

type State

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

func NewBootstrapState

func NewBootstrapState(stateCache state.Cache) *State

func (*State) Clean

func (s *State) Clean()

func (*State) PostBootstrapScriptResult

func (s *State) PostBootstrapScriptResult() ([]byte, error)

func (*State) SavePostBootstrapScriptResult

func (s *State) SavePostBootstrapScriptResult(result string) error

Jump to

Keyboard shortcuts

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