k8s

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const IperfServerCtlPort = 22865

ServerCtlPort control port for the service

View Source
const IperfServerDataPort = 43433

NetperfServerDataPort data port for the service

View Source
const NetperfServerCtlPort = 12865

NetperfServerCtlPort control port for the service

View Source
const NetperfServerDataPort = 42424

NetperfServerDataPort data port for the service

Variables

This section is empty.

Functions

func BuildSUT

func BuildSUT(client *kubernetes.Clientset, s *config.PerfScenarios) error

BuildSUT Build the k8s env to run network performance tests

func CreateDeployment

func CreateDeployment(dp DeploymentParams, client *kubernetes.Clientset) (*appsv1.Deployment, error)

CreateDeployment will create the different deployments we need to do network performance tests

func CreateService

func CreateService(sp ServiceParams, client *kubernetes.Clientset) (*apiv1.Service, error)

CreateService will build a k8s service

func DestroyDeployment

func DestroyDeployment(client *kubernetes.Clientset, dp *appsv1.Deployment) error

DestroyDeployment cleans up a specific deployment

func GetPodNodeInfo

func GetPodNodeInfo(c *kubernetes.Clientset, dp DeploymentParams) (metrics.NodeInfo, error)

GetPodNodeInfo collects the node information for a specific pod

func GetPods

GetPods searches for a specific set of pods from DeploymentParms It returns a PodList if the deployment is found. NOTE : Since we can update the replicas to be > 1, is why I return a PodList.

func GetZone

func GetZone(c *kubernetes.Clientset) (string, int, error)

GetZone will determine if we have a multiAZ/Zone cloud.

func WaitForReady

func WaitForReady(c *kubernetes.Clientset, dp DeploymentParams) (bool, error)

WaitForReady accepts the client and deployment params to determine which pods to watch. It will return a bool based on if the pods ever become ready before we move on.

Types

type DeploymentParams

type DeploymentParams struct {
	HostNetwork     bool
	Name            string
	Namespace       string
	Replicas        int32
	Image           string
	Labels          map[string]string
	Command         []string
	PodAffinity     apiv1.PodAffinity
	PodAntiAffinity apiv1.PodAntiAffinity
	NodeAffinity    apiv1.NodeAffinity
	Port            int
}

DeploymentParams describes the deployment

type ServiceParams

type ServiceParams struct {
	Name      string
	Namespace string
	Labels    map[string]string
	CtlPort   int32
	DataPort  int32
}

ServiceParams describes the service specific details

Jump to

Keyboard shortcuts

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