bootstrap

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// EnvVarSSHCloudPrivKey storest the environment variable used to configure the location of the ssh private key to connect to bootstrap machine
	EnvVarSSHCloudPrivKey = "SSH_CLOUD_PRIV_KEY"
	// DefaultSSHUser default user in case of not being configured via envvar
	DefaultSSHUser = "core"
)
View Source
const (
	// EnvVarSSHCloudPrivAWSUser stores the environment variable used to configure the AWS ssh user
	EnvVarSSHCloudPrivAWSUser = "SSH_CLOUD_PRIV_AWS_USER"
)
View Source
const (
	// EnvVarSSHCloudPrivAzureUser stores the environment variable used to configure the Azure ssh user
	EnvVarSSHCloudPrivAzureUser = "SSH_CLOUD_PRIV_AZURE_USER"
)

Variables

This section is empty.

Functions

func GetBootstrapPrivateKey

func GetBootstrapPrivateKey() string

GetBootstrapPrivateKey returns the location of the private key needed to login to the bootstrap machine

Types

type AWSBSInfoProvider

type AWSBSInfoProvider struct{}

AWSBSInfoProvider implements interface BSInfoProvider

func (AWSBSInfoProvider) GetIPs

func (a AWSBSInfoProvider) GetIPs(oc *exutil.CLI) (*Ips, error)

GetIPs returns the IPs of the boostrap machine if this machine exists in AWS

func (AWSBSInfoProvider) GetSSHUser

func (a AWSBSInfoProvider) GetSSHUser() string

GetSSHUser returns the user needed to connect to the bootstrap machine via ssh

type AzureBSInfoProvider

type AzureBSInfoProvider struct{}

AzureBSInfoProvider implements interface BSInfoProvider

func (AzureBSInfoProvider) GetIPs

func (a AzureBSInfoProvider) GetIPs(oc *exutil.CLI) (*Ips, error)

GetIPs returns the IPs of the boostrap machine if this machine exists in Azure

func (AzureBSInfoProvider) GetSSHUser

func (a AzureBSInfoProvider) GetSSHUser() string

GetSSHUser returns the user needed to connect to the bootstrap machine via ssh

type BSInfoProvider

type BSInfoProvider interface {
	GetIPs(*exutil.CLI) (*Ips, error)
	GetSSHUser() string
}

BSInfoProvider any struct implementing this interface can be used to create a Boostrap object. Currently it is only implemented by AWSBSInfoProvider

func GetBSInfoProvider

func GetBSInfoProvider(oc *exutil.CLI) (BSInfoProvider, error)

GetBSInfoProvider returns a struct implementing BSInfoProvider for the current platform

type Bootstrap

type Bootstrap struct {
	SSH compat_otp.SshClient
	IPs Ips
}

Bootstrap contains the functionality regarding the bootstrap machine

func GetBootstrap

func GetBootstrap(oc *exutil.CLI) (*Bootstrap, error)

GetBootstrap returns a bootstrap struct pointing to the bootstrap machine if exists

type InstanceNotFound

type InstanceNotFound struct{ InstanceName string }

InstanceNotFound reports an error because the bootstrap instance is not found. It can be used to skip the test case

func (*InstanceNotFound) Error

func (inferr *InstanceNotFound) Error() string

Error implements the error interface

type Ips

type Ips struct {
	PrivateIPAddress string
	PublicIPAddress  string
}

Ips struct to store the public and the private IPs of the bootstrap machine

Jump to

Keyboard shortcuts

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