xpenvfuncs

package
v1.3.4 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: Apache-2.0 Imports: 32 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 ApplyProviderConfigFromDir added in v1.3.0

func ApplyProviderConfigFromDir(dir string) env.Func

ApplyProviderConfigFromDir applies the files from given folder 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 DumpLogs added in v1.1.0

func DumpLogs(clusterName string, dir string) env.Func

DumpLogs Dumps the logs of the cluster to `$PWD/logs` 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 IgnoreMatchedErr

func IgnoreMatchedErr(fn env.Func, errorMatcher func(err error) bool) env.Func

IgnoreMatchedErr checks if a result of fn() returns an error and if the error matches result of errorMatcher() ignores the error to continue with execution

func InstallCrossplane

func InstallCrossplane(clusterName string, opts ...CrossplaneOpt) 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 SimpleSecret added in v1.3.0

func SimpleSecret(name string, namespace string, stringData map[string]string) *corev1.Secret

SimpleSecret Create Opaque secret from non-binary data in crossplane namespace

Types

type CrossplaneOpt added in v1.3.3

type CrossplaneOpt = helm.Option

CrossplaneOpt Option alias for configuring aspects of crossplane installation

func Registry added in v1.3.3

func Registry(registry string) CrossplaneOpt

Registry configures the registry crossplane uses by adding it to the args values

func Version added in v1.3.3

func Version(version string) CrossplaneOpt

Version configures the version of crossplane to be installed

type InstallCrossplaneProviderOptions

type InstallCrossplaneProviderOptions struct {
	Name             string
	Package          string
	ControllerImage  *string // TODO read from package
	ControllerConfig *vendored.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