kind

package
v0.0.0-...-0ff0f7b Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Name              = "kind"
	ClusterNamePrefix = "kte-"

	EnvForceIsolated    = "KTE_FORCE_ISOLATED"
	EnvForceIsolatedAll = "all"

	EnvForcePreexisting       = "KTE_FORCE_PREEXISTING"
	EnvForcePreexistingAll    = "all"
	EnvForcePreexistingShared = "shared"

	EnvPreexitstingKubeconfig = "KTE_PREEXISTING_KUBECONFIG"
)
View Source
const (
	ControlPlaneRole = configv1alpha4.ControlPlaneRole
	WorkerRole       = configv1alpha4.WorkerRole
)

Variables

View Source
var Log = klog.NewKlogr()

Functions

func SharedCollectLogs

func SharedCollectLogs() error

func SharedDelete

func SharedDelete() error

func SharedLogsDir

func SharedLogsDir() string

Types

type Cluster

type Cluster = configv1alpha4.Cluster
var (
	SharedConfig  *Cluster
	SharedTimeout = time.Minute * 10
)

type Common

type Common[T KindProvider] struct {
	// contains filtered or unexported fields
}

func (Common[T]) ApplyAddons

func (k Common[T]) ApplyAddons(ctx context.Context, config addons.Config) error

func (Common[T]) NewClientConfig

func (k Common[T]) NewClientConfig() (*rest.Config, error)

func (Common[T]) NewClientMaker

func (k Common[T]) NewClientMaker() (*clients.ClientMaker, error)

type KindLifecycle

type KindLifecycle interface {
	KindProvider

	Create(config *Cluster, timeout time.Duration) error
	CollectLogs() error
	LogsDir() string
	Delete() error
}

func New

func New(artifactDir string, logger klog.Logger) KindLifecycle

type KindProvider

type KindProvider interface {
	ClusterName() string
	KubeConfigPath() string
	NewClientConfig() (*rest.Config, error)
	NewClientMaker() (*clients.ClientMaker, error)
	ApplyAddons(context.Context, addons.Config) error
}

func Shared

func Shared(logger klog.Logger) (KindProvider, error)

type Managed

type Managed struct {
	Common[KindProvider]

	UUID uuid.UUID

	*cluster.Provider

	NodeImage string
	Retain    bool

	ArtifactDir string
	Logger      klog.Logger
}

func (*Managed) ClusterName

func (k *Managed) ClusterName() string

func (*Managed) CollectLogs

func (k *Managed) CollectLogs() error

func (*Managed) Create

func (k *Managed) Create(config *Cluster, timeout time.Duration) error

func (*Managed) Delete

func (k *Managed) Delete() error

func (*Managed) KubeConfigPath

func (k *Managed) KubeConfigPath() string

func (*Managed) LogsDir

func (k *Managed) LogsDir() string

type Networking

type Networking = configv1alpha4.Networking

type Node

type Node = configv1alpha4.Node

type Unmanaged

type Unmanaged struct {
	Common[KindProvider]

	Logger klog.Logger
	// contains filtered or unexported fields
}

func NewUnmanaged

func NewUnmanaged(logger klog.Logger, importKubeconfigPath string) *Unmanaged

func (*Unmanaged) ClusterName

func (k *Unmanaged) ClusterName() string

func (*Unmanaged) CollectLogs

func (k *Unmanaged) CollectLogs() error

func (*Unmanaged) Create

func (k *Unmanaged) Create(config *Cluster, timeout time.Duration) error

func (*Unmanaged) Delete

func (k *Unmanaged) Delete() error

func (*Unmanaged) KubeConfigPath

func (k *Unmanaged) KubeConfigPath() string

func (*Unmanaged) LogsDir

func (k *Unmanaged) LogsDir() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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