e2e

package module
v0.0.0-...-2e46929 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	OVN_EGRESSIP_HEALTHCHECK_PORT_ENV_NAME     = "OVN_EGRESSIP_HEALTHCHECK_PORT"
	DEFAULT_OVN_EGRESSIP_GRPC_HEALTHCHECK_PORT = "9107"
	OVN_EGRESSIP_LEGACY_HEALTHCHECK_PORT_ENV   = "0" // the env value to enable legacy health check
	OVN_EGRESSIP_LEGACY_HEALTHCHECK_PORT       = "9" // the actual port used by legacy health check

)
View Source
const PolicyForAnnotation = "k8s.v1.cni.cncf.io/policy-for"

Variables

View Source
var (
	Host             hostExecutor
	ContainerRuntime = "docker"
)

Functions

func CaptureContainerOutput

func CaptureContainerOutput(ctx context.Context, c clientset.Interface, namespace, pod, container, regexpr string) (map[string]string, error)

CaptureContainerOutput captures output of a container according to the right-most match of the provided regex. Returns a map of subexpression name to subexpression capture. A zero string name `""` maps to the full expression capture.

func DumpBGPInfo

func DumpBGPInfo(basePath, testName string, f *framework.Framework)

DumpBGPInfo dumps current bgp specific configuration from frr router container and metallb speaker pod's frr container which helps to troubleshoot if there is any problem with route advertisement for a load balancer service ip address.

func DumpInfo

func DumpInfo(reporter *k8sreporter.KubernetesReporter)

DumpInfo dumps crs, pod container logs, pod specs for namespaces initialized in the reporter into testNameNoSpaces subpath directory. It just collects pod logs for past 10 mins which is more appropriate for test run time.

func ExecCommandInContainerWithFullOutput

func ExecCommandInContainerWithFullOutput(f *framework.Framework, namespace, podName, containerName string, cmd ...string) (string, string, error)

ExecCommandInContainerWithFullOutput is a shameless copy/paste from the framework methods so that we can specify the pod namespace.

func ExecShellInPodWithFullOutput

func ExecShellInPodWithFullOutput(f *framework.Framework, namespace, podName string, cmd string) (string, string, error)

ExecShellInPodWithFullOutput is a shameless copy/paste from the framework methods so that we can specify the pod namespace.

func InitReporter

func InitReporter(kubeconfig, path string, namespaces []string) *k8sreporter.KubernetesReporter

func IsGatewayModeLocal

func IsGatewayModeLocal() bool

IsGatewayModeLocal returns true if the gateway mode is local

func IsIPv6Cluster

func IsIPv6Cluster(c clientset.Interface) bool

IsIPv6Cluster returns true if the kubernetes default service is IPv6

func Map

func Map[T, V any](items []T, fn func(T) V) []V

func StringWithCharset

func StringWithCharset(length int, charset string) string

Types

type BridgeMapping

type BridgeMapping struct {
	// contains filtered or unexported fields
}

func (BridgeMapping) String

func (bm BridgeMapping) String() string

type BridgeMappings

type BridgeMappings []BridgeMapping

func (BridgeMappings) String

func (bms BridgeMappings) String() string

type Executor

type Executor interface {
	Exec(cmd string, args ...string) (string, error)
}

func ForContainer

func ForContainer(containerName string) Executor

func ForPod

func ForPod(namespace, name, container string) Executor

type IpNeighbor

type IpNeighbor struct {
	Dst    string `dst`
	Lladdr string `lladdr`
}

type PodAnnotation

type PodAnnotation struct {
	// IPs are the pod's assigned IP addresses/prefixes
	IPs []*net.IPNet
	// MAC is the pod's assigned MAC address
	MAC net.HardwareAddr
	// Gateways are the pod's gateway IP addresses; note that there may be
	// fewer Gateways than IPs.
	Gateways []net.IP
	// Routes are additional routes to add to the pod's network namespace
	Routes []PodRoute
}

PodAnnotation describes the assigned network details for a single pod network. (The actual annotation may include the equivalent of multiple PodAnnotations.)

type PodRoute

type PodRoute struct {
	// Dest is the route destination
	Dest *net.IPNet
	// NextHop is the IP address of the next hop for traffic destined for Dest
	NextHop net.IP
}

PodRoute describes any routes to be added to the pod's network namespace

Directories

Path Synopsis
The diagnostics package contains different tools to collect data they can be executed using the following flags at the test suite
The diagnostics package contains different tools to collect data they can be executed using the following flags at the test suite

Jump to

Keyboard shortcuts

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