environment

package
v0.2.11 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2022 License: MIT Imports: 25 Imported by: 4 modules, 4 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Artifacts

type Artifacts struct {
	Namespace string
	DBName    string
	Client    *client.K8sClient
	// contains filtered or unexported fields
}

Artifacts is an artifacts dumping structure that copies logs and database dumps for all deployed pods

func NewArtifacts

func NewArtifacts(client *client.K8sClient, namespace string) (*Artifacts, error)

NewArtifacts create new artifacts instance for provided environment

func (*Artifacts) DumpTestResult

func (a *Artifacts) DumpTestResult(testDir string, dbName string) error

DumpTestResult dumps all pods logs and db dump in a separate test dir

type Config

type Config struct {
	TTL               time.Duration
	NamespacePrefix   string
	Namespace         string
	Labels            []string
	NSLabels          *map[string]*string
	ReadyCheckData    *client.ReadyCheckData
	DryRun            bool
	InsideK8s         bool
	KeepConnection    bool
	RemoveOnInterrupt bool
}

Config environment configuration

type ConnectedChart added in v0.2.3

type ConnectedChart interface {
	IsDeploymentNeeded() bool
	GetName() string
	GetPath() string
	GetProps() interface{}
	GetValues() *map[string]interface{}
	ExportData(e *Environment) error
}

ConnectedChart interface to interact both with cdk8s apps and helm charts

type Environment

type Environment struct {
	App cdk8s.App

	Charts    []ConnectedChart
	Cfg       *Config
	Client    *client.K8sClient
	Fwd       *client.Forwarder
	Artifacts *Artifacts
	Chaos     *client.Chaos
	URLs      map[string][]string
	// contains filtered or unexported fields
}

func New

func New(cfg *Config) *Environment

New creates new environment

func (*Environment) AddChart added in v0.2.3

func (m *Environment) AddChart(f func(root cdk8s.Chart) ConnectedChart) *Environment

func (*Environment) AddHelm added in v0.2.3

func (m *Environment) AddHelm(chart ConnectedChart) *Environment

func (*Environment) Clear added in v0.2.3

func (m *Environment) Clear()

func (*Environment) Deploy

func (m *Environment) Deploy(manifest string) error

Deploy deploy synthesized manifest and check logs for readiness

func (*Environment) PrintURLs added in v0.2.3

func (m *Environment) PrintURLs() error

func (*Environment) Run added in v0.2.3

func (m *Environment) Run() error

Run deploys or connects to already created environment

func (*Environment) Shutdown

func (m *Environment) Shutdown() error

Shutdown environment, remove namespace

Jump to

Keyboard shortcuts

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