v0

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2024 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrThreeportConfigAlreadyExists = errors.New("threeport config already contains deployed control planes")

Functions

func Complete

func Complete(message string)

Complete returns a formatted message in green. Used when operations are finished.

func CreateGenesisControlPlane

func CreateGenesisControlPlane(customInstaller *threeport.ControlPlaneInstaller) error

CreateGenesisControlPlane uses the CLI arguments to create a new threeport control plane.

func DeleteGenesisControlPlane

func DeleteGenesisControlPlane(customInstaller *threeport.ControlPlaneInstaller) error

DeleteGenesisControlPlane deletes a threeport control plane.

func Error

func Error(message string, err error)

Error returns a formatted error message in red.

func Info

func Info(message string)

Info returns a formatted info message.

func InitArgs

func InitArgs(args *GenesisControlPlaneCLIArgs)

InitArgs sets the default provider config directory, kubeconfig path and path to threeport repo as needed in the CLI arguments.

func InitConfig

func InitConfig(cfgFile string)

InitConfig sets up the threeport config for a CLI.

func RefreshEKSConnectionWithLocalConfig

func RefreshEKSConnectionWithLocalConfig(
	awsConfig *aws.Config,
	kubernetesRuntimeInstance *v0.KubernetesRuntimeInstance,
	apiClient *http.Client,
	threeportAPIEndpoint string,
) (*v0.KubernetesRuntimeInstance, error)

RefreshEKSConnectionWithLocalConfig uses the local AWS config to refresh EKS connection info on the kubernetes runtime instance object

func ValidateConfigNameFlags added in v0.4.0

func ValidateConfigNameFlags(
	objectConfigPath string,
	objectName string,
	objectOutputName string,
) error

ValidateConfigNameFlags takes the following flag values * config file path value as provided by user with a flag * object name value as provided by user with a flag It also takes the name of the object as it should be displayed in an output error message. It validates that either the path to the config file or the object name (but not both) is provided.

func ValidateCreateGenesisControlPlaneFlags

func ValidateCreateGenesisControlPlaneFlags(
	instanceName string,
	infraProvider string,
	createRootDomain string,
	authEnabled bool,
) error

validateCreateControlPlaneFlags validates flag inputs as needed

func ValidateDescribeOutputFlag added in v0.5.0

func ValidateDescribeOutputFlag(
	outputFormat string,
	objectOutputName string,
) error

ValidateDescribeOutputFlag validates output formats for describe commands.

func Warning

func Warning(message string)

Warning returns a formatted warning message in yellow.

Types

type GenesisControlPlaneCLIArgs

type GenesisControlPlaneCLIArgs struct {
	AuthEnabled           bool
	AwsConfigProfile      string
	AwsConfigEnv          bool
	AwsRegion             string
	AwsRoleArn            string
	AwsSerialNumber       string
	CfgFile               string
	ControlPlaneImageRepo string
	ControlPlaneImageTag  string
	CreateRootDomain      string
	CreateAdminEmail      string
	DevEnvironment        bool
	ForceOverwriteConfig  bool
	ControlPlaneName      string
	InfraProvider         string
	KubeconfigPath        string
	NumWorkerNodes        int
	ProviderConfigDir     string
	ThreeportPath         string
	Debug                 bool
	Verbose               bool
	SkipTeardown          bool
	ControlPlaneOnly      bool
	KindInfraPortForward  []string
}

GenesisControlPlaneCLIArgs is the set of control plane arguments passed to one of the CLI tools.

func (*GenesisControlPlaneCLIArgs) CreateInstaller

func (*GenesisControlPlaneCLIArgs) GetControlPlaneEnvVars

func (cliArgs *GenesisControlPlaneCLIArgs) GetControlPlaneEnvVars()

GetControlPlaneEnvVars updates cli args based on env vars

type Uninstaller added in v0.5.0

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

Uninstaller contains the necessary information to uninstall a control plane via its cleanOnCreate method.

Jump to

Keyboard shortcuts

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