Documentation ¶
Overview ¶
Package net implements basic network connecitivity test on Liqo to assess E2E functionality of the network
Index ¶
- Variables
- func CheckNodeToPortConnectivity(ctx context.Context, homeClusterClient kubernetes.Interface, ...) error
- func CheckPodConnectivity(ctx context.Context, homeConfig *restclient.Config, ...) error
- func CheckServiceConnectivity(ctx context.Context, homeConfig *restclient.Config, ...) error
- func CheckTesterPods(ctx context.Context, ...) bool
- func ConnectivityCheckNodeToPod(ctx context.Context, homeClusterClient kubernetes.Interface, ...) error
- func EnsureClusterIP(ctx context.Context, client kubernetes.Interface, name, namespace string) error
- func EnsureNetTesterPods(ctx context.Context, config *tester.ClusterContext, ...) error
- func EnsureNodePort(ctx context.Context, client kubernetes.Interface, name, namespace string) (*v1.Service, error)
- func EnsureNodePortService(ctx context.Context, homeClusterClient kubernetes.Interface, ...) (int, error)
- func GetTesterName(clusterID1, clusterID2 string) (cluster1PodName, cluster2PodName string)
- type TesterOpts
Constants ¶
This section is empty.
Variables ¶
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
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.