cluster

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2021 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterAPI

type ClusterAPI struct {
	Clientset  *kubernetes.Clientset
	NetClient  *netclient.K8sCniCncfIoV1Client
	RestConfig *restclient.Config
}

ClusterAPI object containing k8s cni cncf api client referneces

func NewClusterAPI

func NewClusterAPI(kubeconfig string) *ClusterAPI

NewClusterAPI creates and returns new cluster API object

func (*ClusterAPI) CreateNetworkAttachmentDefinition

func (api *ClusterAPI) CreateNetworkAttachmentDefinition(nadName, bridgeName, config string)

CreateNetworkAttachmentDefinition creates nad object on the test namespace

func (*ClusterAPI) CreatePrivilegedPodWithIP

func (api *ClusterAPI) CreatePrivilegedPodWithIP(podName, nadName, bridgeName, cidr string)

CreatePrivilegedPodWithIP creates a pod attached with ovs via secondary network

func (*ClusterAPI) CreateTestNamespace

func (api *ClusterAPI) CreateTestNamespace()

CreateTestNamespace creates a test namespace on the k8s cluster

func (*ClusterAPI) DeletePodsInTestNamespace

func (api *ClusterAPI) DeletePodsInTestNamespace()

DeletePodsInTestNamespace deletes all the pods in the test namespace

func (*ClusterAPI) PingFromPod

func (api *ClusterAPI) PingFromPod(podName, containerName, targetIP string) error

PingFromPod run the ping command on the pod container towards targetIP

func (*ClusterAPI) RemoveNetworkAttachmentDefinition

func (api *ClusterAPI) RemoveNetworkAttachmentDefinition(nadName string)

RemoveNetworkAttachmentDefinition deletes nad object from test namespace

func (*ClusterAPI) RemoveTestNamespace

func (api *ClusterAPI) RemoveTestNamespace()

RemoveTestNamespace removes the test namespace from the k8s cluster

Jump to

Keyboard shortcuts

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