types

package
v0.0.0-...-35696f1 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultKubeConfigPath

func DefaultKubeConfigPath() string

DefaultKubeConfigPath returns the default path for KUBECONFIG: ~/.kube/config.

Types

type Installer

type Installer interface {
	// Install deploys manifests specific to the platform
	Install(ctx context.Context) error
	// Uninstall deploys manifests specific to the platform
	Uninstall(ctx context.Context) error
	// Deployments list of names for deployments
	Deployments() []string
}

type InstallerType

type InstallerType string
const (
	InstallerTypeHelm InstallerType = "helm"
)

func (*InstallerType) UnmarshalText

func (i *InstallerType) UnmarshalText(text []byte) error

type MultiInstaller

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

func NewMultiInstaller

func NewMultiInstaller(installers ...Installer) *MultiInstaller

func (*MultiInstaller) Deployments

func (m *MultiInstaller) Deployments() []string

func (*MultiInstaller) Install

func (m *MultiInstaller) Install(ctx context.Context) error

func (*MultiInstaller) Uninstall

func (m *MultiInstaller) Uninstall(ctx context.Context) error

type NoOpInstaller

type NoOpInstaller struct{}

func (*NoOpInstaller) Deployments

func (i *NoOpInstaller) Deployments() []string

func (*NoOpInstaller) Install

func (i *NoOpInstaller) Install(_ context.Context) error

func (*NoOpInstaller) Uninstall

func (i *NoOpInstaller) Uninstall(_ context.Context) error

type Provider

type Provider interface {
	// SetUp the test environment by installing the necessary components.
	// Returns error if it fails to set up the environment.
	SetUp(ctx context.Context) error
	// TearDown the test environment by uninstalling components installed via Setup.
	// Returns error if it fails to clean up the environment.
	TearDown(ctx context.Context) error
	// KubeConfig returns the KUBECONFIG for the cluster.
	KubeConfig(ctx context.Context) (string, error)
	// ExportKubeConfig exports the KUBECONFIG for the cluster, merging
	// it into the selected file, following the rules from
	// https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#config
	// where explicitPath is the --kubeconfig value.
	ExportKubeConfig(ctx context.Context, explicitPath string) error
	// ClusterName returns the name of the cluster the provider operates on.
	ClusterName() string
}

type ProviderConfig

type ProviderConfig struct {
	ClusterName            string        `mapstructure:"cluster_name"`
	ClusterCreationTimeout time.Duration `mapstructure:"cluster_creation_timeout"`
	KubeConfigPath         string        `mapstructure:"kubeconfig"`
	KubernetesVersion      string        `mapstructure:"version"`
}

type ProviderType

type ProviderType string
const (
	ProviderTypeKind     ProviderType = "kind"
	ProviderTypeExternal ProviderType = "external"
)

func (*ProviderType) UnmarshalText

func (p *ProviderType) UnmarshalText(text []byte) error

Jump to

Keyboard shortcuts

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