testutils

package
v2.0.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateNNodes

func GenerateNNodes(
	namePrefix string,
	n int,
	label map[string]string,
) ([]runtime.Object, []v1.Node)

func GenerateNPhysicalMachines

func GenerateNPhysicalMachines(
	namePrefix string,
	n int,
	arg PhysicalMachineArg,
) ([]runtime.Object, []v1alpha1.PhysicalMachine)

func GenerateNPods

func GenerateNPods(
	namePrefix string,
	n int,
	podArg PodArg,
) ([]runtime.Object, []v1.Pod)

func NewNode

func NewNode(
	name string,
	label map[string]string,
) v1.Node

func NewPod

func NewPod(p PodArg) v1.Pod

Types

type PhysicalMachineArg

type PhysicalMachineArg struct {
	Name      string
	Namespace string
	Ans       map[string]string
	Labels    map[string]string
	Address   string
}

PhysicalMachineArg by default use `Namespace=metav1.NamespaceDefault`. For the others, the default values are empty.

type PodArg

type PodArg struct {
	Name            string
	Status          v1.PodPhase
	Namespace       string
	Ans             map[string]string
	Labels          map[string]string
	ContainerStatus v1.ContainerStatus
	Nodename        string
}

PodArg by default use `Status=corev1.PodRunning` and `Namespace=metav1.NamespaceDefault`. For the others, the default values are empty.

Jump to

Keyboard shortcuts

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