kubernetes

package
v0.0.0-...-e46bc45 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NamespacesMustBeAccepted

func NamespacesMustBeAccepted(t *testing.T, c client.Client, timeoutConfig config.TimeoutConfig, namespaces []string)

NamespacesMustBeAccepted waits until all Pods are marked ready.

Types

type Applier

type Applier struct {
	NamespaceLabels map[string]string
	// ValidUniqueListenerPorts maps each listener port of each Gateway in the
	// manifests to a valid, unique port. There must be as many
	// ValidUniqueListenerPorts as there are listeners in the set of manifests.
	// For example, given two Gateways, each with 2 listeners, there should be
	// four ValidUniqueListenerPorts.
	// If empty or nil, ports are not modified.
	ValidUniqueListenerPorts []v1beta1.PortNumber

	// GatewayClass will be used as the spec.gatewayClassName when applying Gateway resources
	GatewayClass string

	// ControllerName will be used as the spec.controllerName when applying GatewayClass resources
	ControllerName string
}

Applier prepares manifests depending on the available options and applies them to the Kubernetes cluster.

func (Applier) MustApplyObjectsWithCleanup

func (a Applier) MustApplyObjectsWithCleanup(t *testing.T, c client.Client, timeoutConfig config.TimeoutConfig, resources []client.Object, cleanup bool)

MustApplyObjectsWithCleanup adds cleanup resource handler for the test

func (Applier) MustApplyWithCleanup

func (a Applier) MustApplyWithCleanup(t *testing.T, c client.Client, timeoutConfig config.TimeoutConfig, location string, cleanup bool)

MustApplyWithCleanup creates or updates Kubernetes resources defined with the provided YAML file and registers a cleanup function for resources it created. Note that this does not remove resources that already existed in the cluster.

Jump to

Keyboard shortcuts

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