environment

package
v0.0.0-...-9b525ab Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2024 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListEnvironments

func ListEnvironments(logger *zap.SugaredLogger, tableData pterm.TableData) pterm.TableData

List Environments in available contexts

func SwitchContext

func SwitchContext(name string) (err error)

Types

type Environment

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

func New

func New(engine string, name string) *Environment

New Environment entity

func (*Environment) CopyEnvironment

func (e *Environment) CopyEnvironment(ctx context.Context, logger *zap.SugaredLogger, source string, destination string) error

Copy Environment from source to destination contexts

func (*Environment) Create

func (e *Environment) Create(ctx context.Context, logger *zap.SugaredLogger) error

Create environment

func (*Environment) CreateK3dEnvironment

func (e *Environment) CreateK3dEnvironment(logger *zap.SugaredLogger) (string, error)

func (*Environment) CreateK3sEnvironment

func (e *Environment) CreateK3sEnvironment(logger *zap.SugaredLogger) (string, error)

func (*Environment) CreateKindEnvironment

func (e *Environment) CreateKindEnvironment(logger *zap.SugaredLogger) (string, error)

func (*Environment) Delete

func (e *Environment) Delete(f bool, logger *zap.SugaredLogger) error

Delete environment cluster

func (*Environment) DeleteK3dEnvironment

func (e *Environment) DeleteK3dEnvironment(logger *zap.SugaredLogger) error

func (*Environment) DeleteK3sEnvironment

func (e *Environment) DeleteK3sEnvironment(logger *zap.SugaredLogger) error

func (*Environment) DeleteKindEnvironment

func (e *Environment) DeleteKindEnvironment(logger *zap.SugaredLogger) error

func (*Environment) GetContextName

func (e *Environment) GetContextName() string

Get contect name specially for engine

func (*Environment) K3dContextName

func (e *Environment) K3dContextName() string

func (*Environment) K3sContextName

func (e *Environment) K3sContextName() string

func (*Environment) KindContextName

func (e *Environment) KindContextName() string

func (*Environment) Setup

func (e *Environment) Setup(ctx context.Context, logger *zap.SugaredLogger) error

Setup environment

func (*Environment) Start

func (e *Environment) Start(ctx context.Context, switcher bool, logger *zap.SugaredLogger) error

Start Environment

func (*Environment) Stop

func (e *Environment) Stop(ctx context.Context, logger *zap.SugaredLogger) error

Stop Environment

func (*Environment) Upgrade

func (e *Environment) Upgrade(ctx context.Context, logger *zap.SugaredLogger) error

Upgrade environemnt with options or new features

func (*Environment) WithContext

func (e *Environment) WithContext(context string) *Environment

func (*Environment) WithHttpPort

func (e *Environment) WithHttpPort(port int) *Environment

func (*Environment) WithHttpsPort

func (e *Environment) WithHttpsPort(port int) *Environment

func (*Environment) WithMountPath

func (e *Environment) WithMountPath(path string) *Environment

type EnvironmentOptions

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

type KindCluster

type KindCluster struct {
	Kind       string     `yaml:"kind"`
	APIVersion string     `yaml:"apiVersion"`
	Nodes      []KindNode `yaml:"nodes"`
}

type KindMount

type KindMount struct {
	HostPath      string `yaml:"hostPath"`
	ContainerPath string `yaml:"containerPath"`
}

type KindNode

type KindNode struct {
	Role                 string            `yaml:"role"`
	ExtraMounts          []KindMount       `yaml:"extraMounts,omitempty"`
	KubeadmConfigPatches []string          `yaml:"kubeadmConfigPatches,omitempty"`
	ExtraPortMappings    []KindPortMapping `yaml:"extraPortMappings,omitempty"`
}

type KindPortMapping

type KindPortMapping struct {
	ContainerPort int    `yaml:"containerPort"`
	HostPort      int    `yaml:"hostPort"`
	Protocol      string `yaml:"protocol"`
}

Jump to

Keyboard shortcuts

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