pods

package
v0.0.0-...-a74e115 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckRestart

func CheckRestart(pod corev1.Pod)

func DefinePodOnNode

func DefinePodOnNode(namespace string, nodeName string) *corev1.Pod

DefinePodOnNode creates the pod defintion with a node selector

func ExecCommand

func ExecCommand(cs *testclient.ClientSet, pod *corev1.Pod, containerName string, command []string) (stdoutBuf, stderrBuf bytes.Buffer, err error)

ExecCommand runs command in the pod and returns buffer output

func ExecutePtpInterfaceCommand

func ExecutePtpInterfaceCommand(pod corev1.Pod, interfaceName string, command string)

func GetPodLogsRegex

func GetPodLogsRegex(namespace string, podName string, containerName, regex string, isLiteralText bool, timeout time.Duration) (matches [][]string, err error)

returns last Regex match in the logs for a given pod

func GetRebootDaemonsetPodsAt

func GetRebootDaemonsetPodsAt(node string) *corev1.PodList

func HasPodLabelOrNodeName

func HasPodLabelOrNodeName(pod *corev1.Pod, label *string, nodeName *string) (result bool, err error)

returns true if a pod has a given label or node name

func PodRole

func PodRole(runningPod *corev1.Pod, label string) (bool, error)

returns true if the pod passed as paremeter is running on the node selected by the label passed as a parameter. the label represent a ptp conformance test role such as: grandmaster, clock under test, slave1, slave2

func RedefineAsPrivileged

func RedefineAsPrivileged(pod *corev1.Pod, containerName string) (*corev1.Pod, error)

RedefineAsPrivileged updates the pod definition to be privileged

func WaitForCondition

func WaitForCondition(cs *testclient.ClientSet, pod *corev1.Pod, conditionType corev1.PodConditionType, conditionStatus corev1.ConditionStatus, timeout time.Duration) error

WaitForCondition waits until the pod will have specified condition type with the expected status

func WaitForPhase

func WaitForPhase(cs *testclient.ClientSet, pod *corev1.Pod, phaseType corev1.PodPhase, timeout time.Duration) error

WaitForPhase waits until the pod will be in specified phase

Types

This section is empty.

Jump to

Keyboard shortcuts

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