net

package
v0.8.3 Latest Latest
Warning

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

Go to latest
Published: May 30, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package net implements basic network connecitivity test on Liqo to assess E2E functionality of the network

Index

Constants

This section is empty.

Variables

View Source
var (

	// TestNamespaceName is the namespace name where the test is performed.
	TestNamespaceName = "test-connectivity"
)

Functions

func CheckNodeToPortConnectivity

func CheckNodeToPortConnectivity(ctx context.Context, homeClusterClient kubernetes.Interface, homeClusterID string, nodePortValue int) error

CheckNodeToPortConnectivity contacts the nodePortValue and returns the result.

func CheckPodConnectivity

func CheckPodConnectivity(ctx context.Context,
	homeConfig *restclient.Config, homeClient kubernetes.Interface, cluster1PodName, cluster2PodName string) error

CheckPodConnectivity contacts the remote pod by executing the command inside podRemoteUpdateCluster1.

func CheckServiceConnectivity added in v0.3.1

func CheckServiceConnectivity(ctx context.Context,
	homeConfig *restclient.Config, homeClient kubernetes.Interface, cluster1PodName, cluster2PodName string) error

CheckServiceConnectivity contacts the remote service by executing the command inside podRemoteUpdateCluster1.

func CheckTesterPods

func CheckTesterPods(ctx context.Context,
	homeClient, cluster1Client, cluster2Client kubernetes.Interface,
	homeCluster discoveryv1alpha1.ClusterIdentity, cluster1, cluster2 *TesterOpts) bool

CheckTesterPods retrieves the netTest pods and returns true if all the pods are up and ready.

func ConnectivityCheckNodeToPod

func ConnectivityCheckNodeToPod(ctx context.Context, homeClusterClient kubernetes.Interface, clusterID, remotePodName string) error

ConnectivityCheckNodeToPod creates a NodePort Service and check its availability.

func EnsureClusterIP added in v0.3.1

func EnsureClusterIP(ctx context.Context, client kubernetes.Interface, name, namespace string) error

EnsureClusterIP ensures a Service of type ClusterIP for the netTest.

func EnsureNetTesterPods

func EnsureNetTesterPods(ctx context.Context, config *tester.ClusterContext, cluster1, cluster2 *TesterOpts) error

EnsureNetTesterPods creates the NetTest pods and waits for them to be ready.

func EnsureNodePort

func EnsureNodePort(ctx context.Context, client kubernetes.Interface, name, namespace string) (*v1.Service, error)

EnsureNodePort ensures a Service of type NodePort for the netTest.

func EnsureNodePortService

func EnsureNodePortService(ctx context.Context, homeClusterClient kubernetes.Interface, remotePodName string) (int, error)

EnsureNodePortService creates a nodePortService. It returns the port to contact to reach the service and occurred errors.

func GetTesterName added in v0.3.1

func GetTesterName(clusterID1, clusterID2 string) (cluster1PodName, cluster2PodName string)

GetTesterName returns the names for the connectivity tester pods.

Types

type TesterOpts added in v0.3.1

type TesterOpts struct {
	Cluster   discoveryv1alpha1.ClusterIdentity
	PodName   string
	Offloaded bool
}

TesterOpts contains to handle a connectivity tester pod.

Jump to

Keyboard shortcuts

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