Documentation ¶
Index ¶
- Constants
- func BuildSUT(client *kubernetes.Clientset, s *config.PerfScenarios) error
- func CreateDeployment(dp DeploymentParams, client *kubernetes.Clientset) (*appsv1.Deployment, error)
- func CreateService(sp ServiceParams, client *kubernetes.Clientset) (*apiv1.Service, error)
- func DestroyDeployment(client *kubernetes.Clientset, dp appsv1.Deployment) error
- func DestroyService(client *kubernetes.Clientset, serv apiv1.Service) error
- func GetDeployments(client *kubernetes.Clientset, namespace string) (*appsv1.DeploymentList, error)
- func GetNodeLabels(c *kubernetes.Clientset, node string) (map[string]string, error)
- func GetPodNodeInfo(c *kubernetes.Clientset, dp DeploymentParams) (metrics.NodeInfo, error)
- func GetPods(c *kubernetes.Clientset, dp DeploymentParams) (apiv1.PodList, error)
- func GetServices(client *kubernetes.Clientset, namespace string) (*apiv1.ServiceList, error)
- func GetZone(c *kubernetes.Clientset) (string, map[string]int, error)
- func WaitForDelete(c *kubernetes.Clientset, dp appsv1.Deployment) (bool, error)
- func WaitForReady(c *kubernetes.Clientset, dp DeploymentParams) (bool, error)
- type DeploymentParams
- type ServiceParams
Constants ¶
const IperfServerCtlPort = 22865
IperfServerCtlPort control port for the service
const IperfServerDataPort = 43433
IperfServerDataPort data port for the service
const NetperfServerCtlPort = 12865
NetperfServerCtlPort control port for the service
const NetperfServerDataPort = 42424
NetperfServerDataPort data port for the service
const UperfServerCtlPort = 30000
UperferverCtlPort control port for the service
const UperfServerDataPort = 30001
UperfServerDataPort 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 from a namespace
func DestroyService ¶
func DestroyService(client *kubernetes.Clientset, serv apiv1.Service) error
DestroyService cleans up a specific service from a namespace
func GetDeployments ¶
func GetDeployments(client *kubernetes.Clientset, namespace string) (*appsv1.DeploymentList, error)
GetDeployments retrieve all deployments for a given namespace, in this case for netperf
func GetNodeLabels ¶ added in v0.1.9
GetNodeLabels Return Labels for a specific node
func GetPodNodeInfo ¶
func GetPodNodeInfo(c *kubernetes.Clientset, dp DeploymentParams) (metrics.NodeInfo, error)
GetPodNodeInfo collects the node information for a specific pod
func GetPods ¶
func GetPods(c *kubernetes.Clientset, dp DeploymentParams) (apiv1.PodList, error)
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 GetServices ¶
func GetServices(client *kubernetes.Clientset, namespace string) (*apiv1.ServiceList, error)
GetServices retrieve all services for a given namespoace, in this case for netperf
func GetZone ¶
GetZone will determine if we have a multiAZ/Zone cloud. returns string of the zone, int of the node count in that zone, error if encountered a problem.
func WaitForDelete ¶ added in v0.1.8
func WaitForDelete(c *kubernetes.Clientset, dp appsv1.Deployment) (bool, error)
WaitForDelete return true if the deployment is deleted, false otherwise. Error if it goes bad.
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 Commands [][]string PodAffinity apiv1.PodAffinity PodAntiAffinity apiv1.PodAntiAffinity NodeAffinity apiv1.NodeAffinity Port int }
DeploymentParams describes the deployment Server pod can run multiple containers, each command in Commands will represent a container command