envtest

package
v0.0.18 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DetectK8sVersion

func DetectK8sVersion(b bundle.Bundle) (versions.Selector, error)

DetectK8sVersion attempts to load k8s server version from which was bundle collected.

func Prepare

func Prepare(ctx context.Context, b bundle.Bundle, opts ...Option) (*envtest.Environment, error)

Prepare creates k8s environment for the provided bundle by detecting the k8s version and downloading necessary envtest assets for launching the detected k8s version.

Types

type Environment

type Environment = envtest.Environment

Environment is alias for envtest.Environment.

type Option

type Option func(*env.Env)

Option allows to configure environment.

func Arch

func Arch(arch string) Option

Arch can override default go runtime detected system arch. This can be useful when running on `arm64` and envtest binaries are not available for the platform.

Jump to

Keyboard shortcuts

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