v1alpha1

package
v0.0.0-...-525fac3 Latest Latest
Warning

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

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

Documentation

Overview

Package v1 contains API Schema definitions for the cnsbench v1 API group +kubebuilder:object:generate=true +groupName=cnsbench.example.com

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "cnsbench.example.com", Version: "v1alpha1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

This section is empty.

Types

type ActionOutput

type ActionOutput struct {
	OutputName string `json:"outputName"`
}

func (*ActionOutput) DeepCopy

func (in *ActionOutput) DeepCopy() *ActionOutput

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ActionOutput.

func (*ActionOutput) DeepCopyInto

func (in *ActionOutput) DeepCopyInto(out *ActionOutput)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Benchmark

type Benchmark struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   BenchmarkSpec   `json:"spec,omitempty"`
	Status BenchmarkStatus `json:"status,omitempty"`
}

Benchmark is the Schema for the benchmarks API

func (*Benchmark) DeepCopy

func (in *Benchmark) DeepCopy() *Benchmark

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Benchmark.

func (*Benchmark) DeepCopyInto

func (in *Benchmark) DeepCopyInto(out *Benchmark)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Benchmark) DeepCopyObject

func (in *Benchmark) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type BenchmarkCondition

type BenchmarkCondition struct {
	// +optional
	// +nullable
	LastProbeTime      metav1.Time `json:"lastProbeTime"`
	LastTransitionTime metav1.Time `json:"lastTransitionTime"`
	// +optional
	// +nullable
	Message string `json:"message"`
	// +optional
	// +nullable
	Reason string `json:"reason"`
	Status string `json:"status"`
	Type   string `json:"type"`
}

func (*BenchmarkCondition) DeepCopy

func (in *BenchmarkCondition) DeepCopy() *BenchmarkCondition

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BenchmarkCondition.

func (*BenchmarkCondition) DeepCopyInto

func (in *BenchmarkCondition) DeepCopyInto(out *BenchmarkCondition)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type BenchmarkList

type BenchmarkList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Benchmark `json:"items"`
}

BenchmarkList contains a list of Benchmark

func (*BenchmarkList) DeepCopy

func (in *BenchmarkList) DeepCopy() *BenchmarkList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BenchmarkList.

func (*BenchmarkList) DeepCopyInto

func (in *BenchmarkList) DeepCopyInto(out *BenchmarkList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*BenchmarkList) DeepCopyObject

func (in *BenchmarkList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type BenchmarkSpec

type BenchmarkSpec struct {
	// +optional
	// +nullable
	Runtime string `json:"runtime"`

	// +optional
	// +nullable
	Volumes []Volume `json:"volumes"`

	// +optional
	// +nullable
	Workloads []Workload `json:"workloads"`

	// +optional
	// +nullable
	ControlOperations []ControlOperation `json:"controlOperations"`

	// +optional
	// +nullable
	Rates []Rate `json:"rates"`

	// +optional
	// +nullable
	// +kubebuilder:default:=defaultWorkloadsOutput
	WorkloadsOutput string `json:"workloadsOutput"`

	// Output sink for the benchmark metadata, e.g. the spec and
	// start and completion times
	// +optional
	// +nullable
	// +kubebuilder:default:=defaultMetadataOutput
	MetadataOutput string `json:"metadataOutput"`

	// +optional
	// +nullable
	// +kubebuilder:default:=defaultMetricsOutput
	MetricsOutput string `json:"metricsOutput"`

	// +optional
	// +nullable
	Outputs []Output `json:"outputs"`
}

BenchmarkSpec defines the desired state of Benchmark

func (*BenchmarkSpec) DeepCopy

func (in *BenchmarkSpec) DeepCopy() *BenchmarkSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BenchmarkSpec.

func (*BenchmarkSpec) DeepCopyInto

func (in *BenchmarkSpec) DeepCopyInto(out *BenchmarkSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type BenchmarkState

type BenchmarkState string
const (
	Complete     BenchmarkState = "Complete"
	Running      BenchmarkState = "Running"
	Initializing BenchmarkState = "Initializing"
)

type BenchmarkStatus

type BenchmarkStatus struct {
	State BenchmarkState `json:"state"`

	// +optional
	// +nullable
	CompletionTime metav1.Time `json:"completionTime"`

	// +optional
	// +nullable
	InitCompletionTime metav1.Time `json:"initCompletionTime"`

	// +optional
	// +nullable
	TargetCompletionTimeUnix int64 `json:"targetCompletionTimeUnix"`
	// +optional
	// +nullable
	TargetCompletionTime metav1.Time `json:"targetCompletionTime"`

	CompletionTimeUnix     int64 `json:"completionTimeUnix"`
	StartTimeUnix          int64 `json:"startTimeUnix"`
	InitCompletionTimeUnix int64 `json:"initCompletionTimeUnix"`

	NumCompletedObjs int `json:"numCompletedObjs"`

	// This doesn't include RuneOnce actions
	RunningWorkloads int `json:"runningWorkloads"`
	RunningRates     int `json:"runningRates"`

	Conditions []BenchmarkCondition `json:"conditions"`
}

BenchmarkStatus defines the observed state of Benchmark

func (*BenchmarkStatus) DeepCopy

func (in *BenchmarkStatus) DeepCopy() *BenchmarkStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BenchmarkStatus.

func (*BenchmarkStatus) DeepCopyInto

func (in *BenchmarkStatus) DeepCopyInto(out *BenchmarkStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ConstantIncreaseDecreaseRate

type ConstantIncreaseDecreaseRate struct {
	IncInterval int `json:"incInterval"`
	DecInterval int `json:"decInterval"`
	Max         int `json:"max"`
	Min         int `json:"min"`
}

func (*ConstantIncreaseDecreaseRate) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConstantIncreaseDecreaseRate.

func (*ConstantIncreaseDecreaseRate) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ConstantRate

type ConstantRate struct {
	Interval int `json:"interval"`
}

func (*ConstantRate) DeepCopy

func (in *ConstantRate) DeepCopy() *ConstantRate

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConstantRate.

func (*ConstantRate) DeepCopyInto

func (in *ConstantRate) DeepCopyInto(out *ConstantRate)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ControlOperation

type ControlOperation struct {
	Name string `json:"name"`

	// +optional
	// +nullable
	SnapshotSpec Snapshot `json:"snapshotSpec"`

	// +optional
	// +nullable
	ScaleSpec Scale `json:"scaleSpec"`

	// +optional
	// +nullable
	DeleteSpec Delete `json:"deleteSpec"`

	// +optional
	// +nullable
	Outputs ActionOutput `json:"outputs"`

	// +optional
	// +nullable
	RateName string `json:"rateName"`
}

func (*ControlOperation) DeepCopy

func (in *ControlOperation) DeepCopy() *ControlOperation

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControlOperation.

func (*ControlOperation) DeepCopyInto

func (in *ControlOperation) DeepCopyInto(out *ControlOperation)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Delete

type Delete struct {
	APIVersion string               `json:"apiVersion"`
	Kind       string               `json:"kind"`
	Selector   metav1.LabelSelector `json:"selector"`
}

func (*Delete) DeepCopy

func (in *Delete) DeepCopy() *Delete

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Delete.

func (*Delete) DeepCopyInto

func (in *Delete) DeepCopyInto(out *Delete)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type HttpPost

type HttpPost struct {
	URL string `json:"url"`
}

func (*HttpPost) DeepCopy

func (in *HttpPost) DeepCopy() *HttpPost

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HttpPost.

func (*HttpPost) DeepCopyInto

func (in *HttpPost) DeepCopyInto(out *HttpPost)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Output

type Output struct {
	Name string `json:"name"`
	// +optional
	HttpPostSpec HttpPost `json:"httpPostSpec"`
}

func (*Output) DeepCopy

func (in *Output) DeepCopy() *Output

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Output.

func (*Output) DeepCopyInto

func (in *Output) DeepCopyInto(out *Output)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type OutputFile

type OutputFile struct {
	// Filename of output file, as it will exist inside the workload container
	Filename string `json:"filename"`

	// Name of parser configmap.  Defaults to the null-parser if not specified,
	// which is a no-op.
	// +optional
	// +nullable
	// +kubebuilder:default:=null-parser
	Parser string `json:"parser"`

	// If there are multiple resources created by the workload (e.g., client and
	// server), target specifies which resource this is referring to.  See the
	// workload spec's documentation to see what targets are available.  If none
	// is specified, defaults to "workload"
	// +optional
	// +nullable
	// +kubebuilder:default:=workload
	Target string `json:"target"`

	// +optional
	// +nullable
	// +kubebuilder:default:=defaultWorkloadsOutput
	Sink string `json:"sink"`
}

func (*OutputFile) DeepCopy

func (in *OutputFile) DeepCopy() *OutputFile

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OutputFile.

func (*OutputFile) DeepCopyInto

func (in *OutputFile) DeepCopyInto(out *OutputFile)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Rate

type Rate struct {
	Name string `json:"name"`

	// +optional
	ConstantRateSpec ConstantRate `json:"constantRateSpec,omitempty"`
	// +optional
	ConstantIncreaseDecreaseRateSpec ConstantIncreaseDecreaseRate `json:"constantIncreaseDecreaseRateSpec,omitempty"`
}

func (*Rate) DeepCopy

func (in *Rate) DeepCopy() *Rate

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Rate.

func (*Rate) DeepCopyInto

func (in *Rate) DeepCopyInto(out *Rate)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Scale

type Scale struct {
	// +optional
	// +nullable
	ObjName string `json:"objName"`
	// +optional
	// +nullable
	ScaleScripts string `json:"scaleScripts"`

	// +optional
	// +nullable
	WorkloadName string `json:"workloadName"`

	ServiceAccountName string `json:"serviceAccountName"`
}

TODO: need a way of specifying how to scale - up or down, and by how much

func (*Scale) DeepCopy

func (in *Scale) DeepCopy() *Scale

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Scale.

func (*Scale) DeepCopyInto

func (in *Scale) DeepCopyInto(out *Scale)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Snapshot

type Snapshot struct {
	// +optional
	// +nullable
	WorkloadName string `json:"workloadName"`

	// +optional
	// +nullable
	VolumeName string `json:"volumeName"`

	SnapshotClass string `json:"snapshotClass"`
}

Snapshots and deletions can operate on an individual object or a selector if a selector, then there may be multiple objects that match - should specify different policies for deciding which object to delete, e.g. "newest", "oldest", "random", ???

func (*Snapshot) DeepCopy

func (in *Snapshot) DeepCopy() *Snapshot

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Snapshot.

func (*Snapshot) DeepCopyInto

func (in *Snapshot) DeepCopyInto(out *Snapshot)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Volume

type Volume struct {
	Name string `json:"name"`

	// +optional
	// +nullable
	// +kubebuilder:default:=1
	Count int `json:"count"`

	Spec corev1.PersistentVolumeClaimSpec `json:"spec"`

	// +optional
	// +nullable
	RateName string `json:"rateName"`
}

Creates PVCs with given name. If count is provided, the name will be name-<volume number>. Workloads that require volumes should parameterize the name of the volume, and the user should provide the name of a Volume as the value.

func (*Volume) DeepCopy

func (in *Volume) DeepCopy() *Volume

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Volume.

func (*Volume) DeepCopyInto

func (in *Volume) DeepCopyInto(out *Volume)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Workload

type Workload struct {
	Name string `json:"name"`

	Workload string `json:"workload"`

	// +optional
	// +nullable
	Vars map[string]string `json:"vars"`

	// +optional
	// +nullable
	// +kubebuilder:default:=1
	Count int `json:"count"`

	// +optional
	// +nullable
	SyncGroup string `json:"syncGroup"`

	// +optional
	// +nullable
	OutputFiles []OutputFile `json:"outputFiles"`

	// +optional
	// +nullable
	RateName string `json:"rateName"`
}

func (*Workload) DeepCopy

func (in *Workload) DeepCopy() *Workload

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Workload.

func (*Workload) DeepCopyInto

func (in *Workload) DeepCopyInto(out *Workload)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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