xenvfuncs

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2023 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// CrossplaneNamespace the namespace crossplane will be installed to
	CrossplaneNamespace = "crossplane-system"
)

Variables

This section is empty.

Functions

func ApplyProviderConfig

func ApplyProviderConfig(ctx context.Context, cfg *envconf.Config) (context.Context, error)

ApplyProviderConfig applys the files from `./data/provider` and mutates their namespace

func ApplySecretInCrossplaneNamespace

func ApplySecretInCrossplaneNamespace(name string, data map[string]string) env.Func

ApplySecretInCrossplaneNamespace creates secret that is used by providers in the crossplane namespace

func AwaitCRDsEstablished

func AwaitCRDsEstablished(ctx context.Context, cfg *envconf.Config) (context.Context, error)

AwaitCRDsEstablished waits until all CRDs do have a condition `Established` == true

func Compose

func Compose(envfuncs ...env.Func) env.Func

Compose executes multiple env.Funcs in a row

func Conditional

func Conditional(fn env.Func, condition bool) env.Func

Conditional executes a fn based on conditional

func CreateTestNamespace

func CreateTestNamespace(ctx context.Context, cfg *envconf.Config) (context.Context, error)

CreateTestNamespace Creates the test namespace, name comes from kubernetes-e2e

func DeleteTestNamespace

func DeleteTestNamespace(ctx context.Context, cfg *envconf.Config) (context.Context, error)

DeleteTestNamespace Deletes the test namespace, name comes from kubernetes-e2e

func DumpKindLogs

func DumpKindLogs(clusterName string) env.Func

DumpKindLogs Dumps the logs of the cluster to `$PWD/logs` using kind export func

func DumpKubernetesLogs

func DumpKubernetesLogs(ctx context.Context, identifier string) (context.Context, error)

DumpKubernetesLogs Dumps the logs of the cluster to `$PWD/logs-$identifier` using kind export func

func IgnoreErr

func IgnoreErr(fn env.Func) env.Func

IgnoreErr exec's fn, logs possible error away continues w/o error

func InstallCrossplane

func InstallCrossplane(clusterName string) env.Func

InstallCrossplane returns an env.Func that is used to install crossplane into the given cluster

func InstallCrossplaneProvider

func InstallCrossplaneProvider(clusterName string, opts InstallCrossplaneProviderOptions) env.Func

InstallCrossplaneProvider returns an env.Func that is used to install a crossplane provider into the active cluster

func LoadSchemas

func LoadSchemas(addToSchemaFuncs ...func(s *runtime.Scheme) error) env.Func

LoadSchemas prepares the kubernetes client with additional schemas

func SetClusterName

func SetClusterName(clusterName string) env.Func

SetClusterName Sets the name of the cluster into context to retrieve it by other functions

Types

type InstallCrossplaneProviderOptions

type InstallCrossplaneProviderOptions struct {
	Name             string
	Package          string
	ControllerImage  *string // TODO read from package
	ControllerConfig *v1alpha1.ControllerConfig
}

InstallCrossplaneProviderOptions hols information on the tested provider

Jump to

Keyboard shortcuts

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