Documentation ¶
Index ¶
- func CreateAndStart(pod *corev1.Pod) (*corev1.Pod, error)
- func CreateDPDKWorkload(nodeSelector map[string]string, command string, image string, ...) (*corev1.Pod, error)
- func DefineDPDKWorkload(nodeSelector map[string]string, command string, image string, ...) *corev1.Pod
- func DefinePod(namespace string) *corev1.Pod
- func DefinePodOnHostNetwork(namespace string, nodeName string) *corev1.Pod
- func DefinePodOnNode(namespace string, nodeName string) *corev1.Pod
- func DefineWithHugePages(namespace, nodeName string) *corev1.Pod
- func DefineWithNetworks(namespace string, networks []string) *corev1.Pod
- func DetectDefaultRouteInterface(cs *testclient.ClientSet, pod corev1.Pod) (string, error)
- func ExecCommand(cs *testclient.ClientSet, pod corev1.Pod, command []string) (bytes.Buffer, error)
- func ExecCommandInContainer(cs *testclient.ClientSet, pod corev1.Pod, containerName string, ...) (bytes.Buffer, error)
- func GetLog(p *corev1.Pod) (string, error)
- func GetLogForContainer(p *corev1.Pod, containerName string) (string, error)
- func GetStringEventsForPodFn(cs *testclient.ClientSet, pod *corev1.Pod) func() string
- func RedefineAsPrivileged(pod *corev1.Pod, containerName string) (*corev1.Pod, error)
- func RedefinePodWithNetwork(pod *corev1.Pod, networksSpec string) *corev1.Pod
- func RedefineWithCommand(pod *corev1.Pod, command []string, args []string) *corev1.Pod
- func RedefineWithGuaranteedQoS(pod *corev1.Pod, cpu, memory string) *corev1.Pod
- func RedefineWithLabel(pod *corev1.Pod, key, value string) *corev1.Pod
- func RedefineWithPodAffinityOnLabel(pod *corev1.Pod, key, value string) *corev1.Pod
- func RedefineWithRestartPolicy(pod *corev1.Pod, restartPolicy corev1.RestartPolicy) *corev1.Pod
- func RedefineWithRestrictedPrivileges(pod *corev1.Pod) *corev1.Pod
- func WaitForCondition(cs *testclient.ClientSet, pod *corev1.Pod, ...) error
- func WaitForDeletion(cs *testclient.ClientSet, pod *corev1.Pod, timeout time.Duration) error
- func WaitForPhase(cs *testclient.ClientSet, pod *corev1.Pod, phaseType corev1.PodPhase, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateDPDKWorkload ¶
func DefineDPDKWorkload ¶
func DefinePodOnHostNetwork ¶
DefinePodOnHostNetwork updates the pod defintion with a host network flag
func DefinePodOnNode ¶
DefinePodOnNode creates the pod defintion with a node selector
func DefineWithHugePages ¶
DefineWithHugePages creates a pod with a 4Gi of hugepages and run command to write data to that memory
func DefineWithNetworks ¶
DefineWithNetworks defines a pod with the given secondary networks.
func DetectDefaultRouteInterface ¶
DetectDefaultRouteInterface returns pod's interface bounded to the default route which contains Destination=00000000 and Metric=00000000 Typical route table look like present below: Iface Destination(1) Gateway Flags RefCnt Use Metric Mask(7) MTU Window IRTT enp2s0 00000000 016FA8C0 0003 0 0 101 00000000 0 0 0 < This is default route tun0 0000800A 00000000 0001 0 0 0 0000FCFF 0 0 0 enp2s0 006FA8C0 00000000 0001 0 0 101 00FFFFFF 0 0 0 enp6s0 00C7A8C0 00000000 0001 0 0 102 00FFFFFF 0 0 0
func ExecCommand ¶
ExecCommand runs command in the pod's firts container and returns buffer output
func ExecCommandInContainer ¶
func ExecCommandInContainer(cs *testclient.ClientSet, pod corev1.Pod, containerName string, command []string) (bytes.Buffer, error)
ExecCommand runs command in the specified container and returns buffer output
func GetLogForContainer ¶
GetLog connects to a pod and fetches log from a specific container
func GetStringEventsForPodFn ¶
func GetStringEventsForPodFn(cs *testclient.ClientSet, pod *corev1.Pod) func() string
func RedefineAsPrivileged ¶
RedefineAsPrivileged updates the pod definition to be privileged
func RedefinePodWithNetwork ¶
RedefinePodWithNetwork updates the pod defintion with a network annotation
func RedefineWithCommand ¶
RedefineWithCommand updates the pod defintion with a different command
func RedefineWithGuaranteedQoS ¶
RedefineWithGuaranteedQoS updates the pod definition by adding resource limits and request to the specified values. As requests and limits are equal, the pod will work with a Guarantted quality of service (QoS). Resource specification are added to the first container
func RedefineWithLabel ¶
RedefineWithLabel add a label to the ObjectMeta.Labels field of the pod, instantiating the map if necessary. Override the previous label it is already present.
func RedefineWithPodAffinityOnLabel ¶
RedefineWithPodAfinityOnLabel sets the spec.podAffinity field using the given label key and value. It can be use to ensure a pod is scheduled on the same node as another, selecting the reference pod by a label.
func RedefineWithRestartPolicy ¶
RedefineWithRestartPolicy updates the pod defintion with a restart policy
func RedefineWithRestrictedPrivileges ¶
RedefineWithRestrictedPrivileges enforces restricted privileges on the pod.
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 WaitForDeletion ¶
WaitForDeletion waits until the pod will be removed from the cluster
Types ¶
This section is empty.