config

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultMinSleepChurn = 20 * time.Second
	RequestTimeout       = 15 * time.Second

	// Set no limit for QPS and Burst
	Burst = 0
	QPS   = 0
)
View Source
const (
	Replica   = "replica"
	Namespace = "namespace"
)

Object template global input variable name

View Source
const (
	// WorkloadUUIDLabel identifies all namespaces and objects created within the workload
	WorkloadUUIDLabel = "kubevirt-load-generator-workload"
	Type              = "burst"

	Timeout = time.Duration(5 * time.Minute)
)

Default config values

Variables

View Source
var (
	ContainerPrefix = "registry:5000/kubevirt"
	ContainerTag    = "devel"
)

Functions

func AddLabels added in v0.53.0

func AddLabels(obj *unstructured.Unstructured, uuid string)

func GetListOpts added in v0.53.0

func GetListOpts(label string, uuid string) *metav1.ListOptions

func NewKubevirtClient added in v0.53.0

func NewKubevirtClient() kubecli.KubevirtClient

NewKubeClient

Types

type Duration

type Duration struct {
	time.Duration
}

func (Duration) MarshalJSON

func (d Duration) MarshalJSON() ([]byte, error)

func (*Duration) UnmarshalJSON

func (d *Duration) UnmarshalJSON(b []byte) error

type ObjectSpec

type ObjectSpec struct {
	// TemplateFile relative path to a valid YAML definition of a kubevirt resource
	TemplateFile string `yaml:"templateFile" json:"templateFile,omitempty"`
	// ObjectTemplate contains the object template that must be fill with global and arbitrary user-defined input variables
	ObjectTemplate []byte `yaml:"objectTemplate" json:"objectTemplate,omitempty"`
	// InputVars contains a map of arbitrary user-define input variables
	// that can be introduced in the template by users
	InputVars map[string]interface{} `yaml:"inputVars" json:"inputVars,omitempty"`
}

ObjectSpec defines an object spec that the load generator will create (e.g. VMs, VMIs, etc)

type TestType added in v0.53.0

type TestType string

type Workload

type Workload struct {
	Name          string      `yaml:"name" json:"name"`
	Object        *ObjectSpec `yaml:"object" json:"object"`
	Type          TestType    `yaml:"type" json:"type"`
	Timeout       Duration    `yaml:"timeout" json:"timeout,omitempty"`
	Count         int         `yaml:"count" json:"count"`
	Churn         int         `yaml:"churn" json:"churn,omitempty"`
	MinChurnSleep *Duration   `yaml:"minChurnSleep" json:"minChurnSleep,omitempty"`
}

Workload defines a load generator workload

func NewWorkload added in v0.53.0

func NewWorkload(testConfigPath string) *Workload

NewWorkload reads the test configuration file

func (*Workload) LoadObjTemplate added in v0.53.0

func (w *Workload) LoadObjTemplate()

LoadObjTemplate reads a YAML file with the object template for each object defined in the workload's jobs

Jump to

Keyboard shortcuts

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