e2e

package
v1.26.3-rke2r1-build20... Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CountOfStringInSlice

func CountOfStringInSlice(str string, pods []Pod) int

func CreateCluster

func CreateCluster(nodeOS string, serverCount int, agentCount int) ([]string, []string, error)

func DeleteWorkload

func DeleteWorkload(workload, kubeconfig string) error

DeleteWorkload Deletes the content of a manifest file previously applied

func DeployWorkload

func DeployWorkload(workload string, kubeconfig string) (string, error)

func DestroyCluster

func DestroyCluster() error

func FetchClusterIP

func FetchClusterIP(kubeconfig string, servicename string, dualStack bool) (string, error)

func FetchIngressIP

func FetchIngressIP(kubeconfig string) ([]string, error)

func FetchNodeExternalIP

func FetchNodeExternalIP(nodename string) (string, error)

func GenKubeConfigFile

func GenKubeConfigFile(serverName string) (string, error)

func GenReport

func GenReport(specReport ginkgo.SpecReport)

GenReport returns the relevant lines from test results in json format

func GetVagrantLog

func GetVagrantLog(cErr error) string

GetVagrantLog returns the logs of on vagrant commands that initialize the nodes and provision RKE2 on each node. It also attempts to fetch the systemctl logs of RKE2 on nodes where the rke2.service failed.

func PodIPsUsingLabel

func PodIPsUsingLabel(kubeConfigFile string, label string) ([]string, error)

PodIPsUsingLabel returns the IPs of the pods with a label (only single-stack supported)

func RestartCluster

func RestartCluster(nodeNames []string) error

RestartCluster restarts the rke2 service on each server-agent given

func RunCmdOnNode

func RunCmdOnNode(cmd string, nodename string) (string, error)

RunCmdOnNode executes a command from within the given node

func RunCommand

func RunCommand(cmd string) (string, error)

RunCommand execute a command on the host

func UpgradeCluster

func UpgradeCluster(serverNodenames []string, agentNodenames []string) error

Types

type Node

type Node struct {
	Name       string
	Status     string
	Roles      string
	InternalIP string
	ExternalIP string
}

func ParseNodes

func ParseNodes(kubeConfig string, print bool) ([]Node, error)

type NodeError

type NodeError struct {
	Node string
	Cmd  string
	Err  error
}

func (*NodeError) Error

func (ne *NodeError) Error() string

func (*NodeError) Unwrap

func (ne *NodeError) Unwrap() error

type Pod

type Pod struct {
	NameSpace string
	Name      string
	Ready     string
	Status    string
	Restarts  string
	NodeIP    string
	Node      string
}

func ParsePods

func ParsePods(kubeconfig string, print bool) ([]Pod, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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